Encoding device, decoding device, bitstream generating device, encoding method, decoding method, and bitstream generating method

By integrating PTL/DPB/HRD information into the SPS for both multi-layer and single-layer video structures, the encoding and decoding devices simplify processing and reduce circuit size, addressing efficiency and complexity issues in video coding.

WO2026034119A1PCT designated stage Publication Date: 2026-02-12PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2025/024838
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-08
Filing Date
2025-07-10
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

Existing video coding technologies face challenges in optimizing encoding efficiency, image quality, processing volume, circuit size, and processing speed, particularly when handling multi-layer video structures, which complicates development and increases circuit scale.

Method used

The encoding and decoding devices and methods incorporate a configuration that includes PTL/DPB/HRD information in a Sequence Parameter Set (SPS) for both multi-layer and single-layer structures, allowing for commonality in base layer processing and simplifying operations.

Benefits of technology

This approach enhances coding efficiency, reduces development man-hours, and decreases circuit size by standardizing base layer processing across different video layer structures, while maintaining flexibility in adaptive image quality and processing load adjustments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025024838_12022026_PF_FP_ABST
    Figure JP2025024838_12022026_PF_FP_ABST
Patent Text Reader

Abstract

An encoding device (100) is provided with a circuit, and memory connected to the circuit. During operation, the circuit encodes PTL / DPB / HRD information for a base layer, the PTL / DPB / HRD information being at least one of PTL information, DPB information, and HRD information, into a bitstream according to a constraint on the bitstream (S501), and the constraint comprises including PTL / DPB / HRD information in an SPS in the bitstream if the bitstream has a multi-layer structure.
Need to check novelty before this filing date? Find Prior Art

Description

Encoding device, decoding device, bitstream generating device, encoding method, decoding method, and bitstream generating method

[0001] The present disclosure relates to an encoding device and the like.

[0002] Video coding technology has progressed from H.261 and MPEG-1 to H.264 / AVC (Advanced Video Coding), MPEG-LA, H.265 / HEVC (High Efficiency Video Coding), and H.266 / VVC (Versatile Video Codec). With this progress, there is a constant need to provide improvements and optimizations in video coding technology to handle the ever-increasing amount of digital video data in various applications. This disclosure relates to further advances, improvements, and optimizations in video coding.

[0003] Non-Patent Document 1 relates to an example of a conventional standard regarding the above-mentioned video coding technology.

[0004] H. 265 (ISO / IEC 23008-2 HEVC) / HEVC (High Efficiency Video Coding)

[0005] With regard to the above-mentioned encoding methods, it is desirable to propose new methods to improve encoding efficiency, improve image quality, reduce the amount of processing, reduce the circuit scale, or appropriately select elements or operations such as filters, block sizes, motion vectors, reference pictures or reference blocks.

[0006] The present disclosure provides a configuration or method that can contribute to one or more of, for example, improved coding efficiency, improved image quality, reduced processing amount, reduced circuit size, improved processing speed, and appropriate selection of elements or operations, etc. Note that the present disclosure may include a configuration or method that can contribute to benefits other than those described above.

[0007] For example, an encoding device according to one aspect of the present disclosure includes a circuit and a memory connected to the circuit, wherein the circuit, in operation, encodes PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, into a bitstream according to a constraint on the bitstream, the PTL / DPB / HRD information being for a base layer, and the constraint includes that, when the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

[0008] Each embodiment of the present disclosure, or a partial configuration or method thereof, enables at least one of, for example, improved coding efficiency, improved image quality, reduced encoding / decoding processing volume, reduced circuit size, or improved encoding / decoding processing speed. Alternatively, each embodiment of the present disclosure, or a partial configuration or method thereof, enables appropriate selection of components / operations such as filters, block sizes, motion vectors, reference pictures, and reference blocks in encoding and decoding. Note that the present disclosure also includes disclosure of configurations or methods that may provide benefits other than those described above. For example, a configuration or method that improves coding efficiency while suppressing an increase in processing volume.

[0009] Further advantages and benefits of certain aspects of the present disclosure will become apparent from the specification and drawings. While such advantages and / or benefits may be obtained by several embodiments and features described in the specification and drawings, not all of them necessarily need to be provided to obtain one or more advantages and / or benefits.

[0010] These general or specific aspects may be realized by a system, an integrated circuit, a computer program, or a recording medium such as a computer-readable CD-ROM, or may be realized by any combination of a system, a method, an integrated circuit, a computer program, and a recording medium.

[0011] A configuration or method according to an aspect of the present disclosure may contribute to, for example, one or more of improved coding efficiency, improved image quality, reduced processing amount, reduced circuit size, improved processing speed, and appropriate selection of elements or operations, etc. Note that a configuration or method according to an aspect of the present disclosure may also contribute to benefits other than those described above.

[0012] FIG. 1 is a schematic diagram showing an example of the configuration of a transmission system according to an embodiment. FIG. 2 is a diagram showing an example of a hierarchical structure of data in a stream. FIG. 3 is a diagram showing an example of the configuration of a slice. FIG. 4 is a diagram showing an example of the configuration of a tile. FIG. 5 is a diagram showing an example of an encoding structure for scalable encoding. FIG. 6 is a diagram showing an example of an encoding structure for scalable encoding. FIG. 7 is a block diagram showing an example of the configuration of an encoding device according to an embodiment. FIG. 8 is a block diagram showing an implementation example of an encoding device. FIG. 9 is a flowchart showing an example of the overall encoding process by the encoding device. FIG. 10 is a diagram showing an example of block division. FIG. 11 is a diagram showing an example of the configuration of a division unit. FIG. 12 is a diagram showing an example of a division pattern. FIG. 13A is a diagram showing an example of a syntax tree of a division pattern. FIG. 13B is a diagram showing another example of a syntax tree of a division pattern. FIG. 14 is a table showing transform basis functions corresponding to each transform type. FIG. 15 is a diagram showing an example of SVT. FIG. 16 is a flowchart showing an example of processing by the transform unit. FIG. 17 is a flowchart showing another example of processing by the transform unit. FIG. 18 is a block diagram showing an example of the configuration of a quantization unit. FIG. 19 is a flowchart showing an example of quantization by the quantization unit. FIG. 20 is a block diagram showing an example of the configuration of an entropy coding unit. FIG. 21 is a diagram showing the flow of CABAC in the entropy coding unit. FIG. 22 is a block diagram showing an example of the configuration of a loop filter unit. FIG. 23A is a diagram showing an example of the shape of a filter used in an adaptive loop filter (ALF). FIG. 23B is a diagram showing another example of the shape of a filter used in the ALF. FIG. 23C is a diagram showing another example of the shape of a filter used in the ALF. FIG. 23D is a diagram showing an example in which a Y sample (first component) is used for a Cb CCALF and a Cr CCALF (multiple components different from the first component). FIG. 23E is a diagram showing a diamond-shaped filter. FIG. 23F is a diagram showing an example of a JC-CCALF. FIG. 23G is a diagram showing examples of weight_index candidates for a JC-CCALF. FIG. 24 is a block diagram showing an example of a detailed configuration of a loop filter unit functioning as a DBF.FIG. 25 is a diagram illustrating an example of a deblocking filter having filter characteristics symmetrical with respect to a block boundary. FIG. 26 is a diagram illustrating an example of a block boundary on which deblocking filter processing is performed. FIG. 27 is a diagram illustrating an example of a Bs value. FIG. 28 is a flowchart illustrating an example of processing performed by a prediction unit of an encoding device. FIG. 29 is a flowchart illustrating another example of processing performed by a prediction unit of an encoding device. FIG. 30 is a flowchart illustrating another example of processing performed by a prediction unit of an encoding device. FIG. 31 is a diagram illustrating an example of 67 intra prediction modes in intra prediction. FIG. 32 is a flowchart illustrating an example of processing by an intra prediction unit. FIG. 33 is a diagram illustrating an example of each reference picture. FIG. 34 is a conceptual diagram illustrating an example of a reference picture list. FIG. 35 is a flowchart illustrating the basic processing flow of inter prediction. FIG. 36 is a flowchart illustrating an example of MV derivation. FIG. 37 is a flowchart illustrating another example of MV derivation. FIG. 38A is a diagram illustrating an example of classification of each MV derivation mode. FIG. 38B is a diagram illustrating an example of classification of each MV derivation mode. FIG. 39 is a flowchart illustrating an example of inter prediction in normal inter mode. FIG. 40 is a flowchart showing an example of inter prediction in normal merge mode. FIG. 41 is a diagram for explaining an example of MV derivation processing in normal merge mode. FIG. 42 is a diagram for explaining an example of MV derivation processing in HMVP (History-based Motion Vector Prediction / Predictor) mode. FIG. 43 is a flowchart showing an example of FRUC (frame rate up conversion). FIG. 44 is a diagram for explaining an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. FIG. 45 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. FIG. 46A is a diagram for explaining an example of MV derivation in sub-block units in affine mode using two control points.FIG. 46B is a diagram illustrating an example of derivation of MVs for each sub-block in affine mode using three control points. FIG. 47A is a conceptual diagram illustrating an example of derivation of MVs for control points in affine mode. FIG. 47B is a conceptual diagram illustrating an example of derivation of MVs for control points in affine mode. FIG. 47C is a conceptual diagram illustrating an example of derivation of MVs for control points in affine mode. FIG. 48A is a diagram illustrating an affine mode having two control points. FIG. 48B is a diagram illustrating an affine mode having three control points. FIG. 49A is a conceptual diagram illustrating an example of a method for derivation of MVs for control points when the number of control points in the coded block and the current block differs. FIG. 49B is a conceptual diagram illustrating another example of a method for derivation of MVs for control points when the number of control points in the coded block and the current block differs. FIG. 50 is a flowchart illustrating an example of processing in affine merge mode. FIG. 51 is a flowchart illustrating an example of processing in affine inter mode. FIG. 52A is a diagram illustrating generation of two triangular predicted images. FIG. 52B is a conceptual diagram illustrating an example of a first portion of a first partition, and a first and second sample sets. FIG. 52C is a conceptual diagram illustrating a first portion of a first partition. FIG. 53 is a flowchart illustrating an example of a triangle mode. FIG. 54 is a diagram illustrating an example of an ATMVP (Advanced Temporal Motion Vector Prediction / Predictor) mode in which motion vectors (MVs) are derived on a sub-block basis. FIG. 55 is a diagram illustrating the relationship between merge mode and dynamic motion vector refreshing (DMVR). FIG. 56 is a conceptual diagram illustrating an example of DMVR. FIG. 57 is a conceptual diagram illustrating another example of DMVR for determining motion vectors. FIG. 58A is a diagram illustrating an example of motion estimation in DMVR. FIG. 58B is a flowchart illustrating an example of motion estimation in DMVR. Fig. 59 is a flowchart showing an example of predicted image generation, and Fig. 60 is a flowchart showing another example of predicted image generation.FIG. 61 is a flowchart illustrating an example of a prediction image correction process using OBMC (overlapped block motion compensation). FIG. 62 is a conceptual diagram illustrating an example of a prediction image correction process using OBMC. FIG. 63 is a diagram illustrating a model assuming uniform linear motion. FIG. 64 is a flowchart illustrating an example of inter prediction according to BIO. FIG. 65 is a diagram illustrating an example of the configuration of an inter prediction unit that performs inter prediction according to BIO. FIG. 66A is a diagram illustrating an example of a prediction image generation method using luminance correction processing using LIC (local illumination compensation). FIG. 66B is a flowchart illustrating an example of a prediction image generation method using luminance correction processing using LIC. FIG. 67 is a block diagram illustrating the configuration of a decoding device according to an embodiment. FIG. 68 is a block diagram illustrating an implementation example of a decoding device. FIG. 69 is a flowchart illustrating an example of an overall decoding process performed by a decoding device. FIG. 70 is a diagram illustrating the relationship between a partition determination unit and other components. FIG. 71 is a block diagram showing an example of the configuration of an entropy decoding unit. FIG. 72 is a diagram showing the flow of CABAC in the entropy decoding unit. FIG. 73 is a block diagram showing an example of the configuration of an inverse quantization unit. FIG. 74 is a flowchart showing an example of inverse quantization by the inverse quantization unit. FIG. 75 is a flowchart showing an example of processing by the inverse transform unit. FIG. 76 is a flowchart showing another example of processing by the inverse transform unit. FIG. 77 is a block diagram showing an example of the configuration of a loop filter unit. FIG. 78 is a flowchart showing an example of processing performed by a prediction unit of a decoding device. FIG. 79 is a flowchart showing another example of processing performed by the prediction unit of a decoding device. FIG. 80A is a flowchart showing part of another example of processing performed by the prediction unit of a decoding device. FIG. 80B is a flowchart showing the remaining part of another example of processing performed by the prediction unit of a decoding device. FIG. 81 is a diagram showing an example of processing by an intra prediction unit of a decoding device. FIG. 82 is a flowchart showing an example of MV derivation in a decoding device. FIG. 83 is a flowchart showing another example of MV derivation in a decoding device.FIG. 84 is a flowchart showing an example of inter prediction in normal inter mode in a decoding device. FIG. 85 is a flowchart showing an example of inter prediction in normal merge mode in a decoding device. FIG. 86 is a flowchart showing an example of inter prediction in FRUC mode in a decoding device. FIG. 87 is a flowchart showing an example of inter prediction in affine merge mode in a decoding device. FIG. 88 is a flowchart showing an example of inter prediction in affine inter mode in a decoding device. FIG. 89 is a flowchart showing an example of inter prediction in triangle mode in a decoding device. FIG. 90 is a flowchart showing an example of motion estimation using DMVR in a decoding device. FIG. 91 is a flowchart showing a detailed example of motion estimation using DMVR in a decoding device. FIG. 92 is a flowchart showing an example of generation of a predicted image in a decoding device. FIG. 93 is a flowchart showing another example of generation of a predicted image in a decoding device. FIG. 94 is a flowchart showing an example of correction of a predicted image using OBMC in a decoding device. FIG. 95 is a flowchart showing an example of correction of a predicted image using BIO in a decoding device. FIG. 96 is a flowchart showing an example of correction of a predicted image using LIC in a decoding device. FIG. 97 is a conceptual diagram showing an example of a multi-layer structure. FIG. 98 is a conceptual diagram showing an overview of a VPS. FIG. 99 is a relationship diagram showing an example of VPS and SPS information in a first aspect. FIG. 100 is a flowchart showing an example of decoding video from a bitstream with a single layer structure in the first aspect. FIG. 101 is a flowchart showing an example of decoding base layer video from a bitstream with a multi-layer structure in the first aspect. FIG. 102 is a relationship diagram showing an example of VPS and SPS information in a second aspect. FIG. 103 is a flowchart showing an example of decoding video from a bitstream with a single layer structure or decoding base layer video from a bitstream with a multi-layer structure in the second aspect. FIG. 104 is a flowchart showing an example of encoding video into a bitstream with a single layer structure or a bitstream with a multi-layer structure in the second aspect.Fig. 105 is a flowchart showing an example of the basic operation of an encoding device. Fig. 106 is a flowchart showing an example of the basic operation of a decoding device. Fig. 107 is a diagram showing the overall configuration of a content supply system that realizes a content distribution service. Fig. 108 is a diagram showing an example of a display screen of a web page. Fig. 109 is a diagram showing an example of a display screen of a web page. Fig. 110 is a diagram showing an example of a smartphone. Fig. 111 is a block diagram showing an example of the configuration of a smartphone.

[0013] For example, scalable coding may be applied to video coding. In this case, a coding device encodes a video using multiple layers, i.e., multiple layers. Then, a decoding device selects one or more layers from the multiple layers and decodes the video using the selected one or more layers (i.e., information of the one or more layers).

[0014] This may enable the decoding device to adaptively adjust the image quality and processing load. Specifically, the decoding device may be able to decode video with high image quality and a high processing load, or to decode video with low image quality and a low processing load.

[0015] Here, when multi-layers are used, information for each layer set may be included in a video parameter set (VPS) in the bitstream. Specifically, this information includes profile, tier, and level (PTL) information, decoded picture buffer (DPB) information, and hypothetical reference decoder (HRD) information.

[0016] That is, when multi-layers are used, PTL information, DPB information, and HRD information for each layer set may be included in the VPS, and when multi-layers are used, this information may be used.

[0017] Scalable coding may not be applied to the coding of moving images. For example, if scalable coding is not applied to the coding of moving images, the coding device codes the moving images using a single layer, i.e., one layer. Then, the decoding device decodes the moving images using one layer. This may simplify the coding and decoding processes.

[0018] Here, when a single layer is used, PTL information, DPB information, HRD information, etc. for the single layer may be included in a Sequence Parameter Set (SPS) in the bitstream. When a single layer is used, this information may be used.

[0019] Furthermore, for example, when scalable coding is applied to video coding and the video is coded using multiple layers, the decoding device may decode the video using a base layer of the multiple layers. That is, the decoding device may decode the video corresponding to the base layer of the multiple layers. When decoding the video, one layer is used whether the base layer of the multiple layers is used or a single layer is used. That is, in both of these two cases, the video corresponding to one layer is decoded.

[0020] However, as described above, when multiple layers are used, information in the VPS may be used. That is, when a base layer of multiple layers is used, information on the base layer of the multiple layers may be included in the VPS. On the other hand, when a single layer is used, information on the single layer may be included in the SPS.

[0021] Therefore, even though a single layer is used in the same way, when a multi-layer base layer is used and when a single layer is used, different processing may be performed, which may complicate the processing, leading to an increase in development man-hours and an increase in circuit size.

[0022] Therefore, the encoding device of Example 1 includes a circuit and a memory connected to the circuit, wherein the circuit, in operation, encodes PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, into a bitstream according to a constraint on the bitstream, the PTL / DPB / HRD information being for a base layer, and the constraint includes that, when the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

[0023] This may allow the PTL / DPB / HRD information included in the SPS to be referenced in the base layer processing of a multi-layer structure. Therefore, it may be possible to increase the commonality of base layer processing between a multi-layer structure and a single-layer structure. This may simplify the processing, reduce development man-hours, and reduce the circuit scale.

[0024] Furthermore, the encoding device of Example 2 may be the encoding device of Example 1, in which the constraint is common to both the case where the bitstream is a bitstream of the multi-layer structure and the case where the bitstream is a bitstream of a single-layer structure, and includes that the PTL / DPB / HRD information is included in the SPS.

[0025] This may make it possible to more reliably standardize base layer processing between the multi-layer structure and the single-layer structure.

[0026] Furthermore, the encoding device of Example 3 may be the encoding device of Example 2, wherein the constraint allows both that a VPS (Video Parameter Set) including the PTL / DPB / HRD information is included in the bitstream when the bitstream is a bitstream with the single-layer structure, and that the VPS including the PTL / DPB / HRD information is not included in the bitstream.

[0027] This may make it possible to adaptively select whether or not to use VPS in a single-layer structure.

[0028] Furthermore, the encoding device of Example 4 may be the encoding device of Example 3, in which the SPS includes a parameter having a value indicating an identifier of the VPS to be referenced or a value indicating that no VPS is referenced, and the constraint includes that, if the bitstream is a bitstream with the single-layer structure and the VPS including the PTL / DPB / HRD information is included in the bitstream, the parameter has a value indicating an identifier of the VPS.

[0029] This may allow proper identification of the VPS containing the PTL / DPB / HRD information.

[0030] Furthermore, the encoding device of Example 5 may be the encoding device of Example 3 or 4, in which the SPS includes a parameter having a value indicating an identifier of the VPS to be referenced or a value indicating that no VPS is referenced, and the constraint includes that if the bitstream is a bitstream with the single-layer structure and the VPS including the PTL / DPB / HRD information is not included in the bitstream, the parameter has a value indicating that no VPS is referenced.

[0031] This may allow proper identification that a VPS containing PTL / DPB / HRD information is not referenced.

[0032] Furthermore, the encoding device of Example 6 may be the encoding device of any one of Examples 1 to 5, in which the constraint includes that, when the bitstream is a bitstream of the multi-layer structure, the bitstream includes a Video Parameter Set (VPS) including PTL / DPB / HRD information for each of a plurality of layer sets, and the PTL / DPB / HRD information for the base layer is PTL / DPB / HRD information for one of the plurality of layer sets.

[0033] This may enable the VPS to efficiently identify PTL / DPB / HRD information suitable for processing each of multiple layer sets, including the layer set corresponding to the base layer.

[0034] Also, a decoding device of Example 7 includes a circuit and a memory connected to the circuit, wherein the circuit, in operation, decodes PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, from a bitstream in accordance with a constraint on the bitstream, the PTL / DPB / HRD information being for a base layer, and the constraint includes that, when the bitstream has a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

[0035] This may allow the PTL / DPB / HRD information included in the SPS to be referenced in the base layer processing of a multi-layer structure. Therefore, it may be possible to increase the commonality of base layer processing between a multi-layer structure and a single-layer structure. This may simplify the processing, reduce development man-hours, and reduce the circuit scale.

[0036] Furthermore, the decoding device of Example 8 may be the decoding device of Example 7, in which the constraint is common to both the case where the bitstream is a bitstream of the multi-layer structure and the case where the bitstream is a bitstream of a single-layer structure, and includes that the PTL / DPB / HRD information is included in the SPS.

[0037] This may make it possible to more reliably standardize base layer processing between the multi-layer structure and the single-layer structure.

[0038] Furthermore, the decoding device of Example 9 may be the decoding device of Example 8, wherein the constraint allows both that a VPS (Video Parameter Set) including the PTL / DPB / HRD information is included in the bitstream when the bitstream is a bitstream with the single-layer structure, and that the VPS including the PTL / DPB / HRD information is not included in the bitstream.

[0039] This may make it possible to adaptively select whether or not to use VPS in a single-layer structure.

[0040] Furthermore, the decoding device of Example 10 may be the decoding device of Example 9, wherein the SPS includes a parameter having a value indicating an identifier of the VPS to be referenced or a value indicating that no VPS is referenced, and the constraint includes that if the bitstream is a bitstream of the single-layer structure and the VPS including the PTL / DPB / HRD information is included in the bitstream, the parameter has a value indicating an identifier of the VPS.

[0041] This may allow proper identification of the VPS containing the PTL / DPB / HRD information.

[0042] Furthermore, the decoding device of Example 11 may be the decoding device of Example 9 or 10, wherein the SPS includes a parameter having a value indicating an identifier of the VPS to be referenced or a value indicating that no VPS is referenced, and the constraint includes that if the bitstream is a bitstream of the single-layer structure and the VPS including the PTL / DPB / HRD information is not included in the bitstream, the parameter has a value indicating that no VPS is referenced.

[0043] This may allow proper identification that a VPS containing PTL / DPB / HRD information is not referenced.

[0044] Furthermore, the decoding device of Example 12 may be the decoding device of any of Examples 7 to 11, in which the constraint includes that, when the bitstream is a bitstream of the multi-layer structure, the bitstream includes a VPS (Video Parameter Set) including PTL / DPB / HRD information for each of a plurality of layer sets, and the PTL / DPB / HRD information for the base layer is PTL / DPB / HRD information for one of the plurality of layer sets.

[0045] This may enable the VPS to efficiently identify PTL / DPB / HRD information suitable for processing each of multiple layer sets, including the layer set corresponding to the base layer.

[0046] Furthermore, the decoding device of Example 13 may be the decoding device of any of Examples 7 to 12, wherein the SPS includes a parameter having a value indicating an identifier of a referenced VPS (Video Parameter Set) or a value indicating that no VPS is referenced, and wherein, when the bitstream is a bitstream with the multi-layer structure, in decoding the base layer video, the circuit ignores the VPS even if the VPS is included in the bitstream, and does not refer to the VPS even if the parameter included in the SPS has a value indicating an identifier of the referenced VPS, and decodes the PTL / DPB / HRD information for the base layer from the SPS in the bitstream.

[0047] This may make it possible to refer to the PTL / DPB / HRD information included in the SPS in the same way when decoding the base layer in both the multi-layer structure and the single-layer structure, which may make it possible to use a common base layer decoding process for the multi-layer structure and the single-layer structure.

[0048] Furthermore, the decoding device of Example 14 may be the decoding device of Example 13, wherein the circuit is common to both the case where the bitstream is a bitstream with the multi-layer structure and the case where the bitstream is a bitstream with a single-layer structure, and in decoding the base layer video, even if the bitstream includes the VPS, the circuit ignores the VPS, and even if the parameter included in the SPS has a value indicating an identifier of the VPS to be referenced, the circuit decodes the PTL / DPB / HRD information for the base layer from the SPS in the bitstream.

[0049] This may make it possible to more reliably standardize the base layer decoding process between the multi-layer structure and the single-layer structure.

[0050] Furthermore, the decoding device of Example 15 may be the decoding device of Example 13 or 14, wherein the circuit decodes the VPS when the VPS is ignored, does not refer to the VPS in processing after decoding the VPS, and discards the VPS.

[0051] This may allow unnecessary data to be discarded while continuing the decoding process, thereby enabling efficient processing and preventing unnecessary resource use.

[0052] Furthermore, a bitstream generating device of Example 16 includes a circuit and a memory connected to the circuit, wherein the circuit generates the bitstream including PTL / DPB / HRD information, the PTL / DPB / HRD information being at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, the PTL / DPB / HRD information being for a base layer, by encoding the PTL / DPB / HRD information into the bitstream according to a constraint on the bitstream, wherein the constraint includes that, when the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

[0053] This may allow the PTL / DPB / HRD information included in the SPS to be referenced in the base layer processing of a multi-layer structure. Therefore, it may be possible to increase the commonality of base layer processing between a multi-layer structure and a single-layer structure. This may simplify the processing, reduce development man-hours, and reduce the circuit scale.

[0054] In addition, the encoding method of Example 17 is an encoding method in which PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, and the PTL / DPB / HRD information for a base layer, is encoded into a bitstream according to a constraint on the bitstream, and the constraint includes that if the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

[0055] This may allow the PTL / DPB / HRD information included in the SPS to be referenced in the base layer processing of a multi-layer structure. Therefore, it may be possible to increase the commonality of base layer processing between a multi-layer structure and a single-layer structure. This may simplify the processing, reduce development man-hours, and reduce the circuit scale.

[0056] Further, the decoding method of Example 18 is a decoding method that decodes PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, from a bitstream in accordance with a constraint on the bitstream, the PTL / DPB / HRD information being for a base layer, and the constraint includes that, if the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

[0057] This may allow the PTL / DPB / HRD information included in the SPS to be referenced in the base layer processing of a multi-layer structure. Therefore, it may be possible to increase the commonality of base layer processing between a multi-layer structure and a single-layer structure. This may simplify the processing, reduce development man-hours, and reduce the circuit scale.

[0058] Further, a bitstream generation method of Example 19 is a bitstream generation method that generates the bitstream including PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, by encoding PTL / DPB / HRD information for a base layer into the bitstream according to a constraint on the bitstream, and the constraint includes that when the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

[0059] This may allow the PTL / DPB / HRD information included in the SPS to be referenced in the base layer processing of a multi-layer structure. Therefore, it may be possible to increase the commonality of base layer processing between a multi-layer structure and a single-layer structure. This may simplify the processing, reduce development man-hours, and reduce the circuit scale.

[0060] Moreover, the encoding device of Example 20 includes an input unit, a division unit, an intra prediction unit, an inter prediction unit, a loop filter unit, a transformation unit, a quantization unit, an entropy encoding unit, and an output unit.

[0061] The input unit receives a current picture, and the dividing unit divides the current picture into a plurality of blocks.

[0062] The intra prediction unit generates a prediction signal of a current block included in the current picture using reference pixels included in the current picture. The inter prediction unit generates a prediction signal of a current block included in the current picture using a reference block included in a reference picture other than the current picture. The loop filter unit applies a filter to a reconstructed block of the current block included in the current picture.

[0063] The transform unit transforms a prediction error between an original signal of a current block included in the current picture and a prediction signal generated by the intra prediction unit or the inter prediction unit to generate transform coefficients. The quantization unit quantizes the transform coefficients to generate quantized coefficients. The entropy coding unit applies variable-length coding to the quantized coefficients to generate an encoded bitstream. The output unit then outputs the encoded bitstream, which includes the quantized coefficients to which variable-length coding has been applied and control information.

[0064] In operation, the entropy coding unit encodes PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, and the PTL / DPB / HRD information for a base layer, into the bitstream according to a constraint on the bitstream, and the constraint includes that if the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

[0065] Moreover, the decoding device of Example 21 includes an input unit, an entropy decoding unit, an inverse quantization unit, an inverse transform unit, an intra prediction unit, an inter prediction unit, a loop filter unit, and an output unit.

[0066] The input unit receives an encoded bitstream, the entropy decoding unit applies variable length decoding to the encoded bitstream to derive quantized coefficients, the inverse quantization unit inversely quantizes the quantized coefficients to derive transform coefficients, and the inverse transform unit inversely transforms the transform coefficients to derive prediction errors.

[0067] The intra prediction unit generates a prediction signal for a current block included in the current picture using reference pixels included in the current picture, and the inter prediction unit generates a prediction signal for a current block included in the current picture using reference blocks included in a reference picture other than the current picture.

[0068] The loop filter unit applies a filter to a reconstructed block of a current block included in the current picture, and the output unit outputs the current picture.

[0069] In operation, the entropy decoding unit decodes PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, from the bitstream according to a constraint on the bitstream, wherein the constraint includes that the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream if the bitstream is a bitstream with a multi-layer structure.

[0070] Furthermore, these comprehensive or specific aspects may be realized as a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be realized as any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium.

[0071] [Definition of Terms] As an example, each term may be defined as follows.

[0072] (1) Image: A unit of data composed of a set of pixels, consisting of pictures or blocks smaller than pictures, and including both moving images and still images.

[0073] (2) Picture: A processing unit of an image composed of a set of pixels, and is sometimes called a frame or a field.

[0074] (3) Block: A processing unit for a set containing a specific number of pixels, and can be named in any way, as shown in the following examples, or can be shaped in any way, including, for example, a rectangle made up of M×N pixels, a square made up of M×M pixels, a triangle, a circle, or any other shape.

[0075] (Examples of blocks) Slice / tile / brick CTU / superblock / basic division unit VPDU / hardware processing division unit CU / processing block unit / prediction block unit (PU) / orthogonal transform block unit (TU) / unit Sub-block

[0076] (4) Pixel / sample A pixel is a point that is the smallest unit that constitutes an image, and includes not only pixels at integer positions but also pixels at decimal positions that are generated based on pixels at integer positions.

[0077] (5) Pixel Value / Sample Value: A value inherent to a pixel, including not only brightness value, color difference value, and RGB gradation, but also depth value or binary values ​​0 and 1.

[0078] (6) Flags: In addition to one bit, flags may be multi-bit, for example, parameters or indexes of two or more bits. In addition, flags may be multi-valued using other bases as well as two values ​​using binary numbers.

[0079] (7) Signals are symbols or codes used to transmit information, and include discrete digital signals as well as analog signals that take continuous values.

[0080] (8) Stream / Bitstream: A data string of digital data or a flow of digital data. A stream / bitstream may consist of a single stream or multiple streams divided into multiple layers. It also includes cases where data is transmitted by serial communication over a single transmission line, as well as cases where data is transmitted by packet communication over multiple transmission lines.

[0081] (9) In the case of difference / difference scalar quantities, in addition to simple difference (x-y), it is sufficient to include difference calculations, including absolute value of difference (|x-y|), squared difference (x^2-y^2), square root of difference (√(x-y)), weighted difference (ax-by: a, b are constants), and offset difference (x-y+a: a is an offset).

[0082] (10) For sum scalar quantities, in addition to simple sum (x + y), it is sufficient to include sum operations, such as absolute value of sum (|x + y|), sum of squares (x^2 + y^2), square root of sum (√(x + y)), weighted sum (ax + by: a, b are constants), and offset sum (x + y + a: a is an offset).

[0083] (11) Based on: This includes cases where factors other than the one being based on are taken into consideration. It also includes cases where a result is obtained directly or via an intermediate result.

[0084] (12) Using (used, using) This includes cases where elements other than the target of use are taken into account. It also includes cases where a result is obtained directly or via an intermediate result.

[0085] (13) Prohibit (forbid) This can be rephrased as not being allowed. Also, not prohibiting or being allowed does not necessarily mean obligation.

[0086] (14) Limit (restriction / restrict / restricted) This can be rephrased as not being permitted. Also, not prohibiting something or being permitted does not necessarily mean that it is an obligation. Furthermore, it is sufficient if something is partially prohibited in terms of quantity or quality, and it also includes cases where something is completely prohibited.

[0087] (15) Chroma: An adjective, denoted by the symbols Cb and Cr, that specifies that a sample array or a single sample represents one of two color difference signals associated with a primary color. Instead of the term chroma, the term chrominance can also be used.

[0088] (16) Luma: An adjective, denoted by the symbol or subscript Y or L, that specifies that a sample array or a single sample represents a monochrome signal associated with a primary color. Instead of the term luma, the term luminance may also be used.

[0089] [Description] In the drawings, the same reference numerals refer to the same or similar elements, and the sizes and relative positions of the elements in the drawings are not necessarily drawn to scale.

[0090] Hereinafter, embodiments will be described in detail with reference to the drawings. Note that the embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, the arrangement and connection of the components, steps, and the relationship and order of the steps shown in the following embodiments are merely examples and are not intended to limit the scope of the claims.

[0091] Below, embodiments of an encoding device and a decoding device will be described. The embodiments are examples of encoding devices and decoding devices to which the processes and / or configurations described in each aspect of the present disclosure can be applied. The processes and / or configurations can also be implemented in encoding devices and decoding devices different from the embodiments. For example, with regard to the processes and / or configurations applied to the embodiments, any of the following may be implemented.

[0092] (1) Any of the multiple components of the encoding device or decoding device of the embodiments described in each aspect of the present disclosure may be replaced or combined with other components described in any of the aspects of the present disclosure.

[0093] (2) In the encoding device or decoding device according to the embodiment, the functions or processes performed by some of the components of the encoding device or decoding device may be changed in any way, such as by adding, replacing, or deleting a function or process. For example, any function or process may be replaced with or combined with another function or process described in any of the aspects of the present disclosure.

[0094] (3) In the method implemented by the encoding device or decoding device according to the embodiment, some of the processes included in the method may be arbitrarily modified, such as by addition, replacement, deletion, etc. For example, any process in the method may be replaced with or combined with another process described in any of the aspects of the present disclosure.

[0095] (4) Some of the components constituting the encoding device or decoding device of the embodiment may be combined with components described in any of the aspects of the present disclosure, or may be combined with components having some of the functions described in any of the aspects of the present disclosure, or may be combined with components that perform some of the processing performed by the components described in each aspect of the present disclosure.

[0096] (5) A component having part of the functionality of the encoding device or decoding device of an embodiment, or a component that performs part of the processing of the encoding device or decoding device of an embodiment, may be combined or replaced with a component described in any of the aspects of the present disclosure, a component having part of the functionality described in any of the aspects of the present disclosure, or a component that performs part of the processing described in any of the aspects of the present disclosure.

[0097] (6) In the method implemented by the encoding device or decoding device of the embodiment, any of the multiple processes included in the method may be replaced or combined with the process described in any of the aspects of the present disclosure or any similar process.

[0098] (7) Some of the processes included in the method implemented by the encoding device or decoding device of the embodiment may be combined with the processes described in any of the aspects of the present disclosure.

[0099] (8) The implementation of the processes and / or configurations described in each aspect of the present disclosure is not limited to the encoding device or decoding device of the embodiments. For example, the processes and / or configurations may be implemented in a device used for a purpose other than video encoding or video decoding disclosed in the embodiments.

[0100] [System Configuration] FIG. 1 is a schematic diagram showing an example of the configuration of a transmission system according to this embodiment.

[0101] The transmission system Trs is a system that transmits a stream generated by encoding an image and decodes the transmitted stream. Such a transmission system Trs includes, for example, an encoding device 100, a network Nw, and a decoding device 200, as shown in FIG.

[0102] An image is input to the encoding device 100. The encoding device 100 generates a stream by encoding the input image and outputs the stream to the network Nw. The stream includes, for example, the encoded image and control information for decoding the encoded image. The image is compressed by this encoding.

[0103] Note that the original image before encoding that is input to the encoding device 100 is also called an original image, an original signal, or an original sample. The image may be a moving image or a still image. The image is a broader concept than sequences, pictures, and blocks, and is not limited in spatial or temporal domain unless otherwise specified. The image is composed of an array of pixels or pixel values, and the signal representing the image or the pixel values ​​is also called a sample. The stream may also be called a bitstream, coded bitstream, compressed bitstream, or coded signal. The encoding device may also be called an image encoding device or a moving image encoding device, and the encoding method used by the encoding device 100 may also be called an encoding method, an image coding method, or a moving image coding method.

[0104] The network Nw transmits the stream generated by the encoding device 100 to the decoding device 200. The network Nw may be the Internet, a wide area network (WAN), a local area network (LAN), or a combination of these. The network Nw is not necessarily limited to a bidirectional communication network, but may also be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting or satellite broadcasting. The network Nw may also be replaced by a storage medium on which a stream is recorded, such as a DVD (Digital Versatile Disc) or a BD (Blu-Ray Disc (registered trademark)).

[0105] The decoding device 200 generates a decoded image, which is, for example, an uncompressed image, by decoding the stream transmitted over the network Nw. For example, the decoding device decodes the stream according to a decoding method corresponding to the encoding method used by the encoding device 100.

[0106] The decoding device may be called an image decoding device or a video decoding device, and the decoding method performed by the decoding device 200 may be called a decoding method, an image decoding method, or a video decoding method.

[0107] [Data Structure] Figure 2 is a diagram showing an example of a hierarchical structure of data in a stream. The stream includes, for example, a video sequence. This video sequence includes, for example, a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), supplemental enhancement information (SEI), and multiple pictures, as shown in Figure 2(a).

[0108] In a video composed of multiple layers, the VPS includes coding parameters common to multiple layers, and coding parameters related to multiple layers included in the video or to each individual layer.

[0109] The SPS includes parameters used for the sequence, i.e., encoding parameters that the decoding device 200 refers to in order to decode the sequence. For example, the encoding parameters may indicate the width or height of a picture. Note that there may be multiple SPSs.

[0110] The PPS includes parameters used for a picture, i.e., encoding parameters referenced by the decoding device 200 to decode each picture in a sequence. For example, the encoding parameters may include a reference value of the quantization width used in decoding the picture and a flag indicating the application of weighted prediction. Note that there may be multiple PPSs. Furthermore, the SPS and PPS may be simply referred to as parameter sets.

[0111] A picture may include a picture header and one or more slices, as shown in Fig. 2(b), where the picture header includes coding parameters that the decoding device 200 references to decode the one or more slices.

[0112] As shown in (c) of Fig. 2, a slice includes a slice header and one or more bricks. The slice header includes coding parameters that are referenced by the decoding device 200 to decode the one or more bricks.

[0113] A brick includes one or more coding tree units (CTUs), as shown in FIG. 2(d).

[0114] Note that a picture may not contain slices, but may instead contain tile groups, where a tile group contains one or more tiles, and a brick may contain slices.

[0115] A CTU is also called a superblock or a basic division unit. As shown in (e) of Fig. 2, such a CTU includes a CTU header and one or more coding units (CUs). The CTU header includes coding parameters that the decoding device 200 references to decode the one or more CUs.

[0116] A CU may be divided into multiple small CUs. Furthermore, as shown in (f) of FIG. 2, a CU includes a CU header, prediction information, and residual coefficient information. The prediction information is information for predicting the CU, and the residual coefficient information is information indicating a prediction residual, which will be described later. A CU is basically the same as a PU (Prediction Unit) and a TU (Transform Unit), but may include multiple TUs smaller than the CU, for example, in an SBT, which will be described later. A CU may also be processed for each VPDU (Virtual Pipeline Decoding Unit) that constitutes the CU. A VPDU is a fixed unit that can be processed in one stage, for example, when performing pipeline processing in hardware.

[0117] Note that a stream may not have some of the layers shown in FIG. 2 . The order of these layers may be changed, or some layers may be replaced with other layers. A picture currently being processed by a device such as the encoding device 100 or the decoding device 200 is referred to as a current picture. If the processing is encoding, the current picture is synonymous with a picture to be encoded, and if the processing is decoding, the current picture is synonymous with a picture to be decoded. A block, such as a CU or CU, currently being processed by a device such as the encoding device 100 or the decoding device 200 is referred to as a current block. If the processing is encoding, the current block is synonymous with a block to be encoded, and if the processing is decoding, the current block is synonymous with a block to be decoded.

[0118] [Picture Composition Slices / Tiles] In order to decode pictures in parallel, a picture may be composed of slices or tiles.

[0119] A slice is a basic coding unit that constitutes a picture. A picture is made up of, for example, one or more slices. A slice is made up of one or more consecutive CTUs.

[0120] FIG. 3 illustrates an example of a slice configuration. For example, a picture includes 11×8 CTUs and is divided into four slices (slices 1-4). Slice 1 may include, for example, 16 CTUs, slice 2 may include, for example, 21 CTUs, slice 3 may include, for example, 29 CTUs, and slice 4 may include, for example, 22 CTUs. Each CTU in a picture belongs to one of the slices. The shape of a slice is determined by dividing the picture horizontally. The slice boundaries do not necessarily have to be at the edges of the screen, but may be anywhere within the boundaries of the CTUs within the screen. The processing order (encoding order or decoding order) of the CTUs in a slice is, for example, raster scan order. Each slice also includes a slice header and coded data. The slice header may describe the characteristics of the slice, such as the address of the first CTU in the slice and the slice type.

[0121] A tile is a unit of rectangular area that makes up a picture. A number called TileId may be assigned to each tile in raster scan order.

[0122] FIG. 4 is a diagram illustrating an example of a tile configuration. For example, a picture includes 11×8 CTUs and is divided into four rectangular tiles (tiles 1-4). When tiles are used, the processing order of the CTUs is changed compared to when tiles are not used. When tiles are not used, multiple CTUs in a picture are processed, for example, in raster scan order. When tiles are used, at least one CTU in each of multiple tiles is processed, for example, in raster scan order. For example, as shown in FIG. 4, the processing order of the multiple CTUs included in tile 1 is from the left end of the first column of tile 1 to the right end of the first column of tile 1, and then from the left end of the second column of tile 1 to the right end of the second column of tile 1.

[0123] It should be noted that one tile may include one or more slices, and one slice may include one or more tiles.

[0124] Note that a picture may be composed of tile sets. A tile set may include one or more tile groups or one or more tiles. A picture may be composed of only one of tile sets, tile groups, and tiles. For example, the order in which multiple tiles for each tile set are scanned in raster order is defined as the basic coding order of the tiles. A collection of one or more tiles in each tile set that follow the basic coding order is defined as a tile group. Such a picture may be composed by the dividing unit 102 (see FIG. 7 ), which will be described later.

[0125] [Scalable Coding] FIGS. 5 and 6 are diagrams showing an example of the structure of a scalable stream.

[0126] As shown in FIG. 5 , the encoding device 100 may generate a temporally / spatially scalable stream by encoding each of a plurality of pictures into one of a plurality of layers. For example, the encoding device 100 may achieve scalability by encoding pictures layer by layer, where an enhancement layer exists above a base layer. This coding of each picture is called scalable coding. This allows the decoding device 200 to switch the image quality of the image displayed by decoding the stream. That is, the decoding device 200 determines up to which layer to decode based on internal factors such as its own performance and external factors such as the state of the communication bandwidth. As a result, the decoding device 200 can freely switch between low-resolution content and high-resolution content and decode the same content. For example, a user of the stream may watch a video stream partway through using a smartphone while on the move, and then watch the rest of the video using a device such as an Internet TV after returning home. Note that the above-mentioned smartphone and device each incorporate a decoding device 200 with the same or different performance. In this case, if the device decodes the upper layers of the stream, the user can view high-quality video after returning home. This eliminates the need for the encoding device 100 to generate multiple streams with the same content but different image qualities, thereby reducing the processing load.

[0127] Furthermore, the enhancement layer may include meta-information based on image statistical information, etc. The decoding device 200 may generate high-quality moving images by super-resolving pictures in the base layer based on the meta-information. Super-resolution may be either an improvement in the signal-to-noise (SN) ratio at the same resolution or an increase in resolution. The meta-information may include information for specifying linear or nonlinear filter coefficients used in the super-resolution process, or information for specifying parameter values ​​in the filter process, machine learning, or least-squares calculation used in the super-resolution process.

[0128] Alternatively, a picture may be divided into tiles or the like according to the meaning of each object in the picture. In this case, the decoding device 200 may decode only a portion of the picture by selecting tiles to be decoded. Furthermore, attributes of objects (such as a person, a car, or a ball) and their positions within the picture (such as coordinate positions within the same picture) may be stored as meta information. In this case, the decoding device 200 can identify the position of a desired object based on the meta information and determine the tile containing the object. For example, as shown in FIG. 6 , the meta information is stored using a data storage structure different from that of image data, such as SEI in HEVC. This meta information indicates, for example, the position, size, or color of the main object.

[0129] Furthermore, the meta information may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units, etc. This allows the decoding device 200 to obtain the time at which a specific person appears in a video, and by using the time and the information in units of pictures, it is possible to identify the picture in which the object exists and the position of the object within that picture.

[0130] [Encoding Device] Next, a description will be given of an encoding device 100 according to an embodiment. Fig. 7 is a block diagram showing an example of the configuration of the encoding device 100 according to an embodiment. The encoding device 100 encodes an image in units of blocks.

[0131] 7, the encoding device 100 is a device that encodes an image in units of blocks, and includes a division unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, a prediction control unit 128, and a prediction parameter generation unit 130. Note that the intra prediction unit 124 and the inter prediction unit 126 are each configured as part of a prediction processing unit.

[0132] [Implementation Example of Encoding Device] Fig. 8 is a block diagram showing an implementation example of the encoding device 100. The encoding device 100 includes a processor a1 and a memory a2. For example, several components of the encoding device 100 shown in Fig. 7 are implemented by the processor a1 and the memory a2 shown in Fig. 8.

[0133] The processor a1 is a circuit that performs information processing and is a circuit that can access the memory a2. For example, the processor a1 is a dedicated or general-purpose electronic circuit that encodes images. The processor a1 may be a processor such as a CPU. The processor a1 may also be a collection of multiple electronic circuits. For example, the processor a1 may fulfill the roles of multiple components of the encoding device 100 shown in FIG. 7 , excluding the components for storing information.

[0134] The memory a2 is a dedicated or general-purpose memory that stores information used by the processor a1 to encode images. The memory a2 may be an electronic circuit and may be connected to the processor a1. The memory a2 may also be included in the processor a1. The memory a2 may also be a collection of multiple electronic circuits. The memory a2 may also be a magnetic disk, an optical disk, or the like, and may also be expressed as storage, a recording medium, or the like. The memory a2 may also be a non-volatile memory or a volatile memory.

[0135] For example, the memory a2 may store an image to be encoded, or a stream corresponding to the encoded image, or may store a program for the processor a1 to encode the image.

[0136] Furthermore, for example, the memory a2 may serve as a component for storing information among the multiple components of the encoding device 100 shown in Fig. 7. Specifically, the memory a2 may serve as the block memory 118 and the frame memory 122 shown in Fig. 7. More specifically, the memory a2 may store a reconstructed image (specifically, a reconstructed block or a reconstructed picture, etc.).

[0137] 7 may not be implemented in the encoding device 100, and all of the above-described processes may not be performed. Some of the components shown in Fig. 7 may be included in another device, and some of the above-described processes may be performed by another device.

[0138] Below, the overall processing flow of the encoding device 100 will be explained, and then each component included in the encoding device 100 will be explained.

[0139] [Overall Flow of Encoding Process] FIG. 9 is a flowchart showing an example of the overall encoding process performed by the encoding device 100.

[0140] First, the division unit 102 of the encoding device 100 divides a picture included in an original image into a plurality of fixed-size blocks (128 x 128 pixels) (step Sa_1). Then, the division unit 102 selects a division pattern for the fixed-size blocks (step Sa_2). That is, the division unit 102 further divides the fixed-size block into a plurality of blocks that constitute the selected division pattern. Then, the encoding device 100 performs the processes of steps Sa_3 to Sa_9 for each of the plurality of blocks.

[0141] The prediction processing unit, which is made up of the intra prediction unit 124 and the inter prediction unit 126, and the prediction control unit 128 generate a predicted image of the current block (step Sa_3). Note that the predicted image is also called a predicted signal, a predicted block, or a predicted sample.

[0142] Next, the subtraction unit 104 generates a difference between the current block and the predicted image as a prediction residual (step Sa_4). Note that the prediction residual is also called a prediction error.

[0143] Next, the transform unit 106 and the quantization unit 108 perform transform and quantization on the predicted image to generate a plurality of quantized coefficients (step Sa_5).

[0144] Next, the entropy coding unit 110 generates a stream by performing coding (specifically, entropy coding) on ​​the plurality of quantized coefficients and prediction parameters related to generation of a predicted image (step Sa_6).

[0145] Next, the inverse quantization unit 112 and the inverse transform unit 114 perform inverse quantization and inverse transform on the plurality of quantized coefficients to reconstruct the prediction residuals (step Sa_7).

[0146] Next, the adder 116 reconstructs the current block by adding the predicted image to the restored prediction residual (step Sa_8). This generates a reconstructed image. Note that the reconstructed image is also called a reconstructed block, and in particular, the reconstructed image generated by the encoding device 100 is also called a locally decoded block or a locally decoded image.

[0147] Once this reconstructed image is generated, the loop filter unit 120 performs filtering on the reconstructed image as needed (step Sa_9).

[0148] Then, the encoding device 100 determines whether encoding of the entire picture is complete (step Sa_10), and if it determines that encoding is not complete (No in step Sa_10), it repeats the process from step Sa_2.

[0149] In the above example, the encoding device 100 selects one division pattern for fixed-size blocks and encodes each block according to that division pattern, but it may also encode each block according to each of a plurality of division patterns. In this case, the encoding device 100 may evaluate the cost for each of the plurality of division patterns and select, for example, the stream obtained by encoding according to the division pattern with the smallest cost as the stream to be finally output.

[0150] Furthermore, the processing of steps Sa_1 to Sa_10 may be performed sequentially by the encoding device 100, or some of the processing may be performed in parallel, or the order of the processing may be changed.

[0151] The coding process performed by the coding device 100 is hybrid coding that uses predictive coding and transform coding. The predictive coding is performed by a coding loop that includes a subtraction unit 104, a transform unit 106, a quantization unit 108, an inverse quantization unit 112, an inverse transform unit 114, an addition unit 116, a loop filter unit 120, a block memory 118, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128. In other words, the prediction processing unit that includes the intra prediction unit 124 and the inter prediction unit 126 forms part of the coding loop.

[0152] [Divider] The divider 102 divides each picture included in the original image into multiple blocks and outputs each block to the subtractor 104. For example, the divider 102 first divides the picture into blocks of a fixed size (e.g., 128x128 pixels). These fixed-size blocks may be called coding tree units (CTUs). The divider 102 then divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 pixels or less), for example, based on recursive quadtree and / or binary tree block division. That is, the divider 102 selects a division pattern. These variable-size blocks may be called coding units (CUs), prediction units (PUs), or transform units (TUs). Note that in various implementation examples, CUs, PUs, and TUs do not need to be distinguished, and some or all of the blocks in a picture may be the processing unit of a CU, PU, ​​or TU.

[0153] 10 is a diagram showing an example of block division according to an embodiment, in which solid lines represent block boundaries based on quadtree block division, and dashed lines represent block boundaries based on binary tree block division.

[0154] Here, the block 10 is a square block of 128x128 pixels. This block 10 is first divided into four square blocks of 64x64 pixels (quadtree block division).

[0155] The upper left square block of 64x64 pixels is further divided vertically into two rectangular blocks of 32x64 pixels each, and the left 32x64 pixel rectangular block is further divided vertically into two rectangular blocks of 16x64 pixels each (binary tree block division). As a result, the upper left square block of 64x64 pixels is divided into two rectangular blocks of 16x64 pixels 11 and 12, and a rectangular block of 32x64 pixels 13.

[0156] The upper right square block of 64x64 pixels is divided horizontally into two rectangular blocks 14 and 15 each of 64x32 pixels (binary tree block division).

[0157] The lower-left 64x64 square block is divided into four 32x32 pixel square blocks (quadtree block division). Of the four 32x32 pixel square blocks, the upper-left and lower-right blocks are further divided. The upper-left 32x32 pixel square block is divided vertically into two 16x32 pixel rectangular blocks, and the right 16x32 pixel rectangular block is further divided horizontally into two 16x16 pixel square blocks (binary tree block division). The lower-right 32x32 pixel square block is divided horizontally into two 32x16 pixel rectangular blocks (binary tree block division). As a result, the lower left square block of 64x64 pixels is divided into a rectangular block 16 of 16x32 pixels, two square blocks 17 and 18 each of 16x16 pixels, two square blocks 19 and 20 each of 32x32 pixels, and two rectangular blocks 21 and 22 each of 32x16 pixels.

[0158] The bottom right block 23 consisting of 64x64 pixels is not divided.

[0159] 10, block 10 is divided into 13 variable-sized blocks 11 to 23 based on recursive quad-tree and binary tree block division. This type of division is sometimes called QTBT (quad-tree plus binary tree) division.

[0160] 10, one block is divided into four or two blocks (quadtree or binary tree block division), but the division is not limited to this. For example, one block may be divided into three blocks (ternary tree block division). Division including such ternary tree block division is sometimes called MBT (multi type tree) division.

[0161] Fig. 11 is a diagram showing an example of the configuration of the division unit 102. As shown in Fig. 11, the division unit 102 may include a block division determination unit 102a. The block division determination unit 102a may perform the following processing, for example.

[0162] The block division determination unit 102a collects block information from, for example, the block memory 118 or the frame memory 122, and determines the above-mentioned division pattern based on the block information. The division unit 102 divides the original image in accordance with the division pattern, and outputs one or more blocks obtained by the division to the subtraction unit 104.

[0163] Furthermore, the block division determination unit 102a outputs, for example, parameters indicating the above-mentioned division pattern to the transform unit 106, the inverse transform unit 114, the intra prediction unit 124, the inter prediction unit 126, and the entropy coding unit 110. The transform unit 106 may transform prediction residuals based on the parameters, and the intra prediction unit 124 and the inter prediction unit 126 may generate predicted images based on the parameters. Furthermore, the entropy coding unit 110 may perform entropy coding on the parameters.

[0164] As an example, parameters related to the division pattern may be written to the stream as follows:

[0165] 12 is a diagram showing examples of division patterns, such as quarter division (QT) in which a block is divided into two parts each in the horizontal and vertical directions, three divisions (HT or VT) in which a block is divided in the same direction at a ratio of 1:2:1, two divisions (HB or VB) in which a block is divided in the same direction at a ratio of 1:1, and no division (NS).

[0166] In the case of four-division and no division, the division pattern does not have a block division direction, whereas in the case of two-division and three-division, the division pattern has division direction information.

[0167] 13A and 13B are diagrams showing examples of syntax trees for division patterns. In the example of FIG. 13A , first, there is information indicating whether or not division is to be performed (S: Split flag), followed by information indicating whether or not division into four is to be performed (QT: QT flag). Next, there is information indicating whether or not division into three or two is to be performed (TT: TT flag or BT: BT flag), and finally there is information indicating the division direction (Ver: Vertical flag or Hor: Horizontal flag). It should be noted that further division may be repeatedly applied using a similar process to each of one or more blocks obtained by division using such a division pattern. That is, as an example, it is possible to recursively determine whether or not division is to be performed, whether or not division into four is to be performed, whether the division method is horizontal or vertical, and whether or not division into three or two is to be performed, and to encode the results of the determinations into a stream according to the encoding order disclosed in the syntax tree shown in FIG. 13A .

[0168] In addition, in the syntax tree shown in Fig. 13A, the information is arranged in the order of S, QT, TT, and Ver, but the information may also be arranged in the order of S, QT, Ver, and BT. That is, in the example of Fig. 13B, first there is information indicating whether or not splitting is to be performed (S: Split flag), then there is information indicating whether or not splitting into four (QT: QT flag). Next there is information indicating the split direction (Ver: Vertical flag or Hor: Horizontal flag), and finally there is information indicating whether splitting into two or three (BT: BT flag or TT: TT flag).

[0169] The division patterns described here are merely examples, and division patterns other than those described may be used, or only some of the division patterns described may be used.

[0170] [Subtraction Unit] The subtraction unit 104 subtracts a predicted image (a predicted image input from the prediction control unit 128) from the original image, for each block input from the division unit 102. That is, the subtraction unit 104 calculates a prediction residual of the current block. The subtraction unit 104 then outputs the calculated prediction residual to the conversion unit 106.

[0171] The original image is an input signal to the encoding device 100, and is, for example, a signal (for example, a luma signal and two chroma signals) representing the image of each picture that makes up a moving image.

[0172] [Transform Unit] The transform unit 106 transforms the spatial domain prediction residual into frequency domain transform coefficients and outputs the transform coefficients to the quantization unit 108. Specifically, the transform unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the spatial domain prediction residual.

[0173] The transform unit 106 may adaptively select a transform type from among a plurality of transform types and transform the prediction residuals into transform coefficients using a transform basis function corresponding to the selected transform type. Such a transform may be called an explicit multiple core transform (EMT) or an adaptive multiple transform (AMT). The transform basis function may also be simply called a basis.

[0174] The multiple transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. These transform types may be denoted as DCT2, DCT5, DCT8, DST1, and DST7, respectively. FIG. 14 is a table showing transform basis functions corresponding to each transform type. In FIG. 14, N indicates the number of input pixels. Selection of a transform type from among these multiple transform types may depend, for example, on the type of prediction (intra prediction, inter prediction, etc.) or on the intra prediction mode.

[0175] Information indicating whether EMT or AMT is applied (e.g., referred to as an EMT flag or an AMT flag) and information indicating the selected transform type are typically signaled at the CU level, although the signaling of this information does not need to be limited to the CU level and may be at other levels (e.g., the sequence level, picture level, slice level, brick level, or CTU level).

[0176] Furthermore, the transform unit 106 may retransform the transform coefficients (i.e., the transform results). Such retransformation may be referred to as adaptive secondary transform (AST) or non-separable secondary transform (NSST). For example, the transform unit 106 performs retransformation for each sub-block (e.g., a 4x4 pixel sub-block) included in a block of transform coefficients corresponding to intra-prediction residuals. Information indicating whether or not to apply NSST and information regarding the transform matrix used for NSST are typically signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., the sequence level, picture level, slice level, brick level, or CTU level).

[0177] Separable transformation and non-separable transformation may be applied to the transformation unit 106. Separable transformation is a method of separating the input into directions for the number of dimensions and performing transformation multiple times, and non-separable transformation is a method of treating two or more dimensions of a multidimensional input as one dimension and performing transformation collectively.

[0178] For example, an example of a non-separable transformation is one in which, if the input is a 4x4 pixel block, it is treated as a single array with 16 elements, and transformation processing is performed on that array using a 16x16 transformation matrix.

[0179] In addition, in another example of a non-separable transform, a 4x4 pixel input block may be treated as a single array having 16 elements, and then a transform (Hypercube Givens Transform) may be performed in which Givens rotation is performed multiple times on the array.

[0180] In the transformation performed by the transformation unit 106, it is also possible to switch the transformation type of the transformation basis function used for transformation into the frequency domain depending on the region in the CU. One example is SVT (Spatially Varying Transform).

[0181] FIG. 15 is a diagram illustrating an example of an SVT.

[0182] In SVT, as shown in Fig. 15 , a CU is divided into two equal parts horizontally or vertically, and only one of the two regions is transformed into the frequency domain. A transform type may be set for each region; for example, DST7 and DCT8 are used. For example, of the two regions obtained by dividing a CU into two equal parts vertically, DST7 and DCT8 may be used for the region at position 0. Alternatively, DST7 is used for the region at position 1. Similarly, of the two regions obtained by dividing a CU into two equal parts horizontally, DST7 and DCT8 are used for the region at position 0. Alternatively, DST7 is used for the region at position 1. In the example shown in Fig. 15 , only one of the two regions in the CU is transformed, and the other is not, but transformation may also be performed on each of the two regions. Furthermore, the division method may include not only dividing into two equal parts, but also dividing into four equal parts. Furthermore, it is also possible to make it more flexible by encoding information indicating the partitioning method and signaling it in the same way as CU partitioning. Note that SVT is also sometimes called SBT (Sub-block Transform).

[0183] The above-mentioned AMT and EMT may also be referred to as MTS (Multiple Transform Selection). When MTS is applied, a transform type such as DST7 or DCT8 can be selected, and information indicating the selected transform type may be coded as index information for each CU. On the other hand, there is a process called IMTS (Implicit MTS) that selects a transform type to be used for orthogonal transform based on the shape of the CU without coding index information. When IMTS is applied, for example, if the shape of the CU is rectangular, the short side of the rectangle is orthogonally transformed using DST7, and the long side is orthogonally transformed using DCT2. Also, for example, if the shape of the CU is square, if MTS is enabled in the sequence, DCT2 is used, and if MTS is disabled, DST7 is used for orthogonal transform. DCT2 and DST7 are merely examples, and other transform types may be used, or different combinations of transform types may be used. The IMTS may be available only for intra-predicted blocks, or may be available for both intra-predicted and inter-predicted blocks.

[0184] The above describes three selection processes, MTS, SBT, and IMTS, as selection processes for selectively switching the transform type used in the orthogonal transform. However, all three selection processes may be enabled, or only some of the selection processes may be selectively enabled. Whether each selection process is enabled can be identified by flag information in a header such as SPS. For example, if all three selection processes are enabled, one of the three selection processes is selected for each CU to perform the orthogonal transform. Note that the selection process for selectively switching the transform type may use a selection process different from the above three selection processes, or each of the above three selection processes may be replaced with a different process, as long as at least one of the following four functions [1] to [4] can be realized. Function [1] is a function for orthogonally transforming the entire range within a CU and encoding information indicating the transform type used for the transform. Function [2] is a function for orthogonally transforming the entire range of a CU and determining the transform type based on a predetermined rule without encoding information indicating the transform type. Function [3] is a function for orthogonally transforming a partial region of a CU and encoding information indicating the transform type used for the transform. Function [4] is a function for orthogonally transforming a partial region of a CU and determining the transform type based on a predetermined rule without encoding information indicating the transform type used for the transform.

[0185] Note that whether or not to apply each of the MTS, IMTS, and SBT may be determined for each processing unit, such as a sequence unit, a picture unit, a brick unit, a slice unit, a CTU unit, or a CU unit.

[0186] The tool for selectively switching between transformation types in the present disclosure may be rephrased as a method for adaptively selecting a basis to be used in a transformation process, a selection process, or a process for selecting a basis. The tool for selectively switching between transformation types may also be rephrased as a mode for adaptively selecting a transformation type.

[0187] FIG. 16 is a flowchart showing an example of processing by the conversion unit 106.

[0188] For example, the transform unit 106 determines whether or not to perform an orthogonal transform (step St_1). Here, if the transform unit 106 determines to perform an orthogonal transform (Yes in step St_1), it selects a transform type to be used for the orthogonal transform from multiple transform types (step St_2). Next, the transform unit 106 performs an orthogonal transform by applying the selected transform type to the prediction residual of the current block (step St_3). Then, the transform unit 106 outputs information indicating the selected transform type to the entropy coding unit 110, thereby causing the information to be coded (step St_4). On the other hand, if the transform unit 106 determines not to perform an orthogonal transform (No in step St_1), it outputs information indicating that an orthogonal transform will not be performed to the entropy coding unit 110, thereby causing the information to be coded (step St_5). Note that the determination of whether or not to perform an orthogonal transform in step St_1 may be made based on, for example, the size of the transform block, the prediction mode applied to the CU, etc. Alternatively, the information indicating the transform type used for the orthogonal transform may not be coded, and the orthogonal transform may be performed using a predefined transform type.

[0189] Fig. 17 is a flowchart showing another example of processing by the transform unit 106. Note that the example shown in Fig. 17 is an example of orthogonal transform in the case where a method of selectively switching the transform type used for orthogonal transform is applied, similar to the example shown in Fig. 16 .

[0190] As an example, the first transform type group may include DCT2, DST7, and DCT8. As another example, the second transform type group may include DCT2. The transform types included in the first transform type group and the second transform type group may partially overlap, or may all be different transform types.

[0191] Specifically, the transform unit 106 determines whether the transform size is equal to or less than a predetermined value (step Su_1). If it is determined that the transform size is equal to or less than the predetermined value (Yes in step Su_1), the transform unit 106 performs an orthogonal transform on the prediction residual of the current block using a transform type included in the first transform type group (step Su_2). Next, the transform unit 106 outputs information indicating which transform type to use from one or more transform types included in the first transform type group to the entropy coding unit 110, thereby causing the information to be coded (step Su_3). On the other hand, if the transform unit 106 determines that the transform size is not equal to or less than the predetermined value (No in step Su_1), the transform unit 106 performs an orthogonal transform on the prediction residual of the current block using a second transform type group (step Su_4).

[0192] In step Su_3, the information indicating the transform type used for the orthogonal transform may be information indicating a combination of a transform type to be applied to the vertical direction of the current block and a transform type to be applied to the horizontal direction of the current block. Alternatively, the first transform type group may include only one transform type, and the information indicating the transform type to be used for the orthogonal transform may not be encoded. The second transform type group may include multiple transform types, and the information indicating the transform type to be used for the orthogonal transform, among the one or more transform types included in the second transform type group, may be encoded.

[0193] Alternatively, the transform type may be determined based only on the transform size. Note that the process is not limited to determining whether the transform size is equal to or smaller than a predetermined value, as long as the process determines the transform type to be used for the orthogonal transform based on the transform size.

[0194] [Quantization Unit] The quantization unit 108 quantizes the transform coefficients output from the transform unit 106. Specifically, the quantization unit 108 scans the multiple transform coefficients of the current block in a predetermined scanning order and quantizes the multiple transform coefficients based on quantization parameters (QP) corresponding to the scanned transform coefficients. The quantization unit 108 then outputs the multiple 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.

[0195] The predetermined scanning order is an order for quantizing / dequantizing the transform coefficients, for example, the predetermined scanning order is defined as an ascending order (low to high frequencies) or a descending order (high to low frequencies).

[0196] The quantization parameter (QP) is a parameter that defines the quantization step (quantization width). For example, as the value of the quantization parameter increases, the quantization step also increases. In other words, as the value of the quantization parameter increases, the error of the quantized coefficient (quantization error) also increases.

[0197] In addition, a quantization matrix may be used for quantization. For example, several types of quantization matrices may be used corresponding to frequency transform sizes such as 4x4 and 8x8, prediction modes such as intra prediction and inter prediction, and pixel components such as luminance and chrominance. Note that quantization refers to digitizing values ​​sampled at predetermined intervals by associating them with predetermined levels, and in this technical field, expressions such as rounding, rounding, or scaling may also be used.

[0198] There are two methods for using a quantization matrix: one is to use a quantization matrix that is directly set on the encoding device 100 side, and the other is to use a default quantization matrix (default matrix). By directly setting a quantization matrix on the encoding device 100 side, it is possible to set a quantization matrix that corresponds to the characteristics of the image. However, this has the disadvantage that the amount of code increases due to encoding of the quantization matrix. Note that instead of using the default quantization matrix or an encoded quantization matrix as is, a quantization matrix to be used for quantizing the current block may be generated based on the default quantization matrix or an encoded quantization matrix.

[0199] On the other hand, there is also a method that does not use a quantization matrix and quantizes the coefficients of both high-frequency components and low-frequency components in the same way. Note that this method is equivalent to using a quantization matrix in which all coefficients have the same value (a flat matrix).

[0200] The quantization matrix may be coded, for example, at the sequence level, picture level, slice level, brick level or CTU level.

[0201] When using a quantization matrix, the quantization unit 108 scales, for example, a quantization width calculated from a quantization parameter or the like for each transform coefficient using the value of the quantization matrix. Quantization processing performed without using a quantization matrix may be processing in which the transform coefficients are quantized based on a quantization width calculated from a quantization parameter or the like. Note that in quantization processing performed without using a quantization matrix, the quantization width may be multiplied by a predetermined value that is common to all transform coefficients in a block.

[0202] FIG. 18 is a block diagram showing an example of the configuration of the quantization unit 108.

[0203] The quantization unit 108 includes, for example, a differential quantization parameter generation unit 108a, a predicted quantization parameter generation unit 108b, a quantization parameter generation unit 108c, a quantization parameter storage unit 108d, and a quantization processing unit 108e.

[0204] FIG. 19 is a flowchart showing an example of quantization by the quantization unit 108.

[0205] As an example, the quantization unit 108 may perform quantization for each CU based on the flowchart shown in Fig. 19. Specifically, the quantization parameter generation unit 108c determines whether or not to perform quantization (step Sv_1). If it determines to perform quantization (Yes in step Sv_1), the quantization parameter generation unit 108c generates a quantization parameter for the current block (step Sv_2) and stores the quantization parameter in the quantization parameter storage unit 108d (step Sv_3).

[0206] Next, the quantization processing unit 108e quantizes the transform coefficients of the current block using the quantization parameter generated in step Sv_2 (step Sv_4). The predicted quantization parameter generation unit 108b then acquires a quantization parameter for a processing unit different from that of the current block from the quantization parameter storage unit 108d (step Sv_5). The predicted quantization parameter generation unit 108b generates a predicted quantization parameter for the current block based on the acquired quantization parameter (step Sv_6). The differential quantization parameter generation unit 108a calculates the difference between the quantization parameter for the current block generated by the quantization parameter generation unit 108c and the predicted quantization parameter for the current block generated by the predicted quantization parameter generation unit 108b (step Sv_7). The differential quantization parameter is generated by calculating this difference. The differential quantization parameter generation unit 108a outputs the differential quantization parameter to the entropy coding unit 110, causing the entropy coding unit 110 to encode the differential quantization parameter (step Sv_8).

[0207] The differential quantization parameter may be coded at the sequence level, picture level, slice level, brick level, or CTU level. Also, the initial value of the quantization parameter may be coded at the sequence level, picture level, slice level, brick level, or CTU level. In this case, the quantization parameter may be generated using the initial value of the quantization parameter and the differential quantization parameter.

[0208] The quantization unit 108 may include a plurality of quantizers, and may apply dependent quantization, which quantizes transform coefficients using a quantization method selected from a plurality of quantization methods.

[0209] [Entropy Encoding Unit] FIG. 20 is a block diagram showing an example of the configuration of the entropy encoding unit 110. As shown in FIG.

[0210] The entropy coding unit 110 generates a stream by entropy coding the quantization coefficients input from the quantization unit 108 and the prediction parameters input from the prediction parameter generation unit 130. For example, CABAC (Context-based Adaptive Binary Arithmetic Coding) is used for the entropy coding. Specifically, the entropy coding unit 110 includes, for example, a binarization unit 110a, a context control unit 110b, and a binary arithmetic coding unit 110c. The binarization unit 110a performs binarization, converting multi-value signals such as the quantization coefficients and the prediction parameters into binary signals. Examples of binarization methods include truncated rice binarization, exponential Golomb codes, and fixed length binarization. The context control unit 110b derives a context value, i.e., the probability of occurrence of a binary signal, based on the characteristics of a syntax element or the surrounding circumstances. Methods for deriving this context value include, for example, bypassing, referencing a syntax element, referencing an upper or left adjacent block, referencing hierarchical information, and others. The binary arithmetic coding unit 110c performs arithmetic coding on the binarized signal using the derived context value.

[0211] FIG. 21 is a diagram showing the flow of CABAC in the entropy coding unit 110.

[0212] First, initialization is performed in the CABAC in the entropy coding unit 110. This initialization involves initialization of the binary arithmetic coding unit 110c and setting of initial context values. Then, the binarization unit 110a and the binary arithmetic coding unit 110c sequentially perform binarization and arithmetic coding on, for example, each of the multiple quantized coefficients of a CTU. At this time, the context control unit 110b updates the context values ​​every time arithmetic coding is performed. Then, as post-processing, the context control unit 110b saves the context values. The saved context values ​​are used, for example, as the initial context values ​​for the next CTU.

[0213] [Inverse Quantization Unit] The inverse quantization unit 112 inverse quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse quantizes the quantized coefficients of the current block in a predetermined scanning order. The inverse quantization unit 112 then outputs the inverse quantized transform coefficients of the current block to the inverse transform unit 114.

[0214] [Inverse Transform Unit] The inverse transform unit 114 reconstructs the prediction residual by inverse transforming the transform coefficients input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 reconstructs the prediction residual of the current block by performing an inverse transform on the transform coefficients corresponding to the transform performed by the transform unit 106. Then, the inverse transform unit 114 outputs the reconstructed prediction residual to the adder unit 116.

[0215] Note that the restored prediction residual usually loses information due to quantization, and therefore does not match the prediction error calculated by the subtraction unit 104. In other words, the restored prediction residual usually contains quantization error.

[0216] The adder 116 reconstructs the current block by adding the prediction residual input from the inverse transformer 114 and the predicted image input from the prediction control unit 128. As a result, a reconstructed image is generated. The adder 116 then outputs the reconstructed image to the block memory 118 and the loop filter unit 120.

[0217] [Block Memory] The block memory 118 is a storage unit for storing, for example, blocks in the current picture that are referenced in intra prediction. Specifically, the block memory 118 stores the reconstructed image output from the adder 116.

[0218] [Frame Memory] The frame memory 122 is a storage unit for storing, for example, reference pictures used in inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 122 stores the reconstructed image filtered by the loop filter unit 120.

[0219] [Loop Filter Unit] The loop filter unit 120 performs loop filtering on the reconstructed image output from the adder 116, and outputs the filtered reconstructed image to the frame memory 122. A loop filter is a filter (in-loop filter) used within the encoding loop, and includes, for example, an adaptive loop filter (ALF), a deblocking filter (DF or DBF), and a sample adaptive offset (SAO).

[0220] FIG. 22 is a block diagram showing an example of the configuration of the loop filter unit 120.

[0221] As shown in FIG. 22 , the loop filter unit 120 includes a deblocking filter processing unit 120a, an SAO processing unit 120b, and an ALF processing unit 120c. The deblocking filter processing unit 120a performs the deblocking filter processing described above on the reconstructed image. The SAO processing unit 120b performs the SAO processing described above on the reconstructed image after the deblocking filter processing. The ALF processing unit 120c applies the ALF processing described above to the reconstructed image after the SAO processing. Details of the ALF and deblocking filter will be described later. The SAO processing is a process for improving image quality by reducing ringing (a phenomenon in which pixel values ​​around edges are distorted in a wavy manner) and correcting pixel value deviations. Examples of this SAO processing include edge offset processing and band offset processing. Note that the loop filter unit 120 does not need to include all of the processing units disclosed in FIG. 22 , and may include only some of the processing units. Furthermore, the loop filter unit 120 may be configured to perform the above-described processes in an order different from the processing order disclosed in FIG.

[0222] [Loop Filter > Adaptive Loop Filter] In ALF, a least square error filter is applied to remove coding artifacts. For example, for each 2x2 pixel sub-block in the current block, one filter is selected from among multiple filters based on the local gradient direction and activity.

[0223] Specifically, first, subblocks (e.g., 2x2 pixel subblocks) are classified into multiple classes (e.g., 15 or 25 classes). The subblocks are classified based on, for example, the gradient direction and activity. In a specific example, a classification value C (e.g., C=5D+A) is calculated using a gradient direction value D (e.g., 0 to 2 or 0 to 4) and a gradient activity value A (e.g., 0 to 4). Then, the subblocks are classified into multiple classes based on the classification value C.

[0224] The gradient direction value D is derived, for example, by comparing gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions), and the gradient activity value A is derived, for example, by adding gradients in multiple directions and quantizing the sum.

[0225] Based on the result of such classification, a filter for the sub-block is determined from among a plurality of filters.

[0226] The shape of the filter used in ALF is, for example, a circularly symmetric shape. Figures 23A to 23C are diagrams showing several examples of filter shapes used in ALF. Figure 23A shows a 5x5 diamond-shaped filter, Figure 23B shows a 7x7 diamond-shaped filter, and Figure 23C shows a 9x9 diamond-shaped filter. Information indicating the filter shape is usually signaled at the picture level. Note that signaling of information indicating the filter shape does not need to be limited to the picture level, and may be at other levels (e.g., sequence level, slice level, brick level, CTU level, or CU level).

[0227] Whether ALF is on or off may be determined, for example, at the picture level or the CU level. For example, whether ALF is applied for luminance may be determined at the CU level, and whether ALF is applied for chrominance may be determined at the picture level. Information indicating whether ALF is on or off is usually signaled at the picture level or the CU level. Note that the signaling of information indicating whether ALF is on or off does not need to be limited to the picture level or the CU level, and may be at other levels (e.g., the sequence level, the slice level, the brick level, or the CTU level).

[0228] As described above, one filter is selected from a plurality of filters to perform ALF processing on a sub-block. For each of the plurality of filters (e.g., up to 15 or 25 filters), a coefficient set consisting of a plurality of coefficients used in that filter is typically signaled at the picture level. Note that the signaling of the coefficient set does not need to be limited to the picture level, and may be at other levels (e.g., sequence level, slice level, brick level, CTU level, CU level, or sub-block level).

[0229] [Loop Filter > Cross Component Adaptive Loop Filter] Fig. 23D shows an example where a Y sample (first component) is used for the Cb CCALF and the Cr CCALF (multiple components different from the first component), and Fig. 23E shows a diamond-shaped filter.

[0230] One example of CC-ALF operates by applying a linear diamond-shaped filter (Figures 23D and 23E) to the luma channel of each chroma component. For example, the filter coefficients are transmitted in APS, scaled by a factor of 2^10, and rounded to a fixed-point representation. The application of the filter is controlled by variable block sizes and signaled by context-coded flags received for each block of samples. The block size and CC-ALF enable flag are received at the slice level for each chroma component. The syntax and semantics of CC-ALF are provided in the Appendix. Contributions support block sizes of 16x16, 32x32, 64x64, and 128x128 (for chroma samples).

[0231] [Loop Filter>Joint Chroma Cross Component Adaptive Loop Filter] Fig. 23F is a diagram showing an example of JC-CCALF, and Fig. 23G is a diagram showing examples of weight_index candidates for JC-CCALF.

[0232] One example of JC-CCALF uses only one CCALF filter to generate one CCALF filter output as a color difference adjustment signal for only one color component, and applies an appropriately weighted version of the same color difference adjustment signal to the other color component, thus roughly halving the complexity of existing CCALFs.

[0233] The weight value is coded into a sign flag and a weight index. The weight index (denoted weight_index) is coded into 3 bits and specifies the magnitude of the JC-CCALF weight JcCcWeight. It cannot be equal to 0. The magnitude of JcCcWeight is determined as follows:

[0234] If weight_index is less than or equal to 4, then JcCcWeight is equal to weight_index>>2.

[0235] Otherwise, JcCcWeight is equal to 4 / (weight_index-4).

[0236] There are separate block-level on / off controls for Cb and Cr ALF filtering. This is the same as CCALF, where two separate sets of block-level on / off control flags are coded. Here, unlike CCALF, the Cb and Cr on / off control block sizes are the same, so only one block size variable is coded.

[0237] [Loop Filter Unit>Deblocking Filter] In deblocking filtering, the loop filter unit 120 reduces distortion occurring at block boundaries of the reconstructed image by performing filtering on the block boundaries.

[0238] FIG. 24 is a block diagram showing an example of a detailed configuration of the deblocking filter processing unit 120a.

[0239] The deblocking filtering unit 120 a includes, for example, a boundary determining unit 1201 , a filter determining unit 1203 , a filtering unit 1205 , a processing determining unit 1208 , a filter characteristics determining unit 1207 , and switches 1202 , 1204 , and 1206 .

[0240] The boundary determination unit 1201 determines whether a pixel to be deblocking filtered (i.e., a target pixel) is located near a block boundary, and outputs the determination result to the switch 1202 and the processing determination unit 1208.

[0241] If the boundary determination unit 1201 determines that the target pixel is located near a block boundary, the switch 1202 outputs the image before filtering to the switch 1204. Conversely, if the boundary determination unit 1201 determines that the target pixel is not located near a block boundary, the switch 1202 outputs the image before filtering to the switch 1206. Note that the image before filtering is an image made up of the target pixel and at least one surrounding pixel located around the target pixel.

[0242] The filter determination unit 1203 determines whether or not to perform deblocking filtering on the target pixel based on the pixel value of at least one surrounding pixel around the target pixel, and outputs the determination result to the switch 1204 and the processing determination unit 1208.

[0243] When the filter determination unit 1203 determines that deblocking filtering is to be performed on the target pixel, the switch 1204 outputs the pre-filtering image acquired via the switch 1202 to the filter processing unit 1205. Conversely, when the filter determination unit 1203 determines that deblocking filtering is not to be performed on the target pixel, the switch 1204 outputs the pre-filtering image acquired via the switch 1202 to the switch 1206.

[0244] When the filtering unit 1205 acquires the pre-filtering image via the switches 1202 and 1204, it performs deblocking filtering on the target pixel using the filter characteristics determined by the filter characteristics determination unit 1207. Then, the filtering unit 1205 outputs the filtered pixel to the switch 1206.

[0245] The switch 1206 selectively outputs pixels that have not been subjected to deblocking filtering and pixels that have been subjected to deblocking filtering by the filtering processing unit 1205 under the control of the processing determining unit 1208 .

[0246] The processing determination unit 1208 controls the switch 1206 based on the respective determination results of the boundary determination unit 1201 and the filter determination unit 1203. That is, when the boundary determination unit 1201 determines that the target pixel is located near a block boundary and the filter determination unit 1203 determines that deblocking filtering is to be performed on the target pixel, the processing determination unit 1208 causes the switch 1206 to output a pixel that has been subjected to deblocking filtering. In addition, in cases other than those described above, the processing determination unit 1208 causes the switch 1206 to output a pixel that has not been subjected to deblocking filtering. By repeatedly outputting pixels in this manner, a filtered image is output from the switch 1206. Note that the configuration shown in FIG. 24 is an example of the configuration of the deblocking filtering processing unit 120a, and the deblocking filtering processing unit 120a may have other configurations.

[0247] FIG. 25 is a diagram showing an example of a deblocking filter having filter characteristics that are symmetric with respect to block boundaries.

[0248] In the deblocking filter process, for example, one of two deblocking filters with different characteristics, that is, a strong filter and a weak filter, is selected using pixel values ​​and a quantization parameter. In the strong filter, as shown in Figure 25, when pixels p0 to p2 and pixels q0 to q2 exist on either side of a block boundary, the pixel values ​​of the pixels q0 to q2 are changed to pixel values ​​q'0 to q'2 by performing the calculation shown in the following equation.

[0249] q'0=(p1+2×p0+2×q0+2×q1+q2+4) / 8 q'1=(p0+q0+q1+q2+2) / 4 q'2=(p0+q0+q1+3×q2+2×q3+4) / 8

[0250] In the above equations, p0 to p2 and q0 to q2 are the pixel values ​​of pixels p0 to p2 and pixels q0 to q2, respectively. q3 is the pixel value of pixel q3, which is adjacent to pixel q2 on the opposite side of the block boundary. On the right side of each equation, the coefficients by which the pixel values ​​of each pixel used in the deblocking filter process are multiplied are filter coefficients.

[0251] Furthermore, in the deblocking filter process, clipping may be performed to prevent the pixel value after the operation from changing beyond a threshold. In this clipping process, the pixel value after the operation according to the above formula is clipped to "the pixel value before the operation ±2 × the threshold" using a threshold determined from the quantization parameter. This makes it possible to prevent excessive smoothing.

[0252] Fig. 26 is a diagram for explaining an example of a block boundary on which deblocking filtering is performed, and Fig. 27 is a diagram showing an example of a BS value.

[0253] The block boundary on which the deblocking filter process is performed is, for example, a boundary between CUs, PUs, or TUs in an 8×8 pixel block as shown in Fig. 26. The deblocking filter process is performed in units of, for example, four rows or four columns. First, a Bs (Boundary Strength) value is determined for block P and block Q shown in Fig. 26 as shown in Fig. 27.

[0254] Whether or not to perform deblocking filter processing of different strengths may be determined according to the Bs value in Fig. 27, even for block boundaries belonging to the same image. Deblocking filter processing for color difference signals is performed when the Bs value is 2. Deblocking filter processing for luminance signals is performed when the Bs value is 1 or greater and predetermined conditions are satisfied. Note that the conditions for determining the Bs value are not limited to those shown in Fig. 27, and may be determined based on other parameters.

[0255] 28 is a flowchart showing an example of processing performed by the prediction unit of the encoding device 100. Note that, as an example, the prediction unit is made up of all or some of the components of the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128. The prediction processing unit includes, for example, the intra prediction unit 124 and the inter prediction unit 126.

[0256] The prediction unit generates a predicted image of the current block (step Sb_1). The predicted image may be, for example, an intra-predicted image (intra-predicted signal) or an inter-predicted image (inter-predicted signal). Specifically, the prediction unit generates the predicted image of the current block using a reconstructed image that has already been obtained by generating predicted images for other blocks, generating prediction residuals, generating quantization coefficients, restoring the prediction residuals, and adding the predicted images.

[0257] The reconstructed image may be, for example, an image of a reference picture or an image of a coded block (i.e., the other block) in a current picture, which is a picture including the current block. The coded block in the current picture may be, for example, a neighboring block of the current block.

[0258] FIG. 29 is a flowchart showing another example of the processing performed by the prediction unit of the encoding device 100.

[0259] The prediction unit generates a predicted image using a first method (step Sc_1a), a second method (step Sc_1b), and a third method (step Sc_1c). The first method, the second method, and the third method are different methods for generating predicted images, and may be, for example, an inter-prediction method, an intra-prediction method, or another prediction method. These prediction methods may use the reconstructed image described above.

[0260] Next, the prediction unit evaluates the predicted images generated in steps Sc_1a, Sc_1b, and Sc_1c (step Sc_2). For example, the prediction unit calculates a cost C for each of the predicted images generated in steps Sc_1a, Sc_1b, and Sc_1c, and evaluates the predicted images by comparing the costs C of the predicted images. The cost C is calculated using an RD optimization model formula, for example, C = D + λ × R. In this formula, D is the coding distortion of the predicted image, and is expressed, for example, by the sum of absolute differences between pixel values ​​of the current block and pixel values ​​of the predicted image. R is the bit rate of the stream. λ is, for example, a Lagrange multiplier.

[0261] Next, the prediction unit selects one of the predicted images generated in steps Sc_1a, Sc_1b, and Sc_1c (step Sc_3). That is, the prediction unit selects a method or mode for obtaining a final predicted image. For example, the prediction unit selects the predicted image with the smallest cost C based on the costs C calculated for those predicted images. Alternatively, the evaluation in step Sc_2 and the selection of the predicted image in step Sc_3 may be performed based on parameters used in the encoding process. The encoding device 100 may signal information identifying the selected predicted image, method, or mode in the stream. This information may be, for example, a flag. This allows the decoding device 200 to generate a predicted image according to the method or mode selected by the encoding device 100 based on that information. Note that in the example shown in FIG. 29 , the prediction unit generates predicted images using each method and then selects one of the predicted images. However, before generating those predicted images, the prediction unit may select a method or mode based on parameters used in the encoding process and generate predicted images according to that method or mode.

[0262] For example, the first and second methods may be intra prediction and inter prediction, respectively, and the prediction unit may select a final predicted image for the current block from predicted images generated according to these prediction methods.

[0263] FIG. 30 is a flowchart showing another example of the processing performed by the prediction unit of the encoding device 100.

[0264] First, the prediction unit generates a predicted image by intra prediction (step Sd_1a), and then generates a predicted image by inter prediction (step Sd_1b). Note that the predicted image generated by intra prediction is also called an intra predicted image, and the predicted image generated by inter prediction is also called an inter predicted image.

[0265] Next, the prediction unit evaluates each of the intra-predicted image and the inter-predicted image (step Sd_2). The above-mentioned cost C may be used for this evaluation. The prediction unit may then select, from the intra-predicted image and the inter-predicted image, the predicted image for which the smallest cost C has been calculated as the final predicted image for the current block (step Sd_3). That is, a prediction method or mode for generating a predicted image for the current block is selected.

[0266] [Intra Prediction Unit] The intra prediction unit 124 generates a predicted image (i.e., an intra predicted image) of the current block by performing intra prediction (also referred to as intra-screen prediction) of the current block with reference to blocks in the current picture stored in the block memory 118. Specifically, the intra prediction unit 124 generates the intra predicted image by performing intra prediction with reference to pixel values ​​(e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra predicted image to the prediction control unit 128.

[0267] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predefined intra prediction modes. The plurality of intra prediction modes typically includes one or more non-directional prediction modes and a plurality of directional prediction modes.

[0268] 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 standard.

[0269] The multiple directional prediction modes include, for example, the 33 prediction modes defined in the H.265 / HEVC standard. Note that the multiple directional prediction modes may also include 32 prediction modes in addition to the 33 directions (a total of 65 directional prediction modes). Figure 31 is a diagram showing all 67 intra prediction modes (two non-directional prediction modes and 65 directional prediction modes) in intra prediction. Solid arrows represent the 33 directions defined in the H.265 / HEVC standard, and dashed arrows represent the additional 32 directions (the two non-directional prediction modes are not shown in Figure 31).

[0270] In various implementation examples, a luma block may be referenced in intra prediction of a chroma block. That is, the chroma component of the current block may be predicted based on the luma component of the current block. Such intra prediction is sometimes referred to as CCLM (cross-component linear model) prediction. An intra prediction mode of a chroma block that references such a luma block (e.g., referred to as a CCLM mode) may be added as one of the intra prediction modes of the chroma block.

[0271] The intra prediction unit 124 may correct pixel values ​​after intra prediction based on gradients of reference pixels in the horizontal / vertical directions. Intra prediction involving such correction is sometimes called position dependent intra prediction combination (PDPC). Information indicating whether PDPC is applied (e.g., called a PDPC flag) is usually signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, brick level, or CTU level).

[0272] FIG. 32 is a flowchart showing an example of processing by the intra prediction unit 124.

[0273] The intra prediction unit 124 selects one intra prediction mode from multiple intra prediction modes (step Sw_1). Then, the intra prediction unit 124 generates a predicted image according to the selected intra prediction mode (step Sw_2). Next, the intra prediction unit 124 determines Most Probable Modes (MPM) (step Sw_3). The MPM consists of, for example, six intra prediction modes. Two of the six intra prediction modes may be planar prediction mode and DC prediction mode, and the remaining four modes may be directional prediction modes. Then, the intra prediction unit 124 determines whether the intra prediction mode selected in step Sw_1 is included in the MPM (step Sw_4).

[0274] If it is determined that the selected intra prediction mode is included in the MPM (Yes in step Sw_4), the intra prediction unit 124 sets the MPM flag to 1 (step Sw_5) and generates information indicating the selected intra prediction mode from the MPM (step Sw_6). Note that the MPM flag set to 1 and the information indicating the intra prediction mode are each coded by the entropy coding unit 110 as prediction parameters.

[0275] On the other hand, if it is determined that the selected intra prediction mode is not included in the MPM (No in step Sw_4), the intra prediction unit 124 sets the MPM flag to 0 (step Sw_7). Alternatively, the intra prediction unit 124 does not set the MPM flag. Then, the intra prediction unit 124 generates information indicating the selected intra prediction mode from among one or more intra prediction modes not included in the MPM (step Sw_8). Note that the MPM flag set to 0 and the information indicating the intra prediction mode are each coded by the entropy coding unit 110 as prediction parameters. The information indicating the intra prediction mode indicates, for example, any value between 0 and 60.

[0276] [Inter Prediction Unit] The inter prediction unit 126 generates a predicted image (inter predicted image) by performing inter prediction (also called inter prediction) on the current block with reference to a reference picture stored in the frame memory 122 that is different from the current picture. Inter prediction is performed in units of the current block or a current sub-block within the current block. A sub-block is included in a block and is a smaller unit than a block. The size of a sub-block may be 4x4 pixels, 8x8 pixels, or another size. The size of a sub-block may be switched in units such as a slice, a brick, or a picture.

[0277] For example, the inter prediction unit 126 performs motion estimation for the current block or current sub-block within a reference picture to find a reference block or sub-block that best matches the current block or current sub-block. The inter prediction unit 126 then obtains motion information (e.g., a motion vector) that compensates for the motion or change from the reference block or sub-block to the current block or sub-block. The inter prediction unit 126 performs motion compensation (or motion prediction) based on the motion information to generate an inter prediction image for the current block or sub-block. The inter prediction unit 126 outputs the generated inter prediction image to the prediction control unit 128.

[0278] The motion information used for motion compensation may be signaled as an inter-predicted image in various forms. For example, a motion vector may be signaled. As another example, a difference between a motion vector and a motion vector predictor may be signaled.

[0279] [Reference Picture List] Figure 33 is a diagram showing an example of each reference picture, and Figure 34 is a conceptual diagram showing an example of a reference picture list. The reference picture list is a list indicating one or more reference pictures stored in the frame memory 122. In Figure 33, rectangles indicate pictures, arrows indicate the reference relationships between pictures, the horizontal axis indicates time, I, P, and B in the rectangles indicate intra-predicted pictures, uni-predicted pictures, and bi-predicted pictures, respectively, and the numbers in the rectangles indicate the decoding order. As shown in Figure 33, the decoding order of each picture is I0, P1, B2, B3, and B4, and the display order of each picture is I0, B3, B2, B4, and P1. As shown in Figure 34, the reference picture list is a list indicating candidate reference pictures, and for example, one picture (or slice) may have one or more reference picture lists. For example, if the current picture is a uni-predictive picture, one reference picture list is used, and if the current picture is a bi-predictive picture, two reference picture lists are used. In the examples of Figures 33 and 34, picture B3, which is the current picture currPic, has two reference picture lists: an L0 list and an L1 list. When the current picture currPic is picture B3, the reference picture candidates for the current picture currPic are I0, P1, and B2, and each reference picture list (i.e., the L0 list and the L1 list) indicates these pictures. The inter prediction unit 126 or the prediction control unit 128 specifies which picture in each reference picture list is actually referenced using the reference picture index refIdxLx. In Figure 34, reference pictures P1 and B2 are specified by reference picture indexes refIdxL0 and refIdxL1.

[0280] Such a reference picture list may be generated in units of a sequence, a picture, a slice, a brick, a CTU, or a CU. Furthermore, among the reference pictures indicated in the reference picture list, reference picture indices indicating reference pictures referenced in inter prediction may be coded at the sequence level, the picture level, the slice level, the brick level, the CTU level, or the CU level. Furthermore, a common reference picture list may be used in multiple inter prediction modes.

[0281] [Basic Flow of Inter Prediction] FIG. 35 is a flowchart showing the basic flow of inter prediction.

[0282] The inter prediction unit 126 first generates a predicted image (steps Se_1 to Se_3). Next, the subtraction unit 104 generates a difference between the current block and the predicted image as a prediction residual (step Se_4).

[0283] Here, in generating a predicted image, the inter prediction unit 126 generates the predicted image by, for example, determining a motion vector (MV) of the current block (steps Se_1 and Se_2) and performing motion compensation (step Se_3). In determining an MV, the inter prediction unit 126 determines the MV by, for example, selecting a candidate motion vector (candidate MV) (step Se_1) and deriving an MV (step Se_2). The selection of a candidate MV is performed, for example, by the inter prediction unit 126 generating a candidate MV list and selecting at least one candidate MV from the candidate MV list. Note that previously derived MVs may be added to the candidate MV list. In deriving an MV, the inter prediction unit 126 may further select at least one candidate MV from the at least one candidate MV, and determine the selected at least one candidate MV as the MV of the current block. Alternatively, the inter prediction unit 126 may determine the MV of the current block by searching, for each of the at least one selected candidate MV, an area of ​​a reference picture indicated by the candidate MV. Note that searching an area of ​​a reference picture may also be referred to as motion estimation.

[0284] In addition, in the above example, steps Se_1 to Se_3 are performed by the inter prediction unit 126, but the processing of step Se_1 or step Se_2, for example, may be performed by other components included in the encoding device 100.

[0285] Note that a candidate MV list may be created for each process in each inter prediction mode, or a common candidate MV list may be used for multiple inter prediction modes. The processes of steps Se_3 and Se_4 correspond to the processes of steps Sa_3 and Sa_4, respectively, shown in Fig. 9. The process of step Se_3 corresponds to the process of step Sd_1b in Fig. 30.

[0286] [MV Derivation Flow] FIG. 36 is a flowchart showing an example of MV derivation.

[0287] The inter predictor 126 may derive the motion vectors (e.g., motion vectors) of the current block in a mode that encodes motion information. In this case, the motion information may be coded and signaled as prediction parameters, i.e., the coded motion information is included in the stream.

[0288] Alternatively, the inter predictor 126 may derive MVs in a mode that does not encode motion information, in which case the motion information is not included in the stream.

[0289] Here, MV derivation modes include normal inter mode, normal merge mode, FRUC mode, and affine mode, which will be described later. Among these modes, modes that encode motion information include normal inter mode, normal merge mode, and affine mode (specifically, affine inter mode and affine merge mode). Note that the motion information may include not only MVs but also prediction MV selection information, which will be described later. Furthermore, modes that do not encode motion information include FRUC mode. The inter prediction unit 126 selects a mode for deriving MVs of the current block from these multiple modes, and derives the MVs of the current block using the selected mode.

[0290] FIG. 37 is a flowchart showing another example of MV derivation.

[0291] The inter prediction unit 126 may derive the motion vector of the current block in a differential motion vector encoding mode. In this case, for example, the differential motion vector is encoded as a prediction parameter and signaled. That is, the encoded differential motion vector is included in the stream. This differential motion vector is the difference between the motion vector of the current block and its predicted motion vector. The predicted motion vector is a predicted motion vector.

[0292] Alternatively, the inter prediction unit 126 may derive the MV in a mode that does not encode the differential MV, in which case the encoded differential MV is not included in the stream.

[0293] As described above, MV derivation modes include normal inter, normal merge, FRUC, and affine modes, which will be described later. Among these modes, modes that encode differential MVs include normal inter and affine modes (specifically, affine inter modes). Modes that do not encode differential MVs include FRUC, normal merge, and affine modes (specifically, affine merge modes). The inter prediction unit 126 selects a mode for deriving MVs for the current block from these multiple modes and derives the MVs for the current block using the selected mode.

[0294] [MV Derivation Modes] Figures 38A and 38B are diagrams showing an example of classification of each MV derivation mode. For example, as shown in Figure 38A, MV derivation modes are broadly classified into three modes depending on whether motion information is coded and whether a differential MV is coded. The three modes are inter mode, merge mode, and FRUC (frame rate up-conversion) mode. Inter mode is a mode in which motion estimation is performed and motion information and a differential MV are coded. For example, as shown in Figure 38B, inter mode includes affine inter mode and normal inter mode. Merge mode is a mode in which motion estimation is not performed and an MV is selected from a neighboring coded block and the MV of the current block is derived using that MV. This merge mode is basically a mode in which motion information is coded and a differential MV is not coded. For example, as shown in FIG. 38B , merge modes include normal merge mode (sometimes referred to as normal merge mode or regular merge mode), MMVD (Merge with Motion Vector Difference) mode, CIIP (Combined inter merge / intra prediction) mode, triangle mode, ATMVP mode, and affine merge mode. Among the merge modes, MMVD mode exceptionally encodes differential motion vectors. The above-mentioned affine merge mode and affine inter mode are modes included in affine mode. Affine mode is a mode in which, assuming affine transformation, the motion vectors of each of the multiple sub-blocks constituting the current block are derived as the motion vector of the current block. FRUC mode is a mode in which the motion vector of the current block is derived by searching between already-encoded regions, and neither motion information nor differential motion vectors are encoded. Each of these modes will be described in detail later.

[0295] 38A and 38B are merely examples, and are not limiting. For example, when a differential MV is coded in a CIIP mode, the CIIP mode is classified as an inter mode.

[0296] [MV Derivation > Normal Inter Mode] Normal inter mode is an inter prediction mode in which the MV of the current block is derived by finding a block similar to the image of the current block from the region of the reference picture indicated by the candidate MV. In this normal inter mode, the differential MV is coded.

[0297] FIG. 39 is a flowchart showing an example of inter prediction in normal inter mode.

[0298] The inter prediction unit 126 first obtains multiple candidate MVs for the current block based on information such as MVs of multiple coded blocks temporally or spatially surrounding the current block (Step Sg_1). That is, the inter prediction unit 126 creates a candidate MV list.

[0299] Next, the inter prediction unit 126 extracts N candidate MVs (N is an integer equal to or greater than 2) from the plurality of candidate MVs obtained in step Sg_1 as prediction MV candidates according to a predetermined priority order (step Sg_2). Note that the priority order is predetermined for each of the N candidate MVs.

[0300] Next, the inter prediction unit 126 selects one prediction MV candidate from the N prediction MV candidates as a prediction MV for the current block (step Sg_3). At this time, the inter prediction unit 126 encodes prediction MV selection information for identifying the selected prediction MV into a stream. That is, the inter prediction unit 126 outputs the prediction MV selection information as a prediction parameter to the entropy coding unit 110 via the prediction parameter generation unit 130.

[0301] Next, the inter prediction unit 126 derives the motion vector of the current block by referring to the coded reference picture (step Sg_4). At this time, the inter prediction unit 126 further encodes the difference between the derived motion vector and the predicted motion vector as a differential motion vector into a stream. That is, the inter prediction unit 126 outputs the differential motion vector as a prediction parameter to the entropy coding unit 110 via the prediction parameter generation unit 130. Note that the coded reference picture is a picture consisting of multiple blocks reconstructed after coding.

[0302] Finally, the inter prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the coded reference picture (step Sg_5). The processes of steps Sg_1 to Sg_5 are performed for each block. For example, when the processes of steps Sg_1 to Sg_5 are performed for each of all blocks included in a slice, inter prediction using the normal inter mode for that slice is completed. Furthermore, when the processes of steps Sg_1 to Sg_5 are performed for each of all blocks included in a picture, inter prediction using the normal inter mode for that picture is completed. Note that the processes of steps Sg_1 to Sg_5 do not have to be performed for all blocks included in a slice, and inter prediction using the normal inter mode for that slice may be completed when they are performed for some blocks. Similarly, when the processes of steps Sg_1 to Sg_5 are performed for some blocks included in a picture, inter prediction using the normal inter mode for that picture may be completed.

[0303] The predicted image is the inter-prediction signal described above. Information indicating the inter-prediction mode (normal inter-mode in the above example) used to generate the predicted image, which is included in the coded signal, is coded as, for example, a prediction parameter.

[0304] The candidate MV list may be shared with lists used in other modes. Furthermore, processing related to the candidate MV list may be applied to processing related to lists used in other modes. Examples of processing related to the candidate MV list include extracting or selecting candidate MVs from the candidate MV list, sorting candidate MVs, or deleting candidate MVs.

[0305] [MV Derivation > Normal Merge Mode] Normal merge mode is an inter prediction mode in which a candidate MV is selected from a candidate MV list as the MV of the current block, thereby deriving the MV. Note that normal merge mode is a merge mode in the narrow sense, and may also be simply referred to as merge mode. In this embodiment, normal merge mode and merge mode are distinguished, and merge mode is used in a broad sense.

[0306] FIG. 40 is a flowchart showing an example of inter prediction in normal merge mode.

[0307] The inter prediction unit 126 first obtains multiple candidate MVs for the current block based on information such as MVs of multiple coded blocks temporally or spatially surrounding the current block (step Sh_1). That is, the inter prediction unit 126 creates a candidate MV list.

[0308] Next, the inter prediction unit 126 derives the MV of the current block by selecting one candidate MV from the multiple candidate MVs obtained in step Sh_1 (step Sh_2). At this time, the inter prediction unit 126 encodes MV selection information for identifying the selected candidate MV into the stream. That is, the inter prediction unit 126 outputs the MV selection information as a prediction parameter to the entropy coding unit 110 via the prediction parameter generation unit 130.

[0309] Finally, the inter prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the coded reference picture (step Sh_3). The processes of steps Sh_1 to Sh_3 are performed, for example, for each block. For example, when the processes of steps Sh_1 to Sh_3 are performed for each of all blocks included in a slice, inter prediction using the normal merge mode for that slice is completed. Furthermore, when the processes of steps Sh_1 to Sh_3 are performed for each of all blocks included in a picture, inter prediction using the normal merge mode for that picture is completed. Note that the processes of steps Sh_1 to Sh_3 do not necessarily have to be performed for all blocks included in a slice, and inter prediction using the normal merge mode for that slice may be completed when they are performed for some blocks. Similarly, when the processes of steps Sh_1 to Sh_3 are performed for some blocks included in a picture, inter prediction using the normal merge mode for that picture may be completed.

[0310] Furthermore, information included in the stream indicating the inter prediction mode (normal merge mode in the above example) used to generate the predicted image is coded as, for example, a prediction parameter.

[0311] FIG. 41 is a diagram illustrating an example of the MV derivation process for the current picture in the normal merge mode.

[0312] First, the inter prediction unit 126 generates a candidate MV list in which candidate MVs are registered. The candidate MVs include spatially adjacent candidate MVs, which are MVs held by multiple coded blocks spatially located around the current block, temporally adjacent candidate MVs, which are MVs held by blocks near the current block projected onto the coded reference picture, combined candidate MVs, which are MVs generated by combining the MV values ​​of the spatially adjacent candidate MVs and the temporally adjacent candidate MVs, and zero candidate MVs, which are MVs with a value of zero.

[0313] Next, the inter prediction unit 126 selects one candidate MV from the multiple candidate MVs registered in the candidate MV list, and determines that one candidate MV as the MV for the current block.

[0314] Furthermore, the entropy coding unit 110 codes merge_idx, which is a signal indicating which candidate MV has been selected, in the stream.

[0315] Note that the candidate MVs registered in the candidate MV list described in Figure 41 are just an example, and the number may be different from the number shown in the figure, the configuration may not include some of the types of candidate MVs shown in the figure, or the configuration may include candidate MVs other than the types of candidate MVs shown in the figure.

[0316] The final MV may be determined by performing dynamic motion vector refreshing (DMVR), which will be described later, using the MV of the current block derived in normal merge mode. Note that in normal merge mode, the differential MV is not encoded, whereas in MMVD mode, the differential MV is encoded. In MMVD mode, one candidate MV is selected from the candidate MV list, as in normal merge mode, but the differential MV is encoded. Such MMVD may be classified as a merge mode along with normal merge mode, as shown in FIG. 38B . Note that the differential MV in MMVD mode does not need to be the same as the differential MV used in inter mode. For example, the derivation of the differential MV in MMVD mode may require a smaller amount of processing than the derivation of the differential MV in inter mode.

[0317] Alternatively, a combined inter merge / intra prediction (CIIP) mode may be performed in which a predicted image generated by inter prediction and a predicted image generated by intra prediction are combined to generate a predicted image of the current block.

[0318] The candidate MV list may also be called a candidate list. Also, merge_idx is MV selection information.

[0319] [MV Derivation>HMVP Mode] FIG. 42 is a diagram illustrating an example of MV derivation processing for the current picture in HMVP mode.

[0320] In normal merge mode, a candidate MV is selected from a candidate MV list generated by referring to a coded block (e.g., a CU) to determine the MV of the current block (e.g., a CU). Other candidate MVs may be registered in the candidate MV list. The mode in which such other candidate MVs are registered is called HMVP mode.

[0321] In the HMVP mode, candidate MVs are managed using a FIFO (First-In First-Out) buffer for HMVP, separate from the candidate MV list used in the normal merge mode.

[0322] The FIFO buffer stores motion information such as MVs of previously processed blocks in order from most recent to least recent. In this FIFO buffer management, each time a block is processed, the MV of the newest block (i.e., the CU processed immediately before) is stored in the FIFO buffer, and instead the MV of the oldest CU in the FIFO buffer (i.e., the CU processed earliest) is deleted from the FIFO buffer. In the example shown in Figure 42, HMVP1 is the MV of the newest block, and HMVP5 is the MV of the oldest block.

[0323] For example, the inter prediction unit 126 checks, for each MV managed in the FIFO buffer, starting with HMVP1, whether that MV is different from all candidate MVs already registered in the candidate MV list for normal merge mode. If the inter prediction unit 126 determines that the MV is different from all candidate MVs, it may add the MV managed in the FIFO buffer as a candidate MV to the candidate MV list for normal merge mode. In this case, the number of candidate MVs registered from the FIFO buffer may be one or more.

[0324] By using the HMVP mode in this way, it is possible to add not only the motion vectors of blocks spatially or temporally adjacent to the current block but also motion vectors of previously processed blocks to the candidate motion vectors, which increases the variety of candidate motion vectors for normal merge mode and increases the possibility of improving coding efficiency.

[0325] The above-mentioned MV may be motion information. That is, the information stored in the candidate MV list and the FIFO buffer may include not only MV values ​​but also information indicating the reference picture, the reference direction, and the number of pictures. The above-mentioned block may be, for example, a CU.

[0326] Note that the candidate MV list and FIFO buffer in Figure 42 are merely examples, and the candidate MV list and FIFO buffer may be lists or buffers of different sizes than those shown in Figure 42, or may be configured to register candidate MVs in a different order than those shown in Figure 42. The processing described here is common to both the encoding device 100 and the decoding device 200.

[0327] The HMVP mode can also be applied to modes other than the normal merge mode. For example, motion information such as MVs of blocks previously processed in the affine mode may be stored in a FIFO buffer in order of most recent to most recent, and used as candidate MVs. A mode in which the HMVP mode is applied to the affine mode may be called a history affine mode.

[0328] [MV Derivation>FRUC Mode] Motion information may be derived on the decoding device 200 side without being signaled from the encoding device 100 side. For example, the motion information may be derived by performing motion estimation on the decoding device 200 side. In this case, the decoding device 200 side performs motion estimation without using pixel values ​​of the current block. Modes in which such motion estimation is performed on the decoding device 200 side include frame rate up-conversion (FRUC) mode and pattern matched motion vector derivation (PMMVD) mode.

[0329] An example of the FRUC process is shown in FIG. 43. First, by referencing the motion vectors of each coded block spatially or temporally adjacent to the current block, a list indicating these motion vectors as candidate motion vectors (i.e., a candidate motion vector list, which may be the same as the candidate motion vector list for normal merge mode) is generated (step Si_1). Next, a best candidate motion vector is selected from the multiple candidate motion vectors registered in the candidate motion vector list (step Si_2). For example, an evaluation value of each candidate motion vector included in the candidate motion vector list is calculated, and one candidate motion vector is selected as the best candidate motion vector based on the evaluation value. Then, a motion vector for the current block is derived based on the selected best candidate motion vector (step Si_4). Specifically, for example, the selected best candidate motion vector is directly derived as the motion vector for the current block. Alternatively, for example, a motion vector for the current block may be derived by performing pattern matching in a region surrounding a position in the reference picture corresponding to the selected best candidate motion vector. That is, a search is performed on the area around the best candidate MV using pattern matching and evaluation values ​​in the reference picture, and if a MV with a better evaluation value is found, the best candidate MV can be updated to that MV and used as the final MV for the current block. It is not necessary to update to a MV with a better evaluation value.

[0330] Finally, the inter prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the coded reference picture (step Si_5). The processes of steps Si_1 to Si_5 are performed, for example, for each block. For example, when the processes of steps Si_1 to Si_5 are performed for each of all blocks included in a slice, inter prediction using FRUC mode for that slice is completed. Furthermore, when the processes of steps Si_1 to Si_5 are performed for each of all blocks included in a picture, inter prediction using FRUC mode for that picture is completed. Note that the processes of steps Si_1 to Si_5 do not have to be performed for all blocks included in a slice, and inter prediction using FRUC mode for that slice may be completed when they are performed for some blocks. Similarly, when the processes of steps Si_1 to Si_5 are performed for some blocks included in a picture, inter prediction using FRUC mode for that picture may be completed.

[0331] The sub-block unit may be processed in the same manner as the block unit described above.

[0332] The evaluation value may be calculated by various methods. For example, a reconstructed image of a region in a reference picture corresponding to the MV is compared with a reconstructed image of a predetermined region (which may be, for example, a region in another reference picture or a region of an adjacent block in the current picture, as shown below). Then, the difference in pixel values ​​between the two reconstructed images may be calculated and used as the evaluation value for the MV. Note that the evaluation value may be calculated using other information in addition to the difference value.

[0333] Next, pattern matching will be described in detail. First, one candidate MV included in a candidate MV list (also called a merge list) is selected as a starting point for a search by pattern matching. As the pattern matching, first pattern matching or second pattern matching may be used. The first pattern matching and the second pattern matching may be called bilateral matching and template matching, respectively.

[0334] [MV Derivation > FRUC > Bilateral Matching] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures that are along the motion trajectory of the current block. Therefore, in the first pattern matching, an area in another reference picture that is along the motion trajectory of the current block is used as a predetermined area for calculating the evaluation value of the candidate MV.

[0335] FIG. 44 is a diagram illustrating an example of first pattern matching (bilateral matching) between two blocks in two reference pictures along a motion trajectory. As shown in FIG. 44 , in the first pattern matching, two MVs (MV0, MV1) are derived by searching for the most closely matched pair of two blocks in two different reference pictures (Ref0, Ref1) along the motion trajectory of a current block (Cur block). Specifically, for the current block, a difference is derived between a reconstructed image at a specified position in a first coded reference picture (Ref0) specified by a candidate MV and a reconstructed image at a specified position in a second coded reference picture (Ref1) specified by a symmetric MV obtained by scaling the candidate MV by the display time interval, and an evaluation value is calculated using the obtained difference value. The candidate MV with the best evaluation value among multiple candidate MVs may be selected as the best candidate MV.

[0336] Under the assumption of continuous motion trajectories, MVs (MV0, MV1) pointing to two reference blocks are proportional to the temporal distances (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, if the current picture is located between two reference pictures temporally and the temporal distances from the current picture to the two reference pictures are equal, the first pattern matching derives bidirectional MVs that are mirror-symmetric.

[0337] [MV Derivation > FRUC > Template Matching] In the second pattern matching (template 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 a reference picture. Therefore, in the second pattern matching, the block adjacent to the current block in the current picture is used as a predetermined area for calculating the evaluation value of the above-mentioned candidate MV.

[0338] FIG. 45 is a diagram illustrating an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. As shown in FIG. 45, in the second pattern matching, the MV of the current block is derived by searching the reference picture (Ref0) for a block that best matches a block adjacent to the current block (Cur block) in the current picture (Cur Pic). Specifically, a difference is derived between a reconstructed image of both or either of the coded areas adjacent to the left and / or above the current block and a reconstructed image at the same position in the coded reference picture (Ref0) specified by the candidate MV, and an evaluation value is calculated using the obtained difference value. The candidate MV with the best evaluation value among multiple candidate MVs may be selected as the best candidate MV.

[0339] Information indicating whether such a FRUC mode is applied (e.g., referred to as a FRUC flag) may be signaled at the CU level. Also, if the FRUC mode is applied (e.g., if the FRUC flag is true), information indicating an applicable pattern matching method (first pattern matching or second pattern matching) may be signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, brick level, CTU level, or sub-block level).

[0340] [Movement Vector Derivation>Affine Mode] The affine mode is a mode in which motion vectors are generated using an affine transformation, and may derive motion vectors for each sub-block based on motion vectors of multiple neighboring blocks. This mode is sometimes called an affine motion compensation prediction mode.

[0341] 46A is a diagram illustrating an example of deriving motion vectors for each sub-block based on motion vectors of multiple adjacent blocks. In FIG. 46A, the current block includes, for example, 16 sub-blocks each consisting of 4x4 pixels. Here, the motion vector v of the upper left corner control point of the current block is calculated based on the motion vectors of the adjacent blocks. 0 Similarly, the motion vector v of the upper right corner control point of the current block is derived based on the MV of the neighboring sub-blocks. 1 Then, the two motion vectors v are calculated by the following equation (1A): 0 and v 1 , and project the motion vectors (v x , v y ) is derived.

[0342]

[0343] Here, x and y respectively indicate the horizontal and vertical positions of the sub-block, and w indicates a predetermined weighting coefficient.

[0344] Such information indicating the affine mode (e.g., called an affine flag) may be signaled at the CU level, but the signaling of the information indicating the affine mode does not need to be limited to the CU level and may be at other levels (e.g., sequence level, picture level, slice level, brick level, CTU level, or sub-block level).

[0345] Such affine modes may also include several modes that differ in the method of deriving the MVs of the top-left and top-right corner control points. For example, the affine modes include two modes: an affine inter (also called an affine normal inter) mode and an affine merge mode.

[0346] 46B is a diagram illustrating an example of derivation of sub-block-based motion vectors in the affine mode using three control points. In FIG. 46B, the current block includes, for example, 16 sub-blocks each consisting of 4x4 pixels. Here, the motion vector v of the upper left corner control point of the current block is calculated based on the motion vectors of the adjacent blocks. 0 Similarly, the motion vector v of the upper right corner control point of the current block is derived based on the motion vectors of the neighboring blocks. 1 is derived, and the motion vector v of the bottom left corner control point of the current block is calculated based on the MV of the neighboring block. 2 Then, the three motion vectors v are calculated by the following equation (1B): 0 , v 1 and v 2 , and project the motion vectors (v x , v y ) is derived.

[0347]

[0348] Here, x and y respectively indicate the horizontal and vertical positions of the sub-block center, and w and h indicate predetermined weighting coefficients, where w may indicate the width of the current block and h may indicate the height of the current block.

[0349] Affine modes using different numbers of control points (e.g., two and three) may be switched and signaled at the CU level, and information indicating the number of control points of the affine mode used at the CU level may also be signaled at other levels (e.g., sequence level, picture level, slice level, brick level, CTU level, or sub-block level).

[0350] Furthermore, such an affine mode having three control points may include several modes that differ in the method of deriving the MVs of the upper-left, upper-right, and lower-left corner control points. For example, the affine mode having three control points includes two modes, an affine inter mode and an affine merge mode, similar to the affine mode having two control points described above.

[0351] In the affine mode, the size of each sub-block included in the current block is not limited to 4x4 pixels and may be other sizes, for example, 8x8 pixels.

[0352] [MV Derivation>Affine Mode>Control Point] FIGS. 47A, 47B, and 47C are conceptual diagrams for explaining an example of MV derivation of a control point in affine mode.

[0353] In the affine mode, as shown in Figure 47A, predicted motion vectors (MVs) of each control point of the current block are calculated based on multiple motion vectors corresponding to blocks coded in affine mode, among the coded blocks A (left), B (top), C (top right), D (bottom left), and E (top left) adjacent to the current block. Specifically, coded blocks A (left), B (top), C (top right), D (bottom left), and E (top left) are examined in this order, and the first valid block coded in affine mode is identified. Motion vectors of the control points of the current block are calculated based on multiple motion vectors corresponding to this identified block.

[0354] For example, as shown in FIG. 47B, if block A adjacent to the left of the current block is coded in an affine mode with two control points, the motion vector v projected onto the positions of the upper left and upper right corners of the coded block including block A is 3 and v 4 Then, the derived motion vector v 3 and v 4 From the motion vector v of the upper left corner control point of the current block, 0 and the motion vector v of the upper right corner control point 1 is calculated.

[0355] For example, as shown in FIG. 47C, if block A adjacent to the left of the current block is coded in an affine mode with three control points, the motion vector v projected onto the positions of the upper left corner, upper right corner, and lower left corner of the coded block including block A is 3 , v 4 and v 5 Then, the derived motion vector v 3 , v 4 and v 5 From the motion vector v of the upper left corner control point of the current block, 0 and the motion vector v of the upper right corner control point 1 and the motion vector v of the bottom left corner control point 2 is calculated.

[0356] The MV derivation method shown in Figures 47A to 47C may be used to derive the MV of each control point of the current block in step Sk_1 shown in Figure 50 described below, or may be used to derive the predicted MV of each control point of the current block in step Sj_1 shown in Figure 51 described below.

[0357] 48A and 48B are conceptual diagrams for explaining another example of derivation of the control point MV in the affine mode.

[0358] FIG. 48A is a diagram illustrating an affine mode having two control points.

[0359] In this affine mode, as shown in FIG. 48A, a motion vector selected from the motion vectors of coded blocks A, B, and C adjacent to the current block is used to calculate the motion vector v of the upper left corner control point of the current block. 0 Similarly, the motion vector v of the upper right corner control point of the current block is selected from the motion vectors of the coded blocks D and E adjacent to the current block. 1 It is used as.

[0360] FIG. 48B is a diagram illustrating an affine mode having three control points.

[0361] In this affine mode, as shown in FIG. 48B, a motion vector selected from the motion vectors of coded blocks A, B, and C adjacent to the current block is used to determine the motion vector v of the upper left corner control point of the current block. 0 Similarly, the motion vector v of the upper right corner control point of the current block is selected from the motion vectors of the coded blocks D and E adjacent to the current block. 1 Furthermore, the motion vector v of the lower left corner control point of the current block is selected from the motion vectors of the coded blocks F and G adjacent to the current block. 2 It is used as.

[0362] The MV derivation method shown in Figures 48A and 48B may be used to derive the MV of each control point of the current block in step Sk_1 shown in Figure 50 described below, or may be used to derive the predicted MV of each control point of the current block in step Sj_1 shown in Figure 51 described below.

[0363] Here, for example, when affine modes with different numbers of control points (for example, two and three) are switched at the CU level and signaled, the number of control points may differ between the coded block and the current block.

[0364] 49A and 49B are conceptual diagrams for explaining an example of a method for deriving MVs of control points when the number of control points differs between an already-encoded block and a current block.

[0365] For example, as shown in Figure 49A, the current block has three control points, the upper left corner, the upper right corner, and the lower left corner, and the block A adjacent to the left of the current block is coded in the affine mode with two control points. In this case, the motion vector v projected onto the positions of the upper left corner and the upper right corner of the coded block including block A is 3 and v 4 Then, the derived motion vector v 3 and v 4 From the motion vector v of the upper left corner control point of the current block, 0 and the motion vector v of the upper right corner control point 1 Furthermore, the derived motion vector v 0 and v 1 From the motion vector v of the bottom left corner control point 2 is calculated.

[0366] For example, as shown in Figure 49B, the current block has two control points, the upper left and upper right corners, and block A, which is adjacent to the left of the current block, is coded in the affine mode with three control points. In this case, the motion vector v projected onto the positions of the upper left, upper right, and lower left corners of the coded block including block A is 3 , v 4 and v 5 Then, the derived motion vector v 3 , v 4 and v 5 From the motion vector v of the upper left corner control point of the current block, 0 and the motion vector v of the upper right corner control point 1 is calculated.

[0367] The MV derivation method shown in Figures 49A and 49B may be used to derive the MV of each control point of the current block in step Sk_1 shown in Figure 50 described below, or may be used to derive the predicted MV of each control point of the current block in step Sj_1 shown in Figure 51 described below.

[0368] [MV Derivation>Affine Mode>Affine Merge Mode] FIG. 50 is a flowchart showing an example of the affine merge mode.

[0369] In the affine merge mode, the inter predictor 126 first derives MVs for each of the control points of the current block (step Sk_1). The control points are the upper left and upper right corners of the current block as shown in Figure 46A, or the upper left, upper right, and lower left corners of the current block as shown in Figure 46B. At this time, the inter predictor 126 may encode MV selection information for identifying the derived two or three MVs into the stream.

[0370] For example, when using the MV derivation method shown in Figures 47A to 47C, the inter prediction unit 126 examines the coded blocks in the order of block A (left), block B (top), block C (top right), block D (bottom left) and block E (top left), as shown in Figure 47A, and identifies the first valid block coded in affine mode.

[0371] The inter prediction unit 126 derives the motion vectors v of the control points using the first valid block coded in the identified affine mode. For example, if a block A is identified and the block A has two control points, as shown in Figure 47B, the inter prediction unit 126 derives the motion vectors v of the upper left and upper right corners of the coded block including the block A. 3 and v 4 From the motion vector v of the upper left corner control point of the current block, 0 and the motion vector v of the upper right corner control point 1 For example, the inter prediction unit 126 calculates the motion vectors v3 and v 4 By projecting the current block onto the current block, the motion vector v 0 and the motion vector v of the upper right corner control point 1 and calculate.

[0372] Alternatively, when block A is identified and block A has three control points, as shown in FIG. 47C , the inter predictor 126 calculates the motion vectors v 3 , v 4 and v 5 From the motion vector v of the upper left corner control point of the current block, 0 and the motion vector v of the upper right corner control point 1 and the motion vector v of the bottom left corner control point 2 For example, the inter prediction unit 126 calculates the motion vectors v 3 , v 4 and v 5 By projecting the current block onto the current block, the motion vector v 0 and the motion vector v of the upper right corner control point 1 and the motion vector v of the bottom left corner control point 2 and calculate.

[0373] As shown in Figure 49A above, when block A is identified and block A has two control points, the MVs of three control points may be calculated, and as shown in Figure 49B above, when block A is identified and block A has three control points, the MVs of two control points may be calculated.

[0374] Next, the inter prediction unit 126 performs motion compensation for each of the sub-blocks included in the current block. That is, the inter prediction unit 126 calculates two motion vectors v 0 and v 1 and the above equation (1A), or three motion vectors v0 , v 1 and v 2 and the above-mentioned equation (1B), the motion vectors of the sub-blocks are calculated as affine motion vectors (step Sk_2). Then, the inter prediction unit 126 performs motion compensation on the sub-blocks using the affine motion vectors and the coded reference picture (step Sk_3). When the processes of steps Sk_2 and Sk_3 have been performed on all sub-blocks included in the current block, the process of generating a predicted image using the affine merge mode for the current block is completed. In other words, motion compensation is performed on the current block, and a predicted image of the current block is generated.

[0375] In step Sk_1, the above-mentioned candidate MV list may be generated. The candidate MV list may be, for example, a list containing candidate MVs derived for each control point using multiple MV derivation methods. The multiple MV derivation methods may be any combination of the MV derivation methods shown in Figures 47A to 47C, the MV derivation methods shown in Figures 48A and 48B, the MV derivation methods shown in Figures 49A and 49B, and other MV derivation methods.

[0376] The candidate MV list may include candidate MVs for modes other than the affine mode that perform prediction on a sub-block basis.

[0377] For example, the candidate MV list may include candidate MVs for affine merge mode with two control points and candidate MVs for affine merge mode with three control points. Alternatively, a candidate MV list including candidate MVs for affine merge mode with two control points and a candidate MV list including candidate MVs for affine merge mode with three control points may be generated. Alternatively, a candidate MV list including candidate MVs for either affine merge mode with two control points or affine merge mode with three control points may be generated. The candidate MVs may be, for example, MVs for coded block A (left), block B (top), block C (top right), block D (bottom left), and block E (top left), or MVs for valid blocks among these blocks.

[0378] As the MV selection information, an index indicating which candidate MV in the candidate MV list is sent may be sent.

[0379] [MV Derivation>Affine Mode>Affine Inter Mode] FIG. 51 is a flowchart showing an example of the affine inter mode.

[0380] In the affine inter mode, the inter prediction unit 126 first calculates the predicted MVs (v 0 , v 1 ) or (v 0 , v 1 , v 2 ) is derived (step Sj_1). The control point is the upper left corner, upper right corner, or lower left corner of the current block, as shown in FIG. 46A or FIG. 46B.

[0381] For example, when the MV derivation method shown in Figures 48A and 48B is used, the inter prediction unit 126 selects the MV of one of the coded blocks near each control point of the current block shown in Figure 48A or 48B to derive the predicted MV (v 0 , v 1 ) or (v0 , v 1 , v 2 At this time, the inter prediction unit 126 encodes prediction MV selection information for identifying the selected two or three prediction MVs into the stream.

[0382] For example, the inter prediction unit 126 may use cost evaluation or the like to determine which block's MV to select as the prediction MV for the control point from among the coded blocks adjacent to the current block, and may write a flag indicating which prediction MV has been selected in the bitstream. That is, the inter prediction unit 126 outputs prediction MV selection information such as a flag as a prediction parameter to the entropy coding unit 110 via the prediction parameter generation unit 130.

[0383] Next, the inter predictor 126 performs motion estimation (steps Sj_3 and Sj_4) while updating each of the prediction MVs selected or derived in step Sj_1 (step Sj_2). Specifically, the inter predictor 126 calculates the affine MVs of each subblock corresponding to the updated prediction MV using the above-described formula (1A) or (1B) (step Sj_3). The inter predictor 126 then performs motion compensation for each subblock using the affine MVs and the coded reference picture (step Sj_4). The processes of steps Sj_3 and Sj_4 are performed for all blocks within the current block each time the prediction MV is updated in step Sj_2. As a result, the inter predictor 126 determines, for example, the prediction MV that provides the smallest cost in the motion estimation loop as the MV of the control point (step Sj_5). At this time, the inter predictor 126 further encodes the difference between the determined MV and the prediction MV into a stream as a differential MV. That is, the inter prediction unit 126 outputs the differential MV as a prediction parameter to the entropy coding unit 110 via the prediction parameter generation unit 130 .

[0384] Finally, the inter prediction unit 126 performs motion compensation on the current block using the determined MV and the coded reference picture, thereby generating a predicted image of the current block (step Sj_6).

[0385] In step Sj_1, the above-mentioned candidate MV list may be generated. The candidate MV list may be, for example, a list containing candidate MVs derived for each control point using multiple MV derivation methods. The multiple MV derivation methods may be any combination of the MV derivation methods shown in Figures 47A to 47C, the MV derivation methods shown in Figures 48A and 48B, the MV derivation methods shown in Figures 49A and 49B, and other MV derivation methods.

[0386] The candidate MV list may include candidate MVs for modes other than the affine mode that perform prediction on a sub-block basis.

[0387] Note that a candidate MV list may be generated that includes candidate MVs for affine inter modes with two control points and candidate MVs for affine inter modes with three control points. Alternatively, a candidate MV list may be generated that includes candidate MVs for affine inter modes with two control points and a candidate MV list that includes candidate MVs for affine inter modes with three control points. Alternatively, a candidate MV list may be generated that includes candidate MVs for one of affine inter modes with two control points and affine inter modes with three control points. The candidate MVs may be, for example, MVs for coded block A (left), block B (top), block C (top right), block D (bottom left), and block E (top left), or MVs for valid blocks among these blocks.

[0388] In addition, an index indicating which candidate MV in the candidate MV list is being sent as the predicted MV selection information.

[0389] [MV Derivation > Triangle Mode] In the example described above, the inter prediction unit 126 generates one rectangular predicted image for the rectangular current block. However, the inter prediction unit 126 may generate multiple predicted images of shapes other than a rectangle for the rectangular current block and combine these multiple predicted images to generate a final rectangular predicted image. The shape other than a rectangle may be, for example, a triangle.

[0390] FIG. 52A is a diagram for explaining generation of predicted images of two triangles.

[0391] The inter prediction unit 126 generates a predicted image of a triangle by performing motion compensation on a first partition of a triangle in the current block using a first MV of the first partition. Similarly, the inter prediction unit 126 generates a predicted image of a triangle by performing motion compensation on a second partition of a triangle in the current block using a second MV of the second partition. The inter prediction unit 126 then combines these predicted images to generate a predicted image of the same rectangle as the current block.

[0392] Note that a rectangular first predicted image corresponding to the current block may be generated using the first MV as the predicted image of the first partition. Furthermore, a rectangular second predicted image corresponding to the current block may be generated using the second MV as the predicted image of the second partition. A predicted image of the current block may be generated by performing weighted addition of the first predicted image and the second predicted image. Note that the portion subjected to weighted addition may be limited to a partial region sandwiching the boundary between the first partition and the second partition.

[0393] FIG. 52B is a conceptual diagram illustrating an example of a first portion of a first partition that overlaps a second partition, as well as first and second sample sets that may be weighted as part of the correction process. The first portion may be, for example, one-quarter the width or height of the first partition. In another example, the first portion may have a width corresponding to N samples adjacent to the edge of the first partition, where N is an integer greater than zero, e.g., N may be the integer 2. FIG. 52B illustrates a rectangular partition having a rectangular portion one-quarter the width of the first partition, where the first sample set includes samples outside and inside the first portion, and the second sample set includes samples within the first portion. The center example of FIG. 52B illustrates a rectangular partition having a rectangular portion one-quarter the height of the first partition, where the first sample set includes samples outside and inside the first portion, and the second sample set includes samples within the first portion. The example on the right of Figure 52B shows a triangle partition with polygonal portions of height corresponding to two samples, where a first sample set includes samples outside the first portion and samples inside the first portion, and a second sample set includes samples within the first portion.

[0394] The first portion may be a portion of the first partition that overlaps with an adjacent partition. Figure 52C is a conceptual diagram illustrating a first portion of a first partition that overlaps with a portion of an adjacent partition. For ease of explanation, a rectangular partition is shown having an overlapping portion with a spatially adjacent rectangular partition. Partitions having other shapes, such as triangular partitions, may be used, and the overlapping portion may overlap with a spatially or temporally adjacent partition.

[0395] Also, although an example is shown in which a predicted image is generated for each of two partitions using inter prediction, a predicted image may be generated for at least one partition using intra prediction.

[0396] FIG. 53 is a flowchart showing an example of the triangle mode.

[0397] In the triangle mode, first, the inter prediction unit 126 divides the current block into a first partition and a second partition (step Sx_1). At this time, the inter prediction unit 126 may encode partition information, which is information about the division into each partition, into a stream as a prediction parameter. That is, the inter prediction unit 126 may output the partition information as a prediction parameter to the entropy coding unit 110 via the prediction parameter generation unit 130.

[0398] Next, the inter prediction unit 126 first obtains multiple candidate MVs for the current block based on information such as MVs of multiple coded blocks temporally or spatially surrounding the current block (step Sx_2). That is, the inter prediction unit 126 creates a candidate MV list.

[0399] The inter prediction unit 126 then selects candidate MVs for the first partition and the second partition as the first MV and the second MV, respectively, from the multiple candidate MVs obtained in step Sx_2 (step Sx_3). At this time, the inter prediction unit 126 may encode MV selection information for identifying the selected candidate MVs into the stream as a prediction parameter. That is, the inter prediction unit 126 may output the MV selection information as a prediction parameter to the entropy coding unit 110 via the prediction parameter generation unit 130.

[0400] Next, the inter prediction unit 126 generates a first predicted image by performing motion compensation using the selected first MV and a coded reference picture (step Sx_4). Similarly, the inter prediction unit 126 generates a second predicted image by performing motion compensation using the selected second MV and a coded reference picture (step Sx_5).

[0401] Finally, the inter prediction unit 126 generates a predicted image of the current block by weighting and adding the first predicted image and the second predicted image (step Sx_6).

[0402] In the example shown in Fig. 52A, the first partition and the second partition are each triangular, but they may be trapezoidal or may have different shapes. Furthermore, in the example shown in Fig. 52A, the current block is composed of two partitions, but it may be composed of three or more partitions.

[0403] The first and second partitions may overlap, i.e., the first and second partitions may include the same pixel area, in which case a predicted image for the current block may be generated using a predicted image for the first partition and a predicted image for the second partition.

[0404] Furthermore, although this example shows an example in which predicted images are generated by inter prediction for both of the two partitions, predicted images may be generated by intra prediction for at least one partition.

[0405] The candidate MV list for selecting the first MV and the candidate MV list for selecting the second MV may be different or may be the same.

[0406] The partition information may include at least an index indicating a division direction for dividing the current block into multiple partitions. The MV selection information may include an index indicating a selected first MV and an index indicating a selected second MV. One index may indicate multiple pieces of information. For example, one index may be coded that collectively indicates part or all of the partition information and part or all of the MV selection information.

[0407] [MV Derivation>ATMVP Mode] FIG. 54 is a diagram showing an example of the ATMVP mode in which MVs are derived for each subblock.

[0408] The ATMVP mode is a mode classified as a merge mode. For example, in the ATMVP mode, candidate MVs are registered in sub-block units in the candidate MV list used in the normal merge mode.

[0409] Specifically, in ATMVP mode, as shown in Figure 54, a temporal MV reference block associated with the current block is first identified in a coded reference picture specified by the MV (MV0) of the block adjacent to the lower left of the current block. Next, for each sub-block in the current block, the MV used when coding the area corresponding to that sub-block in the temporal MV reference block is identified. The MVs thus identified are included in a candidate MV list as candidate MVs for the sub-blocks of the current block. When such a candidate MV for each sub-block is selected from the candidate MV list, motion compensation is performed on that sub-block using the candidate MV as the MV for the sub-block. This generates a predicted image for each sub-block.

[0410] In the example shown in Figure 54, the block adjacent to the lower left of the current block is used as the surrounding MV reference block, but other blocks may also be used. Furthermore, the size of the sub-block may be 4x4 pixels, 8x8 pixels, or other sizes. The size of the sub-block may be switched in units of slice, brick, picture, or the like.

[0411] [Motion Estimation>DMVR] FIG. 55 is a diagram showing the relationship between merge mode and DMVR.

[0412] The inter prediction unit 126 derives motion vectors for the current block in merge mode (step S1_1). Next, the inter prediction unit 126 determines whether to perform motion vector search, i.e., motion search (step S1_2). If the inter prediction unit 126 determines not to perform motion search (No in step S1_2), it determines the motion vectors derived in step S1_1 as the final motion vectors for the current block (step S1_4). That is, in this case, the motion vectors for the current block are determined in merge mode.

[0413] On the other hand, if it is determined in step S1_1 that motion estimation is to be performed (Yes in step S1_2), the inter predictor 126 derives the final motion vector for the current block by searching the surrounding area of ​​the reference picture indicated by the motion vector derived in step S1_1 (step S1_3). That is, in this case, the motion vector for the current block is determined by DMVR.

[0414] FIG. 56 is a conceptual diagram illustrating an example of DMVR for determining MV.

[0415] First, for example, in merge mode, candidate MVs (L0 and L1) are selected for the current block. Then, reference pixels are identified from the first reference picture (L0), which is a coded picture in the L0 list, according to the candidate MV (L0). Similarly, reference pixels are identified from the second reference picture (L1), which is a coded picture in the L1 list, according to the candidate MV (L1). A template is generated by averaging these reference pixels.

[0416] Next, using the template, the surrounding areas of the candidate MVs in the first reference picture (L0) and the second reference picture (L1) are searched, and the MV with the smallest cost is determined as the final MV for the current block. Note that the cost may be calculated using, for example, the difference between each pixel value of the template and each pixel value of the search area, the candidate MV value, etc.

[0417] Any process may be used, not limited to the process described here, as long as it is capable of searching the vicinity of the candidate MV and deriving the final MV.

[0418] Fig. 57 is a conceptual diagram for explaining another example of DMVR for determining MV. Unlike the example of DMVR shown in Fig. 56, this example shown in Fig. 57 calculates costs without generating templates.

[0419] First, the inter prediction unit 126 searches around the reference blocks included in each of the reference pictures in the L0 list and the L1 list based on the initial MV, which is a candidate MV acquired from the candidate MV list. For example, as shown in FIG. 57 , the initial MV corresponding to the reference block in the L0 list is InitMV_L0, and the initial MV corresponding to the reference block in the L1 list is InitMV_L1. In motion estimation, the inter prediction unit 126 first sets a search position for the reference picture in the L0 list. The difference vector indicating the set search position, specifically, the difference vector from the position indicated by the initial MV (i.e., InitMV_L0) to the search position, is MVd_L0. Then, the inter prediction unit 126 determines a search position in the reference picture in the L1 list. This search position is indicated by the difference vector from the position indicated by the initial MV (i.e., InitMV_L1) to the search position. Specifically, the inter prediction unit 126 determines the difference vector as MVd_L1 by mirroring MVd_L0. That is, the inter prediction unit 126 sets a position symmetrical to the position indicated by the initial MV in each of the reference pictures in the L0 list and the L1 list as a search position. For each search position, the inter prediction unit 126 calculates a cost such as the sum of absolute differences (SAD) of pixel values ​​in the block at that search position, and finds the search position that minimizes the cost.

[0420] FIG. 58A is a diagram showing an example of motion estimation in a DMVR, and FIG. 58B is a flowchart showing an example of the motion estimation.

[0421] First, in Step 1, the inter prediction unit 126 calculates the costs at the search position (also called the starting point) indicated by the initial MV and the eight search positions surrounding it. Then, the inter prediction unit 126 determines whether the cost of the search positions other than the starting point is the smallest. Here, if the inter prediction unit 126 determines that the cost of the search positions other than the starting point is the smallest, it moves to the search position with the smallest cost and performs the processing of Step 2. On the other hand, if the cost of the starting point is the smallest, the inter prediction unit 126 skips the processing of Step 2 and performs the processing of Step 3.

[0422] In Step 2, the inter prediction unit 126 sets the search position moved in accordance with the processing result of Step 1 as a new starting point and performs a search similar to the processing of Step 1. Then, the inter prediction unit 126 determines whether the cost of a search position other than the starting point is the smallest. Here, if the cost of a search position other than the starting point is the smallest, the inter prediction unit 126 performs the processing of Step 4. On the other hand, if the cost of the starting point is the smallest, the inter prediction unit 126 performs the processing of Step 3.

[0423] In Step 4, the inter prediction unit 126 treats the search position of the start point as the final search position, and determines the difference between the position indicated by the initial MV and the final search position as a difference vector.

[0424] In Step 3, the inter prediction unit 126 determines a pixel position with decimal precision that minimizes the cost based on the costs at four points above, below, left, and right of the starting point of Step 1 or Step 2, and sets that pixel position as the final search position. The pixel position with decimal precision is determined by weighting and adding the vectors ((0, 1), (0, -1), (-1, 0), (1, 0)) of the four points above, below, left, and right, with the costs at each of the four search positions as weights. The inter prediction unit 126 then determines the difference between the position indicated by the initial MV and that final search position as a difference vector.

[0425] [Motion Compensation > BIO / OBMC / LIC] Motion compensation includes modes in which a predicted image is generated and then corrected, such as BIO, OBMC, and LIC, which will be described later.

[0426] FIG. 59 is a flowchart showing an example of generation of a predicted image.

[0427] The inter prediction unit 126 generates a predicted image (step Sm_1) and corrects the predicted image using one of the above modes (step Sm_2).

[0428] FIG. 60 is a flowchart showing another example of generation of a predicted image.

[0429] The inter prediction unit 126 derives motion vectors (MVs) of the current block (step Sn_1). Next, the inter prediction unit 126 generates a predicted image using the MVs (step Sn_2) and determines whether or not to perform correction processing (step Sn_3). Here, if the inter prediction unit 126 determines that correction processing is to be performed (Yes in step Sn_3), it corrects the predicted image to generate a final predicted image (step Sn_4). Note that in LIC, described below, luminance and chrominance may be corrected in step Sn_4. On the other hand, if the inter prediction unit 126 determines that correction processing is not to be performed (No in step Sn_3), it outputs the predicted image as a final predicted image without correction (step Sn_5).

[0430] [Motion Compensation > OBMC] An inter-predicted image may be generated using not only the motion information of the current block obtained by motion estimation, but also the motion information of neighboring blocks. Specifically, an inter-predicted image may be generated for each sub-block in the current block by weighting and adding a predicted image based on the motion information obtained by motion estimation (in the reference picture) and a predicted image based on the motion information of the neighboring block (in the current picture). Such inter-prediction (motion compensation) may be called OBMC (overlapped block motion compensation) or OBMC mode.

[0431] In the OBMC mode, information indicating the size of a sub-block for OBMC (e.g., referred to as an OBMC block size) may be signaled at the sequence level. Furthermore, information indicating whether the OBMC mode is applied (e.g., referred to as an OBMC flag) may be signaled at the CU level. Note that the signaling level of this information does not need to be limited to the sequence level and the CU level, and may be at other levels (e.g., the picture level, slice level, brick level, CTU level, or sub-block level).

[0432] The OBMC mode will now be described in more detail. Figures 61 and 62 are a flowchart and a conceptual diagram for explaining an outline of the predictive image correction process using OBMC.

[0433] First, a predicted image (Pred) is obtained by normal motion compensation using the MV assigned to the current block, as shown in Figure 62. In Figure 62, the arrow "MV" points to a reference picture, indicating what the current block of the current picture is referring to in order to obtain the predicted image.

[0434] Next, the MV (MV_L) already derived for the coded left neighboring block is applied (reused) to the current block to obtain a predicted image (Pred_L). The MV (MV_L) is indicated by an arrow "MV_L" pointing from the current block to the reference picture. The first correction of the predicted image is then performed by superimposing the two predicted images Pred and Pred_L. This has the effect of blending the boundaries between the neighboring blocks.

[0435] Similarly, the MV (MV_U) already derived for the coded upper neighboring block is applied (reused) to the current block to obtain a predicted image (Pred_U). The MV (MV_U) is indicated by an arrow "MV_U" pointing from the current block to the reference picture. The predicted image Pred_U is then superimposed on the predicted image (e.g., Pred and Pred_L) that has undergone the first correction, thereby performing a second correction of the predicted image. This has the effect of blending the boundaries between adjacent blocks. The predicted image obtained by the second correction is the final predicted image of the current block, in which the boundaries with the adjacent blocks have been blended (smoothed).

[0436] Although the above example is a two-pass correction method using the left-adjacent and above-adjacent blocks, the correction method may also be a three-pass or more-pass correction method using the right-adjacent and / or below-adjacent blocks.

[0437] The area to be superimposed does not have to be the pixel area of ​​the entire block, but may be only a part of the area near the block boundary.

[0438] Here, the OBMC predicted image correction process has been described, in which a single predicted image Pred is obtained by superimposing additional predicted images Pred_L and Pred_U from a single reference picture. However, when a predicted image is corrected based on multiple reference images, a similar process may be applied to each of the multiple reference pictures. In such a case, OBMC image correction based on multiple reference pictures is performed to obtain a corrected predicted image from each reference picture, and then the obtained multiple corrected predicted images are further superimposed to obtain a final predicted image.

[0439] In OBMC, the unit of the current block may be a PU unit or a sub-block unit obtained by further dividing the PU.

[0440] As a method for determining whether to apply OBMC, for example, there is a method using obmc_flag, which is a signal indicating whether to apply OBMC. As a specific example, the encoding device 100 may determine whether the current block belongs to a region with complex motion. If the current block belongs to a region with complex motion, the encoding device 100 sets the value of obmc_flag to 1 and applies OBMC to perform encoding. If the current block does not belong to a region with complex motion, the encoding device 100 sets the value of obmc_flag to 0 and performs encoding of the block without applying OBMC. Meanwhile, the decoding device 200 decodes the obmc_flag described in the stream, and switches whether to apply OBMC depending on the value to perform decoding.

[0441] [Motion Compensation > BIO] Next, a method for deriving MV will be described. First, a mode for deriving MV based on a model assuming uniform linear motion will be described. This mode is sometimes called BIO (bi-directional optical flow) mode. Furthermore, this bi-directional optical flow may be expressed as BDOF instead of BIO.

[0442] Figure 63 is a diagram illustrating a model assuming uniform linear motion. In Figure 63, (vx, vy) indicates a velocity vector, and τ0 and τ1 indicate the temporal distances between the current picture (Cur Pic) and two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) indicate the MV corresponding to reference picture Ref0, and (MVx1, MVy1) indicate the MV corresponding to reference picture Ref1.

[0443] In this case, under the assumption of uniform linear motion of the velocity vector (vx, vy), (MVx0, MVy0) and (MVx1, MVy1) are expressed as (vxτ0, vyτ0) and (-vxτ1, -vyτ1), respectively, and the following optical flow equation (2) holds.

[0444]

[0445] Here, I(k) denotes the luminance value of reference image k (k=0, 1) after motion compensation. This optical flow equation indicates that the sum of (i) the time derivative of the luminance value, (ii) the product of the horizontal component of the horizontal velocity and the spatial gradient of the reference image, and (iii) the product of the vertical component of the vertical velocity and the spatial gradient of the reference image is equal to zero. Based on a combination of this optical flow equation and Hermite interpolation, block-based motion vectors obtained from a candidate MV list or the like may be corrected pixel by pixel.

[0446] Note that the MV may be derived on the decoding device 200 side using a method different from the method for deriving a motion vector based on a model assuming uniform linear motion. For example, a motion vector may be derived for each sub-block based on the MVs of multiple adjacent blocks.

[0447] Fig. 64 is a flowchart showing an example of inter prediction according to BIO, and Fig. 65 is a diagram showing an example of the configuration of an inter prediction unit 126 that performs inter prediction according to BIO.

[0448] 65 , the inter prediction unit 126 includes, for example, a memory 126 a, an interpolated image derivation unit 126 b, a gradient image derivation unit 126 c, an optical flow derivation unit 126 d, a correction value derivation unit 126 e, and a predicted image correction unit 126 f. Note that the memory 126 a may be the frame memory 122.

[0449] The inter prediction unit 126 derives two motion vectors (M0, M1) using two reference pictures (Ref0, Ref1) different from the picture (Cur Pic) containing the current block. Then, the inter prediction unit 126 derives a predicted image of the current block using the two motion vectors (M0, M1) (step Sy_1). Note that the motion vector M0 is the motion vector (MVx0, MVy0) corresponding to the reference picture Ref0, and the motion vector M1 is the motion vector (MVx1, MVy1) corresponding to the reference picture Ref1.

[0450] Next, the interpolated image derivation unit 126b refers to the memory 126a and derives an interpolated image I of the current block using the motion vector M0 and the reference picture L0. 0 The interpolated image derivation unit 126b also derives an interpolated image I of the current block by referring to the memory 126a and using the motion vector M1 and the reference picture L1. 1 (Step Sy_2). Here, the interpolated image I 0 is an image included in the reference picture Ref0, which is derived for the current block, and is an interpolated image I 1 is an image contained in the reference picture Ref1 that is derived for the current block. 0 and the interpolated image I 1 may each be the same size as the current block. 0 and the interpolated image I 1 Each of the interpolated images I may be larger than the current block in order to properly derive the gradient image described below. 0 and I 1may include a predicted image derived from the motion vector (M0, M1) and the reference picture (L0, L1) and by applying a motion compensation filter.

[0451] The gradient image derivation unit 126c also generates the interpolated image I 0 and the interpolated image I 1 From the gradient image of the current block (Ix 0 , Ix 1 , Iy 0 , Iy 1 ) is derived (step Sy_3). Note that the horizontal gradient image is (Ix 0 , Ix 1 ), and the vertical gradient image is (Iy 0 , Iy 1 The gradient image derivation unit 126c may derive the gradient image by, for example, applying a gradient filter to the interpolated image. The gradient image may be any image that indicates the spatial variation of pixel values ​​along the horizontal or vertical direction.

[0452] Next, the optical flow derivation unit 126d calculates an interpolated image (I 0 , I 1 ) and gradient image (Ix 0 , Ix 1 , Iy 0 , Iy 1 ) to derive the optical flow (vx, vy), which is the velocity vector described above (step Sy_4). The optical flow is a coefficient that corrects the spatial movement amount of pixels, and may also be called a local motion estimate, a correction motion vector, or a correction weight vector. As an example, the sub-block may be a sub-CU of 4x4 pixels. Note that the optical flow may be derived in units other than sub-blocks, such as in units of pixels.

[0453] Next, the inter prediction unit 126 corrects the predicted image of the current block using the optical flow (vx, vy). For example, the correction value derivation unit 126e derives correction values ​​for the values ​​of pixels included in the current block using the optical flow (vx, vy) (step Sy_5). Then, the predicted image correction unit 126f may correct the predicted image of the current block using the correction values ​​(step Sy_6). Note that the correction values ​​may be derived for each pixel, or may be derived for multiple pixels or sub-blocks.

[0454] Note that the processing flow of the BIO is not limited to the processing disclosed in Fig. 64. Only a part of the processing disclosed in Fig. 64 may be performed, different processing may be added or replaced, or the processing may be performed in a different order.

[0455] [Motion Compensation>LIC] Next, an example of a mode in which a predicted image (prediction) is generated using LIC (local illumination compensation) will be described.

[0456] Fig. 66A is a diagram illustrating an example of a method for generating a predicted image using luminance correction processing by LIC, and Fig. 66B is a flowchart illustrating an example of the method for generating a predicted image using the LIC.

[0457] First, the inter prediction unit 126 derives motion vectors (MVs) from an already-encoded reference picture to obtain a reference image corresponding to the current block (step Sz_1).

[0458] Next, the inter prediction unit 126 extracts information indicating how the luminance values ​​of the current block have changed between the reference picture and the current picture (step Sz_2). This extraction is performed based on the luminance pixel values ​​of the coded left-adjacent reference area (peripheral reference area) and the coded upper-adjacent reference area (peripheral reference area) in the current picture, and the luminance pixel values ​​at the equivalent positions in the reference picture specified by the derived MV. The inter prediction unit 126 then calculates luminance correction parameters using the information indicating how the luminance values ​​have changed (step Sz_3).

[0459] The inter prediction unit 126 generates a predicted image for the current block by performing luminance correction processing in which the luminance correction parameter is applied to a reference image in the reference picture specified by the MV (step Sz_4). That is, correction based on the luminance correction parameter is performed on the predicted image, which is a reference image in the reference picture specified by the MV. This correction may involve correction of luminance or chrominance. That is, chrominance correction parameters may be calculated using information indicating how chrominance has changed, and chrominance correction processing may be performed.

[0460] The shape of the peripheral reference area in FIG. 66A is an example, and other shapes may be used.

[0461] Furthermore, although the process of generating a predicted image from one reference picture has been described here, the same applies when generating a predicted image from multiple reference pictures, and a brightness correction process may be performed on the reference images obtained from each reference picture in the same manner as described above before generating a predicted image.

[0462] As a method for determining whether to apply LIC, for example, there is a method using lic_flag, which is a signal indicating whether to apply LIC. As a specific example, in the encoding device 100, it is determined whether the current block belongs to an area where a luminance change occurs, and if the current block belongs to an area where a luminance change occurs, the value of lic_flag is set to 1 and LIC is applied for encoding, and if the current block does not belong to an area where a luminance change occurs, the value of lic_flag is set to 0 and LIC is not applied for encoding. On the other hand, the decoding device 200 may decode lic_flag described in the stream, and switch whether to apply LIC depending on the value for decoding.

[0463] Another method for determining whether to apply LIC is, for example, to determine whether LIC has been applied to neighboring blocks. As a specific example, when the current block is processed in merge mode, the inter prediction unit 126 determines whether the neighboring coded blocks selected when deriving MVs in merge mode have been coded using LIC. Depending on the result, the inter prediction unit 126 switches whether to apply LIC and performs coding. Note that even in this example, the same processing is applied to the processing on the decoding device 200 side.

[0464] LIC (luminance correction processing) has been described using Figures 66A and 66B, and will be described in detail below.

[0465] First, the inter prediction unit 126 derives MVs for obtaining a reference image corresponding to the current block from a reference picture, which is an already-encoded picture.

[0466] Next, the inter prediction unit 126 uses the luminance pixel values ​​of the coded surrounding reference areas adjacent to the left and above the current block and the luminance pixel values ​​at the equivalent positions in the reference picture specified by the MV to extract information indicating how the luminance values ​​have changed between the reference picture and the current picture, and calculates luminance correction parameters. For example, the luminance pixel value of a pixel in the surrounding reference area in the current picture is set to p0, and the luminance pixel value of a pixel in the surrounding reference area in the reference picture at the equivalent position to that pixel is set to p1. The inter prediction unit 126 calculates coefficients A and B that optimize A×p1+B=p0 as luminance correction parameters for multiple pixels in the surrounding reference areas.

[0467] Next, the inter prediction unit 126 generates a predicted image for the current block by performing luminance correction processing on a reference image in a reference picture specified by the MV using the luminance correction parameter. For example, the luminance pixel value in the reference image is set to p2, and the luminance pixel value of the predicted image after the luminance correction processing is set to p3. The inter prediction unit 126 generates a predicted image after the luminance correction processing by calculating A×p2+B=p3 for each pixel in the reference image.

[0468] Note that a portion of the surrounding reference area shown in FIG. 66A may be used. For example, an area including a predetermined number of pixels thinned out from each of the upper adjacent pixels and the left adjacent pixels may be used as the surrounding reference area. Furthermore, the surrounding reference area is not limited to an area adjacent to the current block, but may also be an area not adjacent to the current block. Furthermore, in the example shown in FIG. 66A , the surrounding reference area in the reference picture is an area specified by the MV of the current picture from the surrounding reference area in the current picture, but it may also be an area specified by another MV. For example, the other MV may be the MV of the surrounding reference area in the current picture.

[0469] Although the operation of the encoding device 100 has been described above, the operation of the decoding device 200 is similar.

[0470] Note that LIC may be applied not only to luminance but also to color difference. In this case, correction parameters may be derived individually for each of Y, Cb, and Cr, or a common correction parameter may be used for any of them.

[0471] Alternatively, the LIC process may be applied on a sub-block basis. For example, correction parameters may be derived using a surrounding reference region of the current sub-block and a surrounding reference region of a reference sub-block in a reference picture specified by the MV of the current sub-block.

[0472] [Prediction control unit] The prediction control unit 128 selects either an intra-predicted image (an image or signal output from the intra-prediction unit 124) or an inter-predicted image (an image or signal output from the inter-prediction unit 126), and outputs the selected predicted image to the subtraction unit 104 and the addition unit 116.

[0473] [Prediction Parameter Generation Unit] The prediction parameter generation unit 130 may output information related to intra prediction, inter prediction, and selection of a predicted image by the prediction control unit 128 as prediction parameters to the entropy coding unit 110. The entropy coding unit 110 may generate a stream based on the prediction parameters input from the prediction parameter generation unit 130 and the quantization coefficients input from the quantization unit 108. The prediction parameters may be used by the decoding device 200. The decoding device 200 may receive and decode the stream and perform the same prediction processing as that performed by the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128. The prediction parameters may include a selected prediction signal (e.g., MV, prediction type, or prediction mode used by the intra prediction unit 124 or the inter prediction unit 126), or any index, flag, or value based on or indicating the prediction processing performed by the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.

[0474] [Decoding Device] Next, a description will be given of a decoding device 200 capable of decoding the stream output from the above-described encoding device 100. Fig. 67 is a block diagram showing an example of the configuration of the decoding device 200 according to an embodiment. The decoding device 200 is a device that decodes a stream, which is an encoded image, in units of blocks.

[0475] 67 , the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an adder 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra prediction unit 216, an inter prediction unit 218, a prediction control unit 220, a prediction parameter generation unit 222, and a partition determination unit 224. Note that the intra prediction unit 216 and the inter prediction unit 218 are each configured as part of a prediction processing unit.

[0476] [Implementation Example of Decoding Device] Fig. 68 is a block diagram showing an implementation example of the decoding device 200. The decoding device 200 includes a processor b1 and a memory b2. For example, multiple components of the decoding device 200 shown in Fig. 67 are implemented by the processor b1 and memory b2 shown in Fig. 68.

[0477] The processor b1 is a circuit that performs information processing and is a circuit that can access the memory b2. For example, the processor b1 is a dedicated or general-purpose electronic circuit that decodes a stream. The processor b1 may be a processor such as a CPU. The processor b1 may also be a collection of multiple electronic circuits. For example, the processor b1 may fulfill the roles of multiple components of the decoding device 200 shown in FIG. 67 and the like, excluding the component for storing information.

[0478] The memory b2 is a dedicated or general-purpose memory that stores information for the processor b1 to decode the stream. The memory b2 may be an electronic circuit and may be connected to the processor b1. The memory b2 may also be included in the processor b1. The memory b2 may also be a collection of multiple electronic circuits. The memory b2 may also be a magnetic disk, an optical disk, or the like, and may also be expressed as storage, a recording medium, or the like. The memory b2 may also be a non-volatile memory or a volatile memory.

[0479] For example, the memory b2 may store an image or a stream, or may store a program for the processor b1 to decode the stream.

[0480] Furthermore, for example, the memory b2 may play the role of a component for storing information among the multiple components of the decoding device 200 shown in Fig. 67 etc. Specifically, the memory b2 may play the role of the block memory 210 and the frame memory 214 shown in Fig. 67. More specifically, the memory b2 may store a reconstructed image (specifically, a reconstructed block or a reconstructed picture, etc.).

[0481] Note that not all of the components shown in Figure 67 etc. may be implemented, and not all of the above-described processes may be performed, in the decoding device 200. Some of the components shown in Figure 67 etc. may be included in another device, and some of the above-described processes may be executed by another device.

[0482] Below, the overall processing flow of the decoding device 200 will be described, followed by a description of each component included in the decoding device 200. Note that detailed description of the components included in the decoding device 200 that perform the same processing as the components included in the encoding device 100 will be omitted. For example, the inverse quantization unit 204, inverse transform unit 206, adder 208, block memory 210, frame memory 214, intra prediction unit 216, inter prediction unit 218, prediction control unit 220, and loop filter unit 212 included in the decoding device 200 perform the same processing as the inverse quantization unit 112, inverse transform unit 114, adder 116, block memory 118, frame memory 122, intra prediction unit 124, inter prediction unit 126, prediction control unit 128, and loop filter unit 120 included in the encoding device 100, respectively.

[0483] [Overall Flow of Decoding Process] FIG. 69 is a flowchart showing an example of the overall decoding process by the decoding device 200.

[0484] First, the partition determination unit 224 of the decoding device 200 determines a partition pattern for each of a plurality of fixed-size blocks (128 × 128 pixels) included in a picture based on parameters input from the entropy decoding unit 202 (step Sp_1). This partition pattern is the partition pattern selected by the encoding device 100. Then, the decoding device 200 performs the processes of steps Sp_2 to Sp_6 on each of the plurality of blocks that make up that partition pattern.

[0485] The entropy decoding unit 202 decodes (specifically, entropy decodes) the coded quantized coefficients and prediction parameters of the current block (step Sp_2).

[0486] Next, the inverse quantization unit 204 and the inverse transform unit 206 perform inverse quantization and inverse transform on the plurality of quantized coefficients to reconstruct the prediction residuals of the current block (step Sp_3).

[0487] Next, the prediction processing unit, which is made up of the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220, generates a predicted image of the current block (step Sp_4).

[0488] Next, the adder 208 reconstructs the current block into a reconstructed image (also called a decoded image block) by adding the predicted image to the prediction residual (step Sp_5).

[0489] Then, when this reconstructed image is generated, the loop filter unit 212 performs filtering on the reconstructed image (step Sp_6).

[0490] Then, the decoding device 200 determines whether or not the decoding of the entire picture is completed (step Sp_7), and if it determines that the decoding is not completed (No in step Sp_7), it repeats the process from step Sp_1.

[0491] The processes of steps Sp_1 to Sp_7 may be performed sequentially by the decoding device 200, or some of the processes may be performed in parallel, or the order of the processes may be changed.

[0492] 70 is a diagram showing the relationship between the division determination unit 224 and other components. The division determination unit 224 may perform the following processing, for example.

[0493] The partition determination unit 224 may, for example, collect block information from the block memory 210 or the frame memory 214, and further acquire parameters from the entropy decoding unit 202. The partition determination unit 224 may then determine a partition pattern for fixed-size blocks based on the block information and the parameters. The partition determination unit 224 may then output information indicating the determined partition pattern to the inverse transform unit 206, the intra prediction unit 216, and the inter prediction unit 218. The inverse transform unit 206 may perform an inverse transform on the transform coefficients based on the partition pattern indicated by the information from the partition determination unit 224. The intra prediction unit 216 and the inter prediction unit 218 may generate a predicted image based on the partition pattern indicated by the information from the partition determination unit 224.

[0494] [Entropy Decoding Unit] FIG. 71 is a block diagram showing an example of the configuration of the entropy decoding unit 202. As shown in FIG.

[0495] The entropy decoding unit 202 entropy-decodes the stream to generate quantization coefficients, prediction parameters, and parameters related to the division pattern. For example, CABAC is used for the entropy decoding. Specifically, the entropy decoding unit 202 includes, for example, a binary arithmetic decoding unit 202a, a context control unit 202b, and a multi-value conversion unit 202c. The binary arithmetic decoding unit 202a arithmetically decodes the stream into a binary signal using a context value derived by the context control unit 202b. Similar to the context control unit 110b of the encoding device 100, the context control unit 202b derives a context value, i.e., the probability of occurrence of a binary signal, according to the characteristics of a syntax element or the surrounding circumstances. The multi-value conversion unit 202c performs multi-value conversion (debinarization) to convert the binary signal output from the binary arithmetic decoding unit 202a into a multi-value signal indicating the above-mentioned quantization coefficients, etc. This multi-value conversion is performed in accordance with the binarization method described above.

[0496] The entropy decoding unit 202 outputs the quantized coefficients on a block-by-block basis to the inverse quantization unit 204. The entropy decoding unit 202 may output prediction parameters included in the stream (see FIG. 1 ) to the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. The intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220 can perform the same prediction processing as the processing performed by the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128 on the encoding device 100 side.

[0497] [Entropy Decoding Unit] FIG. 72 is a diagram showing the flow of CABAC in the entropy decoding unit 202.

[0498] First, initialization is performed in the CABAC in the entropy decoding unit 202. This initialization involves initialization of the binary arithmetic decoding unit 202a and setting of initial context values. Then, the binary arithmetic decoding unit 202a and the multi-value conversion unit 202c perform arithmetic decoding and multi-value conversion on, for example, the coded data of a CTU. At this time, the context control unit 202b updates the context values ​​every time arithmetic decoding is performed. Then, as post-processing, the context control unit 202b saves the context values. The saved context values ​​are used, for example, as the initial context values ​​for the next CTU.

[0499] [Inverse Quantization Unit] The inverse quantization unit 204 inverse quantizes the quantized coefficients of the current block that are input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inverse quantizes each quantized coefficient of the current block based on a quantization parameter corresponding to the quantized coefficient. The inverse quantization unit 204 then outputs the inversely quantized quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.

[0500] FIG. 73 is a block diagram showing an example of the configuration of the inverse quantization unit 204.

[0501] The inverse quantization unit 204 includes, for example, a quantization parameter generation unit 204a, a predicted quantization parameter generation unit 204b, a quantization parameter storage unit 204d, and an inverse quantization processing unit 204e.

[0502] FIG. 74 is a flowchart showing an example of inverse quantization by the inverse quantization unit 204.

[0503] For example, the inverse quantization unit 204 may perform inverse quantization processing for each CU based on the flow shown in Fig. 74. Specifically, the quantization parameter generation unit 204a determines whether to perform inverse quantization (step Sv_11). If it is determined that inverse quantization is to be performed (Yes in step Sv_11), the quantization parameter generation unit 204a acquires a differential quantization parameter for the current block from the entropy decoding unit 202 (step Sv_12).

[0504] Next, the predicted quantization parameter generation unit 204b acquires a quantization parameter for a processing unit different from that of the current block from the quantization parameter storage unit 204d (step Sv_13).The predicted quantization parameter generation unit 204b generates a predicted quantization parameter for the current block based on the acquired quantization parameter (step Sv_14).

[0505] The quantization parameter generation unit 204a then adds the differential quantization parameter of the current block acquired from the entropy decoding unit 202 to the predicted quantization parameter of the current block generated by the predicted quantization parameter generation unit 204b (step Sv_15). This addition generates a quantization parameter of the current block. The quantization parameter generation unit 204a then stores the quantization parameter of the current block in the quantization parameter storage unit 204d (step Sv_16).

[0506] Next, the inverse quantization processing unit 204e inversely quantizes the quantized coefficients of the current block into transform coefficients using the quantization parameter generated in step Sv_15 (step Sv_17).

[0507] Note that the differential quantization parameter may be decoded at the bit sequence level, picture level, slice level, brick level, or CTU level. Also, the initial value of the quantization parameter may be decoded at the sequence level, picture level, slice level, brick level, or CTU level. In this case, the quantization parameter may be generated using the initial value of the quantization parameter and the differential quantization parameter.

[0508] The inverse quantization unit 204 may include a plurality of inverse quantizers, and may inverse quantize the quantized coefficients using an inverse quantization method selected from a plurality of inverse quantization methods.

[0509] [Inverse Transform Unit] The inverse transform unit 206 reconstructs the prediction residual by inverse transforming the transform coefficients input from the inverse quantization unit 204 .

[0510] For example, if the information interpreted from the stream indicates that EMT or AMT is to be applied (e.g., the AMT flag is true), the inverse transform unit 206 inverse transforms the transform coefficients of the current block based on the interpreted information indicating the transform type.

[0511] Also for example, if the information decoded from the stream indicates that NSST is to be applied, then the inverse transform unit 206 applies an inverse re-transform to the transform coefficients.

[0512] FIG. 75 is a flowchart showing an example of processing by the inverse conversion unit 206.

[0513] For example, the inverse transform unit 206 determines whether information indicating that an orthogonal transform is not performed is present in the stream (step St_11). If it is determined that such information is not present (No in step St_11), the inverse transform unit 206 acquires information indicating the transform type decoded by the entropy decoding unit 202 (step St_12). Next, the inverse transform unit 206 determines the transform type used in the orthogonal transform of the encoding device 100 based on the information (step St_13). Then, the inverse transform unit 206 performs an inverse orthogonal transform using the determined transform type (step St_14).

[0514] FIG. 76 is a flowchart showing another example of the processing by the inverse conversion unit 206.

[0515] For example, the inverse transform unit 206 determines whether the transform size is equal to or smaller than a predetermined value (step Su_11). If it is determined that the transform size is equal to or smaller than the predetermined value (Yes in step Su_11), the inverse transform unit 206 acquires information indicating which of the one or more transform types included in the first transform type group has been used by the encoding device 100 from the entropy decoding unit 202 (step Su_12). Note that this information is decoded by the entropy decoding unit 202 and output to the inverse transform unit 206.

[0516] Based on the information, the inverse transform unit 206 determines the transform type used in the orthogonal transform in the encoding device 100 (step Su_13). Then, the inverse transform unit 206 performs inverse orthogonal transform on the transform coefficients of the current block using the determined transform type (step Su_14). On the other hand, if the inverse transform unit 206 determines in step Su_11 that the transform size is not equal to or less than the predetermined value (No in step Su_11), it performs inverse orthogonal transform on the transform coefficients of the current block using the second transform type group (step Su_15).

[0517] For example, the inverse orthogonal transform by the inverse transform unit 206 may be performed for each TU according to the flow shown in Figure 75 or 76. Alternatively, the inverse orthogonal transform may be performed using a predefined transform type without decoding information indicating the transform type used for the orthogonal transform. Specifically, the transform type is DST7 or DCT8, and the inverse orthogonal transform uses an inverse transform basis function corresponding to the transform type.

[0518] The adder 208 reconstructs the current block by adding the prediction residual input from the inverse transformer 206 and the predicted image input from the prediction control unit 220. In other words, a reconstructed image of the current block is generated. The adder 208 then outputs the reconstructed image of the current block to the block memory 210 and the loop filter unit 212.

[0519] [Block Memory] The block memory 210 is a storage unit for storing blocks in the current picture that are referenced in intra prediction. Specifically, the block memory 210 stores the reconstructed image output from the adder 208.

[0520] [Loop Filter Unit] The loop filter unit 212 applies a loop filter to the reconstructed image generated by the adder 208, and outputs the filtered reconstructed image to the frame memory 214, a display device, or the like.

[0521] If the information indicating ALF on / off read from the stream indicates that ALF is on, one filter is selected from among multiple filters based on the local gradient direction and activity, and the selected filter is applied to the reconstructed image.

[0522] 77 is a block diagram showing an example of the configuration of the loop filter unit 212. Note that the loop filter unit 212 has the same configuration as the loop filter unit 120 of the encoding device 100.

[0523] As shown in FIG. 77 , the loop filter unit 212 includes a deblocking filter processor 212a, an SAO processor 212b, and an ALF processor 212c. The deblocking filter processor 212a performs the deblocking filter process described above on the reconstructed image. The SAO processor 212b performs the SAO process described above on the reconstructed image after the deblocking filter process. The ALF processor 212c applies the ALF process described above to the reconstructed image after the SAO process. The loop filter unit 212 does not need to include all of the processors disclosed in FIG. 77 , and may include only some of the processors. The loop filter unit 212 may also be configured to perform the above processes in an order different from the processing order disclosed in FIG. 77 .

[0524] [Frame Memory] The frame memory 214 is a storage unit for storing reference pictures used in inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 214 stores the reconstructed image filtered by the loop filter unit 212.

[0525] [Prediction Unit (Intra Prediction Unit, Inter Prediction Unit, Prediction Control Unit)] Fig. 78 is a flowchart showing an example of processing performed in the prediction unit of the decoding device 200. Note that, as an example, the prediction unit is made up of all or some of the components of the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. The prediction processing unit includes, for example, the intra prediction unit 216 and the inter prediction unit 218.

[0526] The prediction unit generates a predicted image of the current block (step Sq_1). This predicted image is also referred to as a predicted signal or a predicted block. The predicted signal may be, for example, an intra-prediction signal or an inter-prediction signal. Specifically, the prediction unit generates the predicted image of the current block using a reconstructed image already obtained by generating predicted images for other blocks, restoring prediction residuals, and adding the predicted images. The prediction unit of the decoding device 200 generates the same predicted image as the predicted image generated by the prediction unit of the encoding device 100. In other words, the prediction image generation methods used by these prediction units are common or correspond to each other.

[0527] The reconstructed image may be, for example, an image of a reference picture or an image of a decoded block (i.e., the other block) in a current picture, which is a picture including the current block. The decoded block in the current picture may be, for example, a neighboring block of the current block.

[0528] FIG. 79 is a flowchart showing another example of the processing performed by the prediction unit of the decoding device 200.

[0529] The prediction unit determines a method or mode for generating a predicted image (step Sr_1). For example, the method or mode may be determined based on prediction parameters, etc.

[0530] When the prediction unit determines that the mode for generating the predicted image is a first method, the prediction unit generates the predicted image according to the first method (step Sr_2a). When the prediction unit determines that the mode for generating the predicted image is a second method, the prediction unit generates the predicted image according to the second method (step Sr_2b). When the prediction unit determines that the mode for generating the predicted image is a third method, the prediction unit generates the predicted image according to the third method (step Sr_2c).

[0531] The first, second, and third schemes are different schemes for generating a predicted image, and may be, for example, an inter-prediction scheme, an intra-prediction scheme, or other prediction schemes, respectively. These prediction schemes may use the reconstructed image described above.

[0532] 80A and 80B are flowcharts showing another example of processing performed by the prediction unit of the decoding device 200.

[0533] The prediction unit may perform prediction processing according to the flow shown in Figures 80A and 80B, for example. Note that the intra block copy shown in Figures 80A and 80B is a mode belonging to inter prediction, in which a block included in the current picture is referenced as a reference image or reference block. In other words, in intra block copy, a picture other than the current picture is not referenced. Also, the PCM mode shown in Figure 80A is a mode belonging to intra prediction, in which transformation and quantization are not performed.

[0534] [Intra Prediction Unit] The intra prediction unit 216 generates a predicted image of the current block (i.e., an intra predicted image) by performing intra prediction with reference to blocks in the current picture stored in the block memory 210, based on the intra prediction mode interpreted from the stream. Specifically, the intra prediction unit 216 generates the intra predicted image by performing intra prediction with reference to pixel values ​​(e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra predicted image to the prediction control unit 220.

[0535] Note that when an intra prediction mode that references a luminance block is selected for 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.

[0536] Furthermore, when the information interpreted from the stream indicates the application of PDPC, the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradient of the reference pixels in the horizontal / vertical directions.

[0537] FIG. 81 is a diagram showing an example of processing by the intra prediction unit 216 of the decoding device 200.

[0538] The intra prediction unit 216 first determines whether an MPM flag indicating 1 is present in the stream (step Sw_11). If it is determined that an MPM flag indicating 1 is present (Yes in step Sw_11), the intra prediction unit 216 acquires information indicating the intra prediction mode selected by the encoding device 100 from the entropy decoding unit 202 (step Sw_12). Note that this information is decoded by the entropy decoding unit 202 and output to the intra prediction unit 216. Next, the intra prediction unit 216 determines an MPM (step Sw_13). The MPM consists of, for example, six intra prediction modes. Then, the intra prediction unit 216 determines the intra prediction mode indicated by the information acquired in step Sw_12 from the multiple intra prediction modes included in the MPM (step Sw_14).

[0539] On the other hand, if the intra prediction unit 216 determines in step Sw_11 that an MPM flag indicating 1 is not present in the stream (No in step Sw_11), it acquires information indicating the intra prediction mode selected in the encoding device 100 (step Sw_15). That is, the intra prediction unit 216 acquires information indicating the intra prediction mode selected in the encoding device 100 from the one or more intra prediction modes not included in the MPM, from the entropy decoding unit 202. Note that this information is decoded by the entropy decoding unit 202 and output to the intra prediction unit 216. Then, the intra prediction unit 216 determines the intra prediction mode indicated by the information acquired in step Sw_15 from the one or more intra prediction modes not included in the MPM (step Sw_17).

[0540] The intra prediction unit 216 generates a predicted image in accordance with the intra prediction mode determined in step Sw_14 or step Sw_17 (step Sw_18).

[0541] [Inter Prediction Unit] The inter prediction unit 218 predicts the current block by referring to a reference picture stored in the frame memory 214. Prediction is performed in units of the current block or sub-blocks within the current block. Note that a sub-block is included in a block and is a smaller unit than a block. The size of a sub-block may be 4x4 pixels, 8x8 pixels, or another size. The size of a sub-block may be switched in units such as a slice, a brick, or a picture.

[0542] For example, the inter prediction unit 218 generates an inter prediction image of the current block or sub-block by performing motion compensation using motion information (e.g., MV) interpreted from the stream (e.g., prediction parameters output from the entropy decoding unit 202), and outputs the inter prediction image to the prediction control unit 220.

[0543] If the information interpreted from the stream indicates that the OBMC mode is to be applied, the inter prediction unit 218 generates an inter prediction image using not only the motion information of the current block obtained by motion estimation, but also the motion information of adjacent blocks.

[0544] Furthermore, if the information interpreted from the stream indicates that the FRUC mode is to be applied, the inter prediction unit 218 derives motion information by performing motion search according to the pattern matching method (bilateral matching or template matching) interpreted from the stream, and then performs motion compensation (prediction) using the derived motion information.

[0545] Furthermore, when the BIO mode is applied, the inter prediction unit 218 derives motion vectors based on a model assuming uniform linear motion. Furthermore, when information interpreted from the stream indicates that the affine mode is applied, the inter prediction unit 218 derives motion vectors for each sub-block based on the motion vectors of multiple adjacent blocks.

[0546] [MV Derivation Flow] FIG. 82 is a flowchart showing an example of MV derivation in the decoding device 200.

[0547] The inter prediction unit 218 determines, for example, whether to decode motion information (e.g., MV). For example, the inter prediction unit 218 may make the determination according to a prediction mode included in the stream, or may make the determination based on other information included in the stream. Here, if the inter prediction unit 218 determines to decode the motion information, it derives the MV of the current block in a mode for decoding the motion information. On the other hand, if the inter prediction unit 218 determines not to decode the motion information, it derives the MV in a mode for not decoding the motion information.

[0548] Here, MV derivation modes include normal inter mode, normal merge mode, FRUC mode, and affine mode, which will be described later. Among these modes, modes that decode motion information include normal inter mode, normal merge mode, and affine mode (specifically, affine inter mode and affine merge mode). Note that the motion information may include not only MVs but also prediction MV selection information, which will be described later. Furthermore, modes that do not decode motion information include FRUC mode. The inter prediction unit 218 selects a mode for deriving MVs of the current block from these multiple modes, and derives the MVs of the current block using the selected mode.

[0549] FIG. 83 is a flowchart showing another example of MV derivation in the decoding device 200.

[0550] The inter prediction unit 218, for example, determines whether to decode the differential MV. For example, the inter prediction unit 218 may make this determination based on the prediction mode included in the stream or other information included in the stream. Here, when the inter prediction unit 218 determines to decode the differential MV, it may derive the MV of the current block in a mode for decoding the differential MV. In this case, for example, the differential MV included in the stream is decoded as a prediction parameter.

[0551] On the other hand, if the inter prediction unit 218 determines not to decode the differential MV, it derives the MV in a mode in which the differential MV is not decoded. In this case, the coded differential MV is not included in the stream.

[0552] As described above, MV derivation modes include normal inter, normal merge, FRUC, and affine modes, which will be described later. Among these modes, modes that encode differential MVs include normal inter and affine modes (specifically, affine inter modes). Modes that do not encode differential MVs include FRUC, normal merge, and affine modes (specifically, affine merge modes). The inter prediction unit 218 selects a mode for deriving MVs for the current block from these multiple modes and derives the MVs for the current block using the selected mode.

[0553] [MV derivation > Normal inter mode] For example, if information interpreted from the stream indicates that normal inter mode should be applied, the inter prediction unit 218 derives an MV in normal merge mode based on the information interpreted from the stream, and performs motion compensation (prediction) using that MV.

[0554] FIG. 84 is a flowchart showing an example of inter prediction in normal inter mode in the decoding device 200.

[0555] The inter prediction unit 218 of the decoding device 200 performs motion compensation on each block. To do this, the inter prediction unit 218 first obtains multiple candidate MVs for the current block based on information such as the MVs of multiple decoded blocks temporally or spatially surrounding the current block (step Sg_11). In other words, the inter prediction unit 218 creates a candidate MV list.

[0556] Next, the inter prediction unit 218 extracts N candidate MVs (N is an integer equal to or greater than 2) from the plurality of candidate MVs obtained in step Sg_11 as candidate motion vector predictors (also referred to as candidate prediction MVs) according to a predetermined priority order (step Sg_12). Note that the priority order is predetermined for each of the N candidate prediction MVs.

[0557] Next, the inter prediction unit 218 decodes the prediction MV selection information from the input stream, and uses the decoded prediction MV selection information to select one prediction MV candidate from the N prediction MV candidates as the prediction MV for the current block (step Sg_13).

[0558] Next, the inter prediction unit 218 decodes the differential MV from the input stream and derives the MV of the current block by adding the differential value of the decoded differential MV to the selected prediction MV (step Sg_14).

[0559] Finally, the inter prediction unit 218 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the decoded reference picture (step Sg_15). The processes of steps Sg_11 to Sg_15 are performed for each block. For example, when the processes of steps Sg_11 to Sg_15 are performed for each of all blocks included in a slice, inter prediction using the normal inter mode for that slice is completed. Furthermore, when the processes of steps Sg_11 to Sg_15 are performed for each of all blocks included in a picture, inter prediction using the normal inter mode for that picture is completed. Note that the processes of steps Sg_11 to Sg_15 do not have to be performed for all blocks included in a slice, and inter prediction using the normal inter mode for that slice may be completed when they are performed for some blocks. Similarly, when the processes of steps Sg_11 to Sg_15 are performed for some blocks included in a picture, inter prediction using the normal inter mode for that picture may be completed.

[0560] [MV Derivation>Normal Merge Mode] For example, if information interpreted from the stream indicates the application of normal merge mode, the inter prediction unit 218 derives MVs in normal merge mode and performs motion compensation (prediction) using the MVs.

[0561] FIG. 85 is a flowchart showing an example of inter prediction in normal merge mode in the decoding device 200.

[0562] The inter prediction unit 218 first obtains multiple candidate MVs for the current block based on information such as MVs of multiple decoded blocks temporally or spatially surrounding the current block (step Sh_11). That is, the inter prediction unit 218 creates a candidate MV list.

[0563] Next, the inter prediction unit 218 derives the MV of the current block by selecting one candidate MV from the multiple candidate MVs obtained in step Sh_11 (step Sh_12). Specifically, the inter prediction unit 218 obtains MV selection information included in the stream as prediction parameters, for example, and selects the candidate MV identified by the MV selection information as the MV of the current block.

[0564] Finally, the inter prediction unit 218 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the decoded reference picture (step Sh_13). The processes of steps Sh_11 to Sh_13 are performed, for example, for each block. For example, when the processes of steps Sh_11 to Sh_13 are performed for each of all blocks included in a slice, inter prediction using the normal merge mode for that slice is completed. Furthermore, when the processes of steps Sh_11 to Sh_13 are performed for each of all blocks included in a picture, inter prediction using the normal merge mode for that picture is completed. Note that the processes of steps Sh_11 to Sh_13 do not have to be performed for all blocks included in a slice, and inter prediction using the normal merge mode for that slice may be completed when they are performed for some blocks. Similarly, when the processes of steps Sh_11 to Sh_13 are performed for some blocks included in a picture, inter prediction using the normal merge mode for that picture may be completed.

[0565] [MV Derivation > FRUC Mode] For example, if information interpreted from the stream indicates the application of FRUC mode, the inter prediction unit 218 derives MVs in FRUC mode and performs motion compensation (prediction) using the MVs. In this case, the motion information is not signaled from the encoding device 100 side, but is derived on the decoding device 200 side. For example, the decoding device 200 may derive the motion information by performing motion estimation. In this case, the decoding device 200 performs motion estimation without using pixel values ​​of the current block.

[0566] FIG. 86 is a flowchart showing an example of inter prediction in FRUC mode in the decoding device 200.

[0567] First, the inter prediction unit 218 references the motion vectors of each decoded block spatially or temporally adjacent to the current block and generates a list indicating those motion vectors as candidate motion vectors (i.e., a candidate motion vector list, which may be the same as the candidate motion vector list for normal merge mode) (step Si_11). Next, the inter prediction unit 218 selects a best candidate motion vector from among the multiple candidate motion vectors registered in the candidate motion vector list (step Si_12). For example, the inter prediction unit 218 calculates an evaluation value for each candidate motion vector included in the candidate motion vector list and selects one candidate motion vector as the best candidate motion vector based on the evaluation value. The inter prediction unit 218 then derives a motion vector for the current block based on the selected best candidate motion vector (step Si_14). Specifically, for example, the selected best candidate motion vector is directly derived as the motion vector for the current block. Alternatively, for example, the motion vector for the current block may be derived by performing pattern matching in a region surrounding a position in the reference picture corresponding to the selected best candidate motion vector. That is, a search is performed on the area around the best candidate MV using pattern matching and evaluation values ​​in the reference picture, and if a MV with a better evaluation value is found, the best candidate MV can be updated to that MV and used as the final MV for the current block. It is not necessary to update to a MV with a better evaluation value.

[0568] Finally, the inter prediction unit 218 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the decoded reference picture (step Si_15). The processes of steps Si_11 to Si_15 are performed, for example, for each block. For example, when the processes of steps Si_11 to Si_15 are performed for each of all blocks included in a slice, inter prediction using FRUC mode for that slice is completed. Furthermore, when the processes of steps Si_11 to Si_15 are performed for each of all blocks included in a picture, inter prediction using FRUC mode for that picture is completed. Processing may also be performed on a sub-block basis in the same manner as the above-mentioned block basis.

[0569] [MV Derivation>Affine Merge Mode] For example, if information interpreted from the stream indicates the application of affine merge mode, the inter prediction unit 218 derives MVs in affine merge mode and performs motion compensation (prediction) using the MVs.

[0570] FIG. 87 is a flowchart showing an example of inter prediction in affine merge mode in the decoding device 200.

[0571] In the affine merge mode, the inter predictor 218 first derives MVs for each of the control points of the current block (step Sk_11). The control points are the upper left and upper right corners of the current block as shown in Figure 46A, or the upper left, upper right, and lower left corners of the current block as shown in Figure 46B.

[0572] For example, when using the MV derivation method shown in Figures 47A to 47C, the inter prediction unit 218 examines the decoded blocks in the order of block A (left), block B (top), block C (top right), block D (bottom left) and block E (top left), as shown in Figure 47A, and identifies the first valid block decoded in affine mode.

[0573] The inter prediction unit 218 derives the motion vectors v of the control points using the first valid block decoded in the identified affine mode. For example, if a block A is identified and the block A has two control points, as shown in Figure 47B, the inter prediction unit 218 derives the motion vectors v of the upper left and upper right corners of the decoded block including the block A. 3 and v 4 By projecting the current block onto the current block, the motion vector v 0 and the motion vector v of the upper right corner control point 1 Thus, the MV of each control point is derived.

[0574] As shown in FIG. 49A, when block A is identified and has two control points, the MVs of three control points may be calculated, and as shown in FIG. 49B, when block A is identified and has three control points, the MVs of two control points may be calculated.

[0575] Furthermore, if the stream includes MV selection information as a prediction parameter, the inter prediction unit 218 may use the MV selection information to derive the MVs of each control point of the current block.

[0576] Next, the inter prediction unit 218 performs motion compensation for each of the sub-blocks included in the current block. That is, the inter prediction unit 218 calculates two motion vectors v 0 and v 1 and the above equation (1A), or three motion vectors v 0 , v 1 and v 2and the above-mentioned formula (1B), the motion vectors of the sub-blocks are calculated as affine motion vectors (step Sk_12). Then, the inter prediction unit 218 performs motion compensation on the sub-blocks using the affine motion vectors and the decoded reference pictures (step Sk_13). When the processes of steps Sk_12 and Sk_13 have been performed on all sub-blocks included in the current block, inter prediction using the affine merge mode for the current block is completed. In other words, motion compensation is performed on the current block, and a predicted image of the current block is generated.

[0577] In step Sk_11, the candidate MV list may be generated. The candidate MV list may be a list containing candidate MVs derived for each control point using multiple MV derivation methods. The multiple MV derivation methods may be any combination of the MV derivation methods shown in Figures 47A to 47C, the MV derivation methods shown in Figures 48A and 48B, the MV derivation methods shown in Figures 49A and 49B, and other MV derivation methods.

[0578] The candidate MV list may include candidate MVs for modes other than the affine mode that perform prediction on a sub-block basis.

[0579] For example, a candidate MV list may be generated that includes candidate MVs in affine merge mode with two control points and candidate MVs in affine merge mode with three control points. Alternatively, a candidate MV list may be generated that includes candidate MVs in affine merge mode with two control points and a candidate MV list that includes candidate MVs in affine merge mode with three control points. Alternatively, a candidate MV list may be generated that includes candidate MVs in either affine merge mode with two control points or affine merge mode with three control points.

[0580] [MV Derivation>Affine Inter Mode] For example, if information interpreted from the stream indicates the application of affine inter mode, the inter prediction unit 218 derives MVs in affine inter mode and performs motion compensation (prediction) using the MVs.

[0581] FIG. 88 is a flowchart showing an example of inter prediction in the affine inter mode in the decoding device 200.

[0582] In the affine inter mode, the inter prediction unit 218 first calculates the predicted MVs (v 0 , v 1 ) or (v 0 , v 1 , v 2 ) is derived (step Sj_11). The control point is, for example, the upper left corner, upper right corner, or lower left corner of the current block, as shown in FIG. 46A or FIG. 46B.

[0583] The inter prediction unit 218 obtains prediction MV selection information included in the stream as prediction parameters, and derives prediction MVs for each control point of the current block using MVs identified by the prediction MV selection information. For example, when using the MV derivation method shown in Figures 48A and 48B, the inter prediction unit 218 selects MVs of blocks identified by the prediction MV selection information from among decoded blocks near each control point of the current block shown in Figures 48A or 48B, thereby deriving prediction MVs (v 0 , v 1 ) or (v 0 , v 1 , v 2 ) is derived.

[0584] Next, the inter prediction unit 218 obtains, for example, each differential MV included in the stream as a prediction parameter, and adds the predicted MV of each control point of the current block to the corresponding differential MV (step Sj_12), thereby deriving the MV of each control point of the current block.

[0585] Next, the inter prediction unit 218 performs motion compensation for each of the sub-blocks included in the current block. That is, the inter prediction unit 218 calculates two motion vectors v 0 and v 1 and the above equation (1A), or three motion vectors v 0 , v 1 and v 2 and the above-mentioned formula (1B), the motion vectors of the sub-blocks are calculated as affine motion vectors (step Sj_13). Then, the inter prediction unit 218 performs motion compensation on the sub-blocks using the affine motion vectors and the decoded reference pictures (step Sj_14). When the processes of steps Sj_13 and Sj_14 have been performed on all sub-blocks included in the current block, inter prediction using the affine merge mode for the current block is completed. In other words, motion compensation is performed on the current block, and a predicted image of the current block is generated.

[0586] In step Sj_11, the above-mentioned candidate MV list may be generated, similarly to step Sk_11.

[0587] [MV Derivation>Triangle Mode] For example, if information interpreted from the stream indicates the application of triangle mode, the inter prediction unit 218 derives MVs in triangle mode and performs motion compensation (prediction) using the MVs.

[0588] FIG. 89 is a flowchart showing an example of inter prediction in triangle mode in the decoding device 200.

[0589] In the triangle mode, the inter prediction unit 218 first divides the current block into a first partition and a second partition (step Sx_11). At this time, the inter prediction unit 218 may acquire partition information, which is information about the division into each partition, from the stream as a prediction parameter. Then, the inter prediction unit 218 may divide the current block into the first partition and the second partition according to the partition information.

[0590] Next, the inter prediction unit 218 first obtains multiple candidate MVs for the current block based on information such as MVs of multiple decoded blocks temporally or spatially surrounding the current block (step Sx_12). That is, the inter prediction unit 218 creates a candidate MV list.

[0591] The inter prediction unit 218 then selects the candidate MVs for the first partition and the second partition as the first MV and the second MV, respectively, from the multiple candidate MVs obtained in step Sx_11 (step Sx_13). At this time, the inter prediction unit 218 may obtain MV selection information for identifying the selected candidate MVs from the stream as a prediction parameter. The inter prediction unit 218 may then select the first MV and the second MV according to the MV selection information.

[0592] Next, the inter prediction unit 218 generates a first predicted image by performing motion compensation using the selected first MV and a decoded reference picture (step Sx_14). Similarly, the inter prediction unit 218 generates a second predicted image by performing motion compensation using the selected second MV and a decoded reference picture (step Sx_15).

[0593] Finally, the inter prediction unit 218 generates a predicted image of the current block by weighting and adding the first predicted image and the second predicted image (step Sx_16).

[0594] [Motion Estimation>DMVR] For example, if information interpreted from the stream indicates the application of DMVR, the inter prediction unit 218 performs motion estimation using DMVR.

[0595] FIG. 90 is a flowchart showing an example of motion estimation using DMVR in the decoding device 200.

[0596] The inter prediction unit 218 first derives the motion vectors of the current block in merge mode (step S1_11). Next, the inter prediction unit 218 derives the final motion vectors for the current block by searching the surrounding area of ​​the reference picture indicated by the motion vectors derived in step S1_11 (step S1_12). That is, the motion vectors of the current block are determined by the DMVR.

[0597] FIG. 91 is a flowchart showing a detailed example of motion estimation by DMVR in the decoding device 200.

[0598] First, in Step 1 shown in Fig. 58A , the inter prediction unit 218 calculates the costs at the search position (also called the starting point) indicated by the initial MV and the eight search positions surrounding it. Then, the inter prediction unit 218 determines whether the cost of the search positions other than the starting point is the smallest. Here, if the inter prediction unit 218 determines that the cost of the search positions other than the starting point is the smallest, it moves to the search position with the smallest cost and performs the processing of Step 2 shown in Fig. 58A . On the other hand, if the cost of the starting point is the smallest, the inter prediction unit 218 skips the processing of Step 2 shown in Fig. 58A and performs the processing of Step 3.

[0599] In Step 2 shown in Fig. 58A, the inter prediction unit 218 performs a search similar to the processing of Step 1, using the search position moved in accordance with the processing result of Step 1 as a new starting point. Then, the inter prediction unit 218 determines whether the cost of a search position other than the starting point is the smallest. Here, if the cost of a search position other than the starting point is the smallest, the inter prediction unit 218 performs the processing of Step 4. On the other hand, if the cost of the starting point is the smallest, the inter prediction unit 218 performs the processing of Step 3.

[0600] In Step 4, the inter prediction unit 218 treats the search position of the start point as the final search position, and determines the difference between the position indicated by the initial MV and the final search position as a difference vector.

[0601] In Step 3 shown in Fig. 58A, the inter prediction unit 218 determines a pixel position with decimal precision that minimizes the cost based on the costs at four points above, below, left, and right of the starting point of Step 1 or Step 2, and sets that pixel position as the final search position. The pixel position with decimal precision is determined by weighting and adding the vectors ((0, 1), (0, -1), (-1, 0), (1, 0)) of the four points above, below, left, and right, with the costs at each of the four search positions as weights. The inter prediction unit 218 then determines the difference between the position indicated by the initial MV and that final search position as a difference vector.

[0602] [Motion Compensation > BIO / OBMC / LIC] For example, if the information interpreted from the stream indicates the application of correction to the predicted image, the inter prediction unit 218 generates a predicted image and then corrects the predicted image according to the correction mode, such as the above-mentioned BIO, OBMC, and LIC.

[0603] FIG. 92 is a flowchart showing an example of generation of a predicted image in the decoding device 200.

[0604] The inter prediction unit 218 generates a predicted image (step Sm_11) and corrects the predicted image using one of the above modes (step Sm_12).

[0605] FIG. 93 is a flowchart showing another example of generation of a predicted image in the decoding device 200.

[0606] The inter prediction unit 218 derives motion vectors (MVs) of the current block (step Sn_11). Next, the inter prediction unit 218 generates a predicted image using the motion vectors (step Sn_12) and determines whether to perform correction processing (step Sn_13). For example, the inter prediction unit 218 acquires prediction parameters included in the stream and determines whether to perform correction processing based on the prediction parameters. The prediction parameters are, for example, flags indicating whether to apply each of the above-mentioned modes. Here, if the inter prediction unit 218 determines to perform correction processing (Yes in step Sn_13), it generates a final predicted image by correcting the predicted image (step Sn_14). Note that in LIC, the luminance and chrominance of the predicted image may be corrected in step Sn_14. On the other hand, if the inter prediction unit 218 determines not to perform correction processing (No in step Sn_13), it outputs the predicted image as the final predicted image without correction (step Sn_15).

[0607] [Motion Compensation>OBMC] For example, if information interpreted from the stream indicates the application of OBMC, the inter prediction unit 218 generates a predicted image and then corrects the predicted image in accordance with OBMC.

[0608] 94 is a flowchart showing an example of correction of a predicted image by OBMC in the decoding device 200. Note that the flowchart in FIG. 94 shows the flow of correction of a predicted image using the current picture and reference pictures shown in FIG.

[0609] First, as shown in FIG. 62, the inter prediction unit 218 obtains a predicted image (Pred) by normal motion compensation using the MVs assigned to the current block.

[0610] Next, the inter prediction unit 218 applies (reuses) the motion vector (MV_L) already derived for the decoded left adjacent block to the current block to obtain a predicted image (Pred_L). The inter prediction unit 218 then performs a first correction of the predicted image by overlapping the two predicted images Pred and Pred_L. This has the effect of blending the boundaries between adjacent blocks.

[0611] Similarly, the inter prediction unit 218 applies (reuses) the motion vector (MV_U) already derived for the decoded upper adjacent block to the current block to obtain a predicted image (Pred_U). The inter prediction unit 218 then performs a second correction of the predicted image by superimposing the predicted image Pred_U on the predicted image (e.g., Pred and Pred_L) that has been corrected the first time. This has the effect of blending the boundaries between adjacent blocks. The predicted image obtained by the second correction is the final predicted image of the current block in which the boundaries with the adjacent blocks have been blended (smoothed).

[0612] [Motion Compensation>BIO] For example, if information interpreted from the stream indicates the application of BIO, the inter prediction unit 218 generates a predicted image and then corrects the predicted image in accordance with BIO.

[0613] FIG. 95 is a flowchart showing an example of correction of a predicted image by BIO in the decoding device 200.

[0614] As shown in FIG. 63 , the inter prediction unit 218 derives two motion vectors (M0, M1) using two reference pictures (Ref0, Ref1) that are different from the picture (Cur Pic) that includes the current block. Then, the inter prediction unit 218 derives a predicted image of the current block using the two motion vectors (M0, M1) (step Sy_11). Note that the motion vector M0 is the motion vector (MVx0, MVy0) that corresponds to the reference picture Ref0, and the motion vector M1 is the motion vector (MVx1, MVy1) that corresponds to the reference picture Ref1.

[0615] Next, the inter prediction unit 218 predicts an interpolated image I of the current block using the motion vector M0 and the reference picture L0. 0 The inter prediction unit 218 also derives an interpolated image I of the current block using the motion vector M1 and the reference picture L1. 1 (Step Sy_12). Here, the interpolated image I 0is an image included in the reference picture Ref0, which is derived for the current block, and is an interpolated image I 1 is an image contained in the reference picture Ref1 that is derived for the current block. 0 and the interpolated image I 1 may each be the same size as the current block. 0 and the interpolated image I 1 Each of the interpolated images I may be larger than the current block in order to properly derive the gradient image described below. 0 and I 1 may include a predicted image derived from the motion vector (M0, M1) and the reference picture (L0, L1) and by applying a motion compensation filter.

[0616] The inter prediction unit 218 also predicts the interpolated image I 0 and the interpolated image I 1 From the gradient image of the current block (Ix 0 , Ix 1 , Iy 0 , Iy 1 ) is derived (step Sy_13). Note that the horizontal gradient image is (Ix 0 , Ix 1 ), and the vertical gradient image is (Iy 0 , Iy 1 The inter prediction unit 218 may derive the gradient image by, for example, applying a gradient filter to the interpolated image. The gradient image may indicate the spatial variation of pixel values ​​along the horizontal or vertical direction.

[0617] Next, the inter prediction unit 218 generates an interpolated image (I 0 , I 1 ) and gradient image (Ix 0 , Ix 1 , Iy 0 , Iy 1) to derive the optical flow (vx, vy), which is the velocity vector described above (step Sy_14). As an example, the sub-block may be a sub-CU of 4x4 pixels.

[0618] Next, the inter prediction unit 218 corrects the predicted image of the current block using the optical flow (vx, vy). For example, the inter prediction unit 218 derives correction values ​​for the values ​​of pixels included in the current block using the optical flow (vx, vy) (step Sy_15). Then, the inter prediction unit 218 may correct the predicted image of the current block using the correction values ​​(step Sy_16). Note that the correction values ​​may be derived for each pixel, or may be derived for multiple pixels or sub-blocks.

[0619] The processing flow of the BIO is not limited to the processing disclosed in Fig. 95. Only a part of the processing disclosed in Fig. 95 may be performed, different processing may be added or replaced, or the processing may be performed in a different order.

[0620] [Motion Compensation>LIC] For example, if information interpreted from the stream indicates the application of LIC, the inter prediction unit 218 generates a predicted image and then corrects the predicted image in accordance with the LIC.

[0621] FIG. 96 is a flowchart showing an example of correction of a predicted image by LIC in the decoding device 200.

[0622] First, the inter prediction unit 218 obtains a reference image corresponding to the current block from a decoded reference picture using the MV (step Sz_11).

[0623] Next, the inter prediction unit 218 extracts information indicating how the luminance values ​​of the current block have changed between the reference picture and the current picture (step Sz_12). As shown in FIG. 66A , this extraction is performed based on the luminance pixel values ​​of the decoded left-adjacent reference area (peripheral reference area) and the decoded upper-adjacent reference area (peripheral reference area) in the current picture, and the luminance pixel values ​​at the equivalent positions in the reference picture specified by the derived MV. Then, the inter prediction unit 218 calculates a luminance correction parameter using the information indicating how the luminance values ​​have changed (step Sz_13).

[0624] The inter prediction unit 218 generates a predicted image for the current block by performing a luminance correction process that applies the luminance correction parameter to a reference image in the reference picture specified by the MV (step Sz_14). That is, correction based on the luminance correction parameter is performed on the predicted image that is a reference image in the reference picture specified by the MV. In this correction, luminance or chrominance may be corrected.

[0625] [Prediction Control Unit] The prediction control unit 220 selects either an intra-predicted image or an inter-predicted image, and outputs the selected predicted image to the addition unit 208. Overall, the configurations, functions, and processing of the prediction control unit 220, intra-prediction unit 216, and inter-prediction unit 218 on the decoding device 200 side may correspond to the configurations, functions, and processing of the prediction control unit 128, intra-prediction unit 124, and inter-prediction unit 126 on the encoding device 100 side.

[0626] [Multi-layer and Single Layer] Fig. 97 is a conceptual diagram showing an example of a multi-layer structure. This example is an example of a multi-layer structure consisting of three layers. Here, POC (Picture of Count) corresponds to a display timing. PU (Picture Unit) corresponds to a picture. Furthermore, one PU is assigned to each layer at the same display timing. Each access unit (AU) includes multiple PUs assigned to multiple layers at the same display timing.

[0627] Also, in Figure 97, arrows indicate references in encoding and decoding. For example, in encoding and decoding of each PU of the first layer, only the same PU of the first layer is referenced. Therefore, each PU of the first layer can be decoded using only the bitstream data of the first layer.

[0628] On the other hand, when encoding and decoding each PU of the second layer, in addition to the PU of the same second layer, the PU of the first layer is also referenced. Therefore, bitstream data of both the first layer and the second layer is used to decode each PU of the second layer. Similarly, all bitstream data from the first layer to the third layer is used to decode each PU of the third layer.

[0629] For example, the resolution of each PU in the first layer is low, the resolution of each PU in the second layer is medium, and the resolution of each PU in the third layer is high. If the processing performance of the decoding device 200 is low or the data transmission bandwidth is narrow, only the bitstream data of the first layer is transmitted to the decoding device 200, and a coarse image is decoded. On the other hand, if the processing performance of the decoding device 200 is sufficiently high and the data transmission bandwidth is wide, all the bitstream data from the first layer to the third layer may be transmitted to the decoding device 200, and a fine image may be decoded.

[0630] The above control is possible according to the example in Fig. 97. Such a coding method is called scalable coding.

[0631] Furthermore, a set of one or more layers decoded for a displayable layer is called an OLS (Output Layer Set). For example, in Figure 97, if the first layer and the third layer are each displayable, the first OLS is composed of only the first layer, and the second OLS is composed of the first layer, the second layer, and the third layer.

[0632] Note that a structure that does not use scalable coding and is composed of only one layer is called a single-layer structure. For example, the single-layer structure is composed of only multiple PUs belonging to the first layer in Figure 97. In the single-layer structure, one AU has only one PU.

[0633] Also, the lowest layer of the multi-layer structure (for example, the first layer in FIG. 97) is called a base layer (BL). Also, here, one layer of the single-layer structure may be expressed as a single layer or a base layer. In other words, the base layer may be included in both the multi-layer structure and the single-layer structure.

[0634] Furthermore, layers other than the base layer are called enhancement layers. The single-layer structure does not include enhancement layers. That is, the single-layer structure can be considered to include only the base layer.

[0635] [VPS] Figure 98 is a conceptual diagram showing an overview of the VPS. The VPS (Video Parameter Set) is a parameter set defined mainly assuming multi-layers. The VPS is coded into a bitstream and described as header information in a NALU (Network Abstraction Layer Unit) of the bitstream. Coding various information into the VPS or describing various information into the VPS corresponds to describing various information in a NALU corresponding to the VPS.

[0636] For example, PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information are encoded into the VPS.

[0637] The PTL information relates to the profile, tier, and level. The DPB information relates to buffer control of decoded pictures and the timing of displaying pictures. The HRD information relates to the timing of extracting coded pictures from the coded picture buffer and the timing of decoding pictures.

[0638] All of the PTL information, DPB information, and HRD information do not have to be encoded into the VPS. That is, at least one of the PTL information, DPB information, and HRD information may be encoded into the VPS. Here, at least one of the PTL information, DPB information, and HRD information may be expressed as PTL / DPB / HRD information.

[0639] In the case of a multi-layer structure, PTL / DPB / HRD information associated with a plurality of OLSs is collectively described in one VPS.

[0640] Note that the VPS can also be used in the case of a single-layer structure, in which PTL / DPB / HRD information for only one OLS consisting of only one layer is described in the VPS.

[0641] Furthermore, the PTL / DPB / HRD information may be described not only in the VPS but also in the SPS. However, the SPS is coded for each layer and described in a NALU for each layer. Therefore, the SPS may describe the PTL / DPB / HRD information for only one corresponding layer. More specifically, the SPS may describe the PTL / DPB / HRD information for only one corresponding OLS that includes one corresponding layer as its uppermost layer.

[0642] In the present disclosure, PTL / DPB / HRD information for one layer may refer to PTL / DPB / HRD information for one OLS that includes the one layer as the uppermost layer.

[0643] An ID is assigned to the VPS. The VPS is specified by sps_video_parameter_set_id, a parameter described in the SPS. This controls which VPS is used for which PU. The VPS ID is a number equal to or greater than 1. sps_video_parameter_set_id being 0 means that no VPS is used.

[0644] In addition, in the description of this disclosure, encoding a VPS or SPS containing information into a bitstream may also be expressed as encoding the information into a VPS or SPS in the bitstream. Similarly, decoding a VPS or SPS containing information from a bitstream may also be expressed as decoding the information from a VPS or SPS in the bitstream. In other words, these expressions may be interchangeable.

[0645] [Single Layer and Base Layer Decoding Process in First Aspect] In a multi-layer use case, at the start of a service, video may be provided using only a bitstream with a single layer structure, and then switched to a bitstream with a multi-layer structure to provide video. Then, information may be added to higher layers to improve image quality or enable playback of video from different viewpoints.

[0646] In the above use case, in order to maintain compatibility, it is preferable that the configuration of the base layer extracted from the bitstream with the multi-layer structure be as similar as possible to the configuration of the single layer (also called the base layer) in the bitstream with the single-layer structure. This increases the likelihood that the decoding device 200 that can decode video from the bitstream with the single-layer structure will be able to continue to decode at least the base layer of video from the bitstream with the multi-layer structure.

[0647] Figure 99 is a relationship diagram showing an example of VPS and SPS information in the first aspect. Specifically, examples of VPS and SPS information for a single layer and VPS and SPS information for a base layer of a multi-layer are shown in Figure 99. For example, in Figure 99, the single layer corresponds to single-layer information in a bitstream with a single-layer structure, and the base layer of a multi-layer corresponds to base layer information extracted from the bitstream with a multi-layer structure.

[0648] For example, in a bitstream with a single layer structure, PTL / DPB / HRD information can also be described in the SPS, and therefore a single layer structure such as that shown in Figure 99 is often used.

[0649] Specifically, in the single-layer configuration shown in Fig. 99, PTL / DPB / HRD information for the single layer (more specifically, the OLS corresponding to the single layer) is described in the SPS. The VPS is not coded, sps_video_parameter_set_id = 0 is described in the SPS, and the VPS is not referenced.

[0650] On the other hand, in a bitstream with a multi-layer structure, PTL / DPB / HRD information for all layers (more specifically, all OLSs) is described in the VPS. Therefore, a multi-layer base layer configuration such as that shown in Figure 99 is often used. For example, the PTL / DPB / HRD information for all layers is described in the VPS, sps_video_parameter_set_id in which a value other than 0 is set as the VPS ID is described in the SPS, and the PTL / DPB / HRD information is not described in the SPS.

[0651] FIG. 100 is a flowchart showing an example of decoding video from a bitstream with a single-layer structure in the first aspect. Specifically, FIG. 100 shows the decoding process of the single layer in FIG. 99. For example, the decoding device 200 sequentially processes multiple NALUs in the bitstream. In this process, the decoding device 200 first determines whether the NALU to be processed is a NALU of an SPS (S101).

[0652] If the NALU to be processed is a NALU of an SPS (Yes in S101), the decoding device 200 decodes the SPS from the NALU to be processed (S102). Since the SPS contains PTL / DPB / HRD information, the decoding device 200 stores the PTL / DPB / HRD information in memory. The decoding device 200 then acquires the PTL / DPB / HRD information stored in memory (S103). This enables the decoding device 200 to use the PTL / DPB / HRD information in controlling subsequent processing.

[0653] Thereafter, the decoding device 200 decodes other information from other NALUs (S104). For example, a picture or a slice is decoded. Here, one PU corresponding to a single layer may be decoded from each AU.

[0654] 100, the decoding device 200 stores the PTL / DPB / HRD information in memory once and then acquires it again. However, the process of acquiring the PTL / DPB / HRD information is not limited to this. The decoding device 200 may acquire the PTL / DPB / HRD information directly without storing it in memory.

[0655] The above process flow is an example of a process flow. For example, some of the processes in the above process flow may be omitted or changed. Furthermore, processes different from the processes described above may be added to the above process flow.

[0656] Fig. 101 is a flowchart showing an example of decoding a base layer video from a bitstream with a multi-layer structure in the first aspect. Specifically, Fig. 101 shows the decoding process of the base layer of the multi-layer structure in Fig. 99. For example, the decoding device 200 sequentially processes multiple NALUs of the bitstream. In this process, the decoding device 200 first determines whether the NALU to be processed is a VPS NALU (S201).

[0657] If the NALU to be processed is a NALU of a VPS (Yes in S201), the decoding device 200 decodes the VPS from the NALU to be processed (S202). In addition, since the VPS contains PTL / DPB / HRD information, the decoding device 200 stores the PTL / DPB / HRD information in memory.

[0658] Note that PTL / DPB / HRD information other than that of the base layer is essentially unnecessary. However, the PTL / DPB / HRD information for all layers is collectively described in the VPS. Therefore, PTL / DPB / HRD information other than that of the base layer is also decoded. Specifically, syntax elements of PTL / DPB / HRD information other than that of the base layer are also parsed.

[0659] Next, the decoding device 200 determines whether the NALU to be processed is a NALU of an SPS (S203).

[0660] If the current NALU is a NALU of an SPS (Yes in S203), the decoding device 200 decodes the current NALU to generate an SPS (S204). The decoding device 200 then determines whether sps_video_parameter_set_id included in the SPS is 0 (S205).

[0661] If sps_video_parameter_set_id is 0 (Yes in S205), decoding device 200 does not acquire decoded information from the VPS. Note that in the case of the base layer of the multi-layer in Fig. 99, sps_video_parameter_set_id is other than 0. For example, if sps_video_parameter_set_id is 0 and the PTL / DPB / HRD information is not included in the SPS, the PTL / DPB / HRD information may not be used.

[0662] If sps_video_parameter_set_id is other than 0 (No in S205), the decoding device 200 acquires the PTL / DPB / HRD information (S206). Specifically, in this case, the decoding device 200 acquires from memory the PTL / DPB / HRD information decoded from the VPS having the ID indicated by sps_video_parameter_set_id. This enables the decoding device 200 to use the PTL / DPB / HRD information in controlling subsequent processing.

[0663] After that, the decoding device 200 decodes other information from other NALUs (S207). For example, a picture or a slice is decoded. Here, one PU corresponding to the base layer may be decoded from each AU.

[0664] The above process flow is an example of a process flow. For example, some of the processes in the above process flow may be omitted or changed. Furthermore, a process different from the above process may be added to the above process flow. Furthermore, the above memory may be memory b2 in FIG. 68.

[0665] In the first aspect, as shown in Figures 99 to 101, the processing related to the VPS and SPS differs between single-layer decoding and multi-layer base layer decoding. Therefore, as shown in Figure 101, development of a decoding device 200 that can handle both may involve unnecessary development, including processing that is not actually necessary. Therefore, the circuit size of the decoding device 200 may increase.

[0666] [Decoding process of single layer and base layer in second aspect] Figure 102 is a relationship diagram showing an example of VPS and SPS information in the second aspect. Specifically, examples of VPS and SPS information for a single layer and VPS and SPS information for a base layer of a multi-layer are shown in Figure 102. For example, in Figure 102, the single layer corresponds to single layer information in a bitstream with a single-layer structure, and the base layer of a multi-layer corresponds to base layer information extracted from the bitstream with a multi-layer structure.

[0667] The first difference between the example of Figure 102 and the example of Figure 99 is that even when PTL / DPB / HRD information is described in the VPS in the base layer of a multi-layered system, the PTL / DPB / HRD information is also described in the SPS of the base layer. In other words, omission of the PTL / DPB / HRD information is prohibited in the SPS of the base layer. Therefore, the base layer of a multi-layered system has PTL / DPB / HRD information in both the VPS and the SPS.

[0668] In the case of a base layer of a multi-layer structure, the PTL / DPB / HRD information included in the VPS is the PTL / DPB / HRD information for all layers (more specifically, all OLSs), and the PTL / DPB / HRD information included in the SPS is the PTL / DPB / HRD information for the base layer (more specifically, the OLS corresponding to the base layer).

[0669] The second difference between the example in Figure 99 and the example in Figure 102 is that it is assumed that the single layer may or may not include a VPS. If the single layer includes a VPS, a value other than 0 is set to sps_video_parameter_set_id, and PTL / DPB / HRD information is described in both the VPS and SPS.

[0670] In the case of a single layer, the PTL / DPB / HRD information included in the VPS is the PTL / DPB / HRD information for the base layer, which is a single layer (more specifically, the OLS corresponding to the base layer).Similarly, the PTL / DPB / HRD information included in the SPS is the PTL / DPB / HRD information for the base layer, which is a single layer (more specifically, the OLS corresponding to the base layer).

[0671] In the example of Fig. 102, the single layer not including a VPS is the same as the single layer in the example of Fig. 99, and therefore has a high affinity with the first aspect, making it possible to simplify processing, for example. On the other hand, in the example of Fig. 102, the single layer including a VPS is similar to a multi-layer, and therefore has a high affinity with a multi-layer, making it possible to enhance scalability, for example.

[0672] 103 is a flowchart showing an example of decoding video from a bitstream with a single layer structure or decoding video of a base layer from a bitstream with a multi-layer structure in the second aspect. Specifically, the decoding process of the single layer and the base layer of the multi-layer structure in FIG. 102 is shown in FIG. 103. For example, the decoding device 200 sequentially processes multiple NALUs in the bitstream. In this process, the decoding device 200 first determines whether the NALU to be processed is a VPS NALU (S301).

[0673] If the NALU to be processed is a VPS NALU (Yes in S301), the decoding device 200 does not process the VPS, completes the processing of the NALU to be processed, and proceeds to the processing of the next NALU. In other words, the VPS NALU is ignored even if it is included in the bitstream.

[0674] Next, the decoding device 200 determines whether the NALU to be processed is a NALU of an SPS (S302).

[0675] If the NALU to be processed is a NALU of an SPS (Yes in S302), the decoding device 200 decodes the SPS from the NALU to be processed (S303). Since the SPS contains PTL / DPB / HRD information, the decoding device 200 stores the PTL / DPB / HRD information in memory. The decoding device 200 later acquires the PTL / DPB / HRD information stored in memory (S305). This enables the decoding device 200 to use the PTL / DPB / HRD information in controlling subsequent processing.

[0676] Here, the decoding device 200 does not perform any processing according to the value of sps_video_parameter_set_id, whether the value is 0 or a value other than 0 (S304). In other words, the value of sps_video_parameter_set_id is ignored. The decoding device 200 does not need to determine whether sps_video_parameter_set_id is 0 or not.

[0677] Thereafter, the decoding apparatus 200 decodes other information from other NALUs (S306). For example, a picture or a slice is decoded. Here, one PU corresponding to the base layer may be decoded from each AU.

[0678] 103, the decryption device 200 does not perform any processing on the VPS. Here, not performing any processing on the VPS may include decrypting the VPS and not using the decrypted VPS in subsequent processing. For example, the VPS may be discarded after being decrypted.

[0679] 103, the decoding device 200 stores the PTL / DPB / HRD information in memory once and then acquires it again. However, the process of acquiring the PTL / DPB / HRD information is not limited to this. The decoding device 200 may acquire the PTL / DPB / HRD information directly without storing it in memory.

[0680] The above process flow is an example of a process flow. For example, some of the processes in the above process flow may be omitted or changed. Furthermore, processes different from the above processes may be added to the above process flow. Furthermore, the above memory may be memory b2 in FIG. 68.

[0681] In the second aspect, as described in Figures 102 and 103, a common processing flow can be applied to decoding of a single layer and decoding of a base layer of a multi-layer without distinguishing between them.

[0682] Furthermore, the processing flow in Fig. 103 is substantially the same as the processing flow for a single layer without a VPS described in Fig. 100. Therefore, the decoding device 200 can be realized with the same development and circuit configuration as in the case where only a bitstream with a single layer structure without a VPS is assumed.

[0683] Furthermore, as described with reference to Figures 102 and 103, single-layer structure bitstreams are processed in the same way regardless of whether they include a VPS or not. Therefore, the encoding device 100 may generate a bitstream that includes a VPS as a single-layer structure bitstream, or may generate a bitstream that does not include a VPS. This allows for greater flexibility in the configuration of the encoding device 100.

[0684] [Single-Layer and Multi-Layer Encoding Process in Second Aspect] FIG. 104 is a flowchart showing an example of encoding a video into a bit stream with a single-layer structure or a bit stream with a multi-layer structure in the second aspect.

[0685] The encoding device 100 determines whether a bitstream for encoding a video has a single-layer structure (S401). If the bitstream does not have a single-layer structure (No in S401), that is, if the bitstream has a multi-layer structure, the encoding device 100 first encodes the VPS (S408). At this time, the encoding device 100 encodes PTL / DPB / HRD information for all layers of the multilayer (more specifically, all OLSs) into the VPS.

[0686] Furthermore, the encoding device 100 sets the value of sps_video_parameter_set_id to a value other than 0 that is an ID value assigned to the VPS (S409). Next, the encoding device 100 encodes the SPS (S410). At this time, the encoding device 100 encodes sps_video_parameter_set_id and PTL / DPB / HRD information for the base layer of the multi-layer into the SPS.

[0687] Then, the encoding device 100 encodes a plurality of PUs of a plurality of layers that make up the multi-layer into one AU (S411).

[0688] On the other hand, if the bitstream is a single-layer bitstream (Yes in S401), the encoding device 100 determines whether to encode the VPS (S402). If the encoding device 100 determines to encode the VPS (Yes in S402), it encodes the VPS including PTL / DPB / HRD information (S404). Furthermore, the encoding device 100 sets the value of sps_video_parameter_set_id to a value other than 0 that is an ID value assigned to the VPS (S405).

[0689] If the encoding device 100 determines not to encode the VPS (No in S402), it does not encode the VPS and sets the value of sps_video_parameter_set_id to 0 (S403). Next, the encoding device 100 encodes the SPS (S406). At this time, the encoding device 100 encodes the sps_video_parameter_set_id and the PTL / DPB / HRD information into the SPS.

[0690] Then, the encoding device 100 encodes one PU of one layer that constitutes the single layer into one AU (S407).

[0691] It is not necessary for all of the PTL / DPB / HRD information to be encoded in the VPS and SPS. For example, if some or all of the PTL / DPB / HRD information is unnecessary, it is not necessary for all or part of the PTL / DPB / HRD information to be encoded.

[0692] Furthermore, in encoding the SPS (S410) in the above processing flow, the encoding device 100 may encode the SPS for each layer. The encoding device 100 may then encode PTL / DPB / HRD information for the base layer into the SPS for the base layer among the multiple SPSs. The encoding device 100 may encode PTL / DPB / HRD information for other layers into the SPS for other layers, or may not encode PTL / DPB / HRD information for other layers into the SPS for other layers.

[0693] The above process flow is an example of a process flow. For example, some of the processes in the above process flow may be omitted or changed. Furthermore, processes different from the processes described above may be added to the above process flow.

[0694] [Supplementary Note] With the above configuration, for example, whether a single-layer structured bitstream or a multi-layer structured bitstream is transmitted as a broadcast bitstream, decoding of the base layer can be performed with the simplest configuration without distinction. Therefore, with regard to the decoding device 200, it is more likely that the number of development steps and the circuit scale can be reduced.

[0695] The above-described multiple aspects may be combined. The above-described multiple aspects may be partially combined. Furthermore, only some of the multiple components of one aspect may be used.

[0696] The PTL information in the present disclosure relates to profiles, tiers, and levels. The PTL information is also expressed as profile level information or profile-tier level information, and may also be expressed as "profiles, tiers, and levels." The PTL information specifies the limitations of the bitstream and the limitations of the tools used for decoding.

[0697] For example, a profile corresponds to a subset of available syntaxes among all syntaxes and corresponds to syntax restrictions, a level corresponds to restrictions on the values ​​of syntax elements and variables, and a tier corresponds to a category of a group of levels. In other words, PTL information may correspond to information indicating restrictions on syntax, information indicating available syntax, information indicating processing capacity requirements, etc.

[0698] Furthermore, for example, PTL information is used to indicate an implementation tool of the decoding device 200 and interoperability between the encoding device 100 and the decoding device 200. Furthermore, for example, the PTL information corresponds to information described in a syntax structure of profile_tier_level(). Furthermore, the PTL information may be information indicating at least one of a profile, a tier, and a level.

[0699] The DPB information in the present disclosure relates to buffer control of decoded pictures and timing of displaying pictures. The DPB information is also referred to as decoded picture buffer control information. For example, the DPB information corresponds to information described in the dpb_parameters() syntax structure. For example, the DPB information includes information on the DPB size, maximum picture order number (maximum POC), and / or maximum waiting time of one or more OLSs.

[0700] That is, the DPB information may indicate the display timing, which may also be expressed as the display time, the output timing, or the output time.

[0701] Furthermore, the HRD information of the present disclosure relates to the timing of extracting coded pictures from a coded picture buffer, i.e., the timing of decoding pictures. The HRD information is also expressed as decoding timing control information. For example, the HRD information may include information indicating the HRD output time interval between multiple pictures whose output order is consecutive. That is, the HRD information may indicate the decoding timing. Here, the decoding timing may also be expressed as the decoding time.

[0702] Also, for example, the HRD information corre...

Claims

1. An encoding device comprising: a circuit; and a memory connected to the circuit, wherein the circuit, in operation, encodes PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, the PTL / DPB / HRD information for a base layer, into a bitstream according to a constraint on the bitstream, wherein the constraint includes that, if the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information be included in a Sequence Parameter Set (SPS) in the bitstream.

2. The encoding device according to claim 1, wherein the constraint includes that the PTL / DPB / HRD information is included in the SPS in both cases where the bitstream is a bitstream with the multi-layer structure and where the bitstream is a bitstream with a single-layer structure.

3. The encoding device according to claim 2, wherein the constraint allows both that a VPS (Video Parameter Set) including the PTL / DPB / HRD information is included in the bitstream when the bitstream is a bitstream with the single layer structure, and that the VPS including the PTL / DPB / HRD information is not included in the bitstream.

4. The encoding device of claim 3, wherein the SPS includes a parameter having a value indicating an identifier of the VPS to be referenced or a value indicating that no VPS is referenced, and the constraint includes that if the bitstream is a bitstream with a single layer structure and the VPS including the PTL / DPB / HRD information is included in the bitstream, the parameter has a value indicating an identifier of the VPS.

5. The encoding device of claim 3, wherein the SPS includes a parameter having a value indicating an identifier of the VPS to be referenced or a value indicating that no VPS is referenced, and the constraint includes that if the bitstream is a bitstream with the single-layer structure and the VPS including the PTL / DPB / HRD information is not included in the bitstream, the parameter has a value indicating that no VPS is referenced.

6. The encoding device according to any one of claims 1 to 5, wherein the constraint includes that, when the bitstream is a bitstream with the multi-layer structure, the bitstream includes a Video Parameter Set (VPS) including PTL / DPB / HRD information for each of a plurality of layer sets, and the PTL / DPB / HRD information for the base layer is PTL / DPB / HRD information for one of the plurality of layer sets.

7. A decoding device comprising: a circuit; and a memory connected to the circuit, wherein the circuit, in operation, decodes PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, from a bitstream in accordance with a constraint on the bitstream, the PTL / DPB / HRD information being for a base layer, and wherein the constraint includes that, if the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information be included in an SPS (Sequence Parameter Set) in the bitstream.

8. The decoding device according to claim 7, wherein the constraint includes that the PTL / DPB / HRD information is included in the SPS in both cases where the bitstream is a bitstream with the multi-layer structure and where the bitstream is a bitstream with a single-layer structure.

9. The decoding device according to claim 8, wherein the constraint allows both that a VPS (Video Parameter Set) including the PTL / DPB / HRD information is included in the bitstream when the bitstream is a bitstream with the single layer structure, and that the VPS including the PTL / DPB / HRD information is not included in the bitstream.

10. The decoding device of claim 9, wherein the SPS includes a parameter having a value indicating an identifier of the VPS to be referenced or a value indicating that no VPS is referenced, and the constraint includes that if the bitstream is a bitstream with a single layer structure and the VPS including the PTL / DPB / HRD information is included in the bitstream, the parameter has a value indicating an identifier of the VPS.

11. The decoding device of claim 9, wherein the SPS includes a parameter having a value indicating an identifier of the VPS to be referenced or a value indicating that no VPS is referenced, and the constraint includes that if the bitstream is a bitstream with the single-layer structure and the VPS including the PTL / DPB / HRD information is not included in the bitstream, the parameter has a value indicating that no VPS is referenced.

12. The decoding device according to any one of claims 7 to 11, wherein the constraint includes that, when the bitstream is a bitstream of the multi-layer structure, the bitstream includes a VPS (Video Parameter Set) including PTL / DPB / HRD information for each of a plurality of layer sets, and the PTL / DPB / HRD information for the base layer is PTL / DPB / HRD information for one of the plurality of layer sets.

13. The decoding device according to any one of claims 7 to 11, wherein the SPS includes a parameter having a value indicating an identifier of a referenced VPS (Video Parameter Set) or a value indicating that no VPS is referenced, and wherein, when the bitstream is a bitstream with the multi-layer structure, in decoding the base layer video, the circuit ignores the VPS even if the VPS is included in the bitstream, does not refer to the VPS even if the parameter included in the SPS has a value indicating an identifier of the referenced VPS, and decodes the PTL / DPB / HRD information for the base layer from the SPS in the bitstream.

14. The decoding device of claim 13, wherein the circuit, when decoding the base layer video, is common to both the case where the bitstream is a bitstream with the multi-layer structure and the case where the bitstream is a bitstream with a single-layer structure, ignores the VPS even if the VPS is included in the bitstream, does not refer to the VPS even if the parameter included in the SPS has a value indicating an identifier of the VPS to be referenced, and decodes the PTL / DPB / HRD information for the base layer from the SPS in the bitstream.

15. The decoding device according to claim 13, wherein the circuit decodes the VPS when the VPS is ignored, does not refer to the VPS in processing after the VPS is decoded, and discards the VPS.

16. A bitstream generating device comprising: a circuit; and a memory connected to the circuit, wherein the circuit generates the bitstream including PTL / DPB / HRD information, the PTL / DPB / HRD information being at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, by encoding the PTL / DPB / HRD information for a base layer into the bitstream according to a constraint on the bitstream, wherein the constraint includes that, when the bitstream has a multi-layer structure, the PTL / DPB / HRD information be included in a Sequence Parameter Set (SPS) in the bitstream.

17. A coding method comprising: encoding PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, the PTL / DPB / HRD information for a base layer, into a bitstream according to a constraint on the bitstream, wherein the constraint includes that if the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in a Sequence Parameter Set (SPS) in the bitstream.

18. A decoding method comprising: decoding PTL / DPB / HRD information, which is at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, from a bitstream according to a constraint on the bitstream, the PTL / DPB / HRD information being for a base layer; wherein the constraint includes that, if the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in an SPS (Sequence Parameter Set) in the bitstream.

19. A bitstream generating method, comprising: generating the bitstream including the PTL / DPB / HRD information, the PTL / DPB / HRD information being at least one of PTL (Profile, Tier, and Level) information, DPB (Decoded Picture Buffer) information, and HRD (Hypothetical Reference Decoder) information, the PTL / DPB / HRD information being for a base layer, by encoding the PTL / DPB / HRD information into the bitstream according to a constraint on the bitstream; wherein the constraint includes that, if the bitstream is a bitstream with a multi-layer structure, the PTL / DPB / HRD information is included in an SPS (Sequence Parameter Set) in the bitstream.

Citation Information

Patent Citations

  • Derivation of SPS time ID nesting information for multilayer bitstreams

    JP2017513352A

  • Encoding device, decoding device, encoding method, and decoding method

    JP2023144069A

  • Image encoding / decoding method and device for signaling HRD parameters, and computer-readable recording medium in which bitstream is stored

    JP2024096485A

  • Error mitigation for sublayers in video coding

    JP2024099515A