Encoding device, decoding device, and bitstream transmission device

By splitting luma VPDU blocks based on split flags and predicting chroma samples with or without luma samples, the solution improves coding efficiency and image quality while reducing resource usage and processing speed in video coding.

JP2026035736AActive Publication Date: 2026-03-04PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-04

AI Technical Summary

Technical Problem

Existing video coding technologies face challenges in improving coding efficiency, image quality, and reducing circuit scale, particularly in handling predicted chroma samples during encoding and decoding processes.

Method used

The proposed solution involves a circuit that determines whether to split a luma VPDU into smaller blocks based on a split flag associated with the corresponding chroma VPDU, predicting chroma samples with or without using luma samples, and encoding or decoding these blocks accordingly.

Benefits of technology

This approach enhances coding efficiency, improves image quality, reduces resource usage, and optimizes processing speed by appropriately selecting block sizes, motion vectors, and reference pictures during encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026035736000001_ABST
    Figure 2026035736000001_ABST
Patent Text Reader

Abstract

Further advancements, improvements and optimizations in the encoding of blocks using predicted chroma samples.SOLUTION: An encoding device including a circuit and a memory connected to the circuit, the circuit being configured to, in operation, determine, based on a split flag associated with a luminance VPDU, whether to split the luminance VPDU into smaller blocks when the luminance VPDU is to be split into smaller blocks, the luminance VPDU being to be processed and a chrominance VPDU corresponding to the luminance VPDU being smaller; For the determination that the luma VPDU to be processed is not split into smaller blocks, the blocks of chroma samples are predicted without using luma samples, and for the determination that the luma VPDU to be processed is split into smaller blocks, the blocks of chroma samples are predicted using luma samples and the blocks are encoded using the predicted chroma samples.SELECTED DRAWING: Figure 97
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] TECHNICAL FIELD This disclosure relates to video coding, and in particular to video encoding and decoding systems, components, and methods, such as encoding blocks using predicted chroma samples. [Background technology]

[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 ever-increasing amounts of digital video data in various applications. This disclosure relates to further advances, improvements, and optimizations in video coding, particularly in encoding blocks using predicted chroma samples. Summary of the Invention [Means for solving the problem]

[0003] In one aspect, an encoding device includes a circuit and a memory coupled to the circuit. The circuit operates to determine whether to split a current luma VPDU (virtual pipeline decoding unit) into smaller blocks when a corresponding chroma VPDU is split into smaller blocks based on a split flag associated with the current luma VPDU. If the circuit determines not to split the current luma VPDU into smaller blocks, it predicts a block of chroma samples without using luma samples. If the circuit determines to split the current luma VPDU into smaller blocks, it predicts a block of chroma samples using luma samples. The circuit then encodes the block using the predicted chroma samples.

[0004] In one aspect, a decoding device includes a circuit and a memory coupled to the circuit. The circuit operates to determine whether to split a current luma VPDU (virtual pipeline decoding unit) into smaller blocks when a corresponding chroma VPDU is split into smaller blocks based on a split flag associated with the luma VPDU. If the current luma VPDU is not split into smaller blocks, the circuit predicts blocks of chroma samples without using luma samples. If the current luma VPDU is split into smaller blocks, the circuit predicts blocks of chroma samples using luma samples. The circuit decodes the blocks using the predicted chroma samples.

[0005] In one aspect, a bitstream transmission device includes a circuit and a memory. The circuit, in operation, determines whether to split a luma VPDU (virtual pipeline decoding unit) into smaller blocks, where a corresponding chroma VPDU is split into smaller blocks, based on parameters related to split information including a split flag associated with the luma VPDU. If it is determined that the luma VPDU is not to be split into smaller blocks, the circuit predicts a block of chroma samples without using luma samples. If it is determined that the luma VPDU is to be split into smaller blocks, the circuit predicts a block of chroma samples using luma samples. The circuit encodes the block using the predicted chroma samples. The circuit transmits a bitstream including the parameters related to the split information.

[0006] In video coding technology, there is a demand for new methods to improve coding efficiency, improve image quality, reduce circuit scale, etc. Implementation of each embodiment of the present disclosure, including the components of the embodiments of the present disclosure considered alone or in various combinations, enables at least one of, for example, improved coding efficiency, improved image quality, reduced use of encoding / decoding processing resources, reduced circuit scale, or improved encoding / decoding processing speed.

[0007] Furthermore, implementation of each embodiment of the present disclosure, including the elements of the embodiments of the present disclosure considered alone or in various combinations, enables appropriate selection of elements / operations, such as filters, block sizes, motion vectors, reference pictures, and reference blocks, during encoding and decoding. Note that the present disclosure also includes disclosure of configurations or methods that may provide benefits other than those described above, such as configurations or methods that improve coding efficiency while minimizing the increase in processing resource usage.

[0008] Further advantages and benefits of the disclosed embodiments 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.

[0009] These general or specific embodiments may be realized as a system, a method, an integrated circuit, a computer program, or a recording medium, or may be realized as any combination of a system, a method, an integrated circuit, a computer program, and a recording medium. [Brief explanation of the drawings]

[0010] [Figure 1] FIG. 1 is a schematic diagram illustrating an example of a functional configuration of a transmission system according to an embodiment. [Figure 2] FIG. 2 is a conceptual diagram showing an example of a hierarchical structure of data in a stream. [Figure 3] FIG. 3 is a conceptual diagram showing an example of the configuration of a slice. [Figure 4] FIG. 4 is a conceptual diagram showing an example of the configuration of a tile. [Figure 5] FIG. 5 is a conceptual diagram showing an example of a coding structure for scalable coding. [Figure 6] FIG. 6 is a conceptual diagram showing an example of a coding structure for scalable coding. [Figure 7] FIG. 7 is a block diagram illustrating an example of a functional configuration of an encoding device according to an embodiment. [Figure 8] FIG. 8 is a functional block diagram showing an implementation example of an encoding device. [Figure 9] FIG. 9 is a flowchart showing an example of the overall encoding process performed by the encoding device. [Figure 10] FIG. 10 is a conceptual diagram showing an example of block division. [Figure 11] FIG. 11 is a block diagram illustrating an example of a functional configuration of a dividing unit according to the embodiment. [Figure 12] FIG. 12 is a conceptual diagram showing an example of a division pattern. [Figure 13A] FIG. 13A is a conceptual diagram showing an example of a syntax tree of a division pattern. [Figure 13B] FIG. 13B is a conceptual diagram showing another example of a syntax tree of a division pattern. [Figure 14] FIG. 14 is a table showing examples of transformation basis functions corresponding to each transformation type. [Figure 15] FIG. 15 is a conceptual diagram showing an example of SVT (spatially varying transform). [Figure 16] FIG. 16 is a flowchart illustrating an example of processing by the conversion unit. [Figure 17] FIG. 17 is a flowchart showing another example of the process performed by the conversion unit. [Figure 18] FIG. 18 is a block diagram illustrating an example of a functional configuration of a quantization unit according to the embodiment. [Figure 19] FIG. 19 is a flowchart showing an example of the quantization process performed by the quantization unit. [Figure 20] FIG. 20 is a block diagram illustrating an example of a functional configuration of the entropy coding unit according to the embodiment. [Figure 21] FIG. 21 is a conceptual diagram showing an example of the flow of CABAC (context-based adaptive binary arithmetic coding) processing in the entropy encoding unit. [Figure 22] FIG. 22 is a block diagram illustrating an example of a functional configuration of a loop filter unit according to the embodiment. [Figure 23A] FIG. 23A is a conceptual diagram showing an example of the shape of a filter used in an ALF (adaptive loop filter). [Figure 23B] FIG. 23B is a conceptual diagram showing another example of the shape of the filter used in ALF. [Figure 23C] FIG. 23C is a conceptual diagram showing another example of the shape of the filter used in ALF. [Figure 23D] FIG. 23D is a conceptual diagram showing an example of the flow of CCALF (cross component ALF). [Figure 23E] FIG. 23E is a conceptual diagram showing the filter shape used in CCALF. [Figure 23F] FIG. 23F is a conceptual diagram showing an example of the flow of JC-CCALF (Joint Chroma CCALF). [Figure 23G] FIG. 23G is a table showing examples of weight_index candidates for JC-CCALF. [Figure 24] FIG. 24 is a block diagram showing an example of a detailed configuration of a loop filter unit that functions as a DBF (deblocking filter). [Figure 25] FIG. 25 is a conceptual diagram showing an example of a deblocking filter having filter characteristics that are symmetric with respect to block boundaries. [Figure 26] FIG. 26 is a conceptual diagram for explaining an example of a block boundary on which deblocking filtering is performed. [Figure 27] FIG. 27 is a conceptual diagram showing an example of a Bs (Boundary strength) value. [Figure 28] FIG. 28 is a flowchart illustrating an example of processing performed by the prediction unit of the encoding device. [Figure 29] FIG. 29 is a flowchart showing another example of the processing performed by the prediction unit of the encoding device. [Figure 30] FIG. 30 is a flowchart showing another example of the processing performed by the prediction unit of the encoding device. [Figure 31] FIG. 31 is a conceptual diagram showing 67 intra prediction modes in intra prediction according to the embodiment. [Figure 32] FIG. 32 is a flowchart illustrating an example of processing by the intra prediction unit. [Figure 33] FIG. 33 is a conceptual diagram showing an example of each reference picture. [Figure 34]FIG. 34 is a conceptual diagram illustrating an example of a reference picture list. [Figure 35] FIG. 35 is a flowchart showing an example of the basic processing flow of inter prediction. [Figure 36] FIG. 36 is a flowchart showing an example of a motion vector (MV) derivation process. [Figure 37] FIG. 37 is a flowchart showing another example of the MV derivation process. [Figure 38A] FIG. 38A is a conceptual diagram showing an example of the characteristics of each mode of MV derivation. [Figure 38B] FIG. 38B is a conceptual diagram showing an example of the characteristics of each mode of MV derivation. [Figure 39] FIG. 39 is a flowchart showing an example of inter prediction processing in normal inter mode. [Figure 40] FIG. 40 is a flowchart showing an example of inter prediction processing in the normal merge mode. [Figure 41] FIG. 41 is a conceptual diagram for explaining an example of MV derivation processing in the normal merge mode. [Figure 42] FIG. 42 is a conceptual diagram illustrating an example of MV derivation processing for the current picture in HMVP merge mode. [Figure 43] FIG. 43 is a flowchart showing an example of FRUC (frame rate up conversion) processing. [Figure 44] FIG. 44 is a conceptual diagram for explaining an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. [Figure 45] FIG. 45 is a conceptual diagram for explaining an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. [Figure 46A] FIG. 46A is a conceptual diagram illustrating an example of derivation of an MV for each sub-block based on the MVs of a plurality of adjacent blocks. [Figure 46B]FIG. 46B is a conceptual diagram for explaining an example of derivation of MVs in sub-block units in the affine mode using three control points. [Figure 47A] FIG. 47A is a conceptual diagram for explaining an example of deriving the MV of a control point in the affine mode. [Figure 47B] FIG. 47B is a conceptual diagram for explaining an example of deriving the MV of a control point in the affine mode. [Figure 47C] FIG. 47C is a conceptual diagram for explaining an example of deriving the MV of a control point in the affine mode. [Figure 48A] FIG. 48A is a conceptual diagram for explaining an affine mode having two control points. [Figure 48B] FIG. 48B is a conceptual diagram for explaining an affine mode having three control points. [Figure 49A] FIG. 49A is a conceptual diagram illustrating 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. [Figure 49B] FIG. 49B is a conceptual diagram for explaining another example of a method for deriving an MV of a control point when the number of control points differs between an already-encoded block and a current block. [Figure 50] FIG. 50 is a flowchart showing an example of processing in the affine merge mode. [Figure 51] FIG. 51 is a flowchart showing an example of processing in the affine inter mode. [Figure 52A] FIG. 52A is a conceptual diagram for explaining generation of predicted images of two triangles. [Figure 52B] FIG. 52B is a conceptual diagram illustrating an example of a first portion of a first partition that overlaps with a second partition, as well as a first and second sample set that may be weighted as part of the correction process. [Figure 52C] FIG. 52C is a conceptual diagram illustrating a first portion of a first partition, the portion of the first partition overlapping a portion of an adjacent partition. [Figure 53] FIG. 53 is a flowchart showing an example of processing in the triangle mode. [Figure 54] FIG. 54 is a conceptual diagram showing an example of an Advanced Temporal Motion Vector Prediction (ATMVP) mode in which MVs are derived for each sub-block. [Figure 55] FIG. 55 is a flowchart showing the relationship between merge mode and DMVR (dynamic motion vector refreshing). [Figure 56] FIG. 56 is a conceptual diagram illustrating an example of a DMVR. [Figure 57] FIG. 57 is a conceptual diagram for explaining another example of the DMVR for determining the MV. [Figure 58A] FIG. 58A is a conceptual diagram showing an example of motion estimation in DMVR. [Figure 58B] FIG. 58B is a flowchart showing an example of motion estimation processing in the DMVR. [Figure 59] FIG. 59 is a flowchart showing an example of a predicted image generation process. [Figure 60] FIG. 60 is a flowchart showing another example of the predicted image generation process. [Figure 61] FIG. 61 is a flowchart illustrating an example of a predictive image correction process using OBMC (overlapped block motion compensation). [Figure 62] FIG. 62 is a conceptual diagram illustrating an example of the predicted image correction process using OBMC. [Figure 63] FIG. 63 is a conceptual diagram for explaining a model assuming uniform linear motion. [Figure 64] FIG. 64 is a flowchart showing an example of inter prediction processing according to BIO. [Figure 65] FIG. 65 is a functional block diagram showing an example of the functional configuration of an inter prediction unit that performs inter prediction according to BIO. [Figure 66A] FIG. 66A is a conceptual diagram for explaining an example of processing of a predicted image generating method using luminance correction processing by LIC (local illumination compensation). [Figure 66B] FIG. 66B is a flowchart showing an example of processing in a predicted image generation method using luminance correction processing by LIC. [Figure 67] FIG. 67 is a block diagram showing a functional configuration of a decoding device according to an embodiment. [Figure 68] FIG. 68 is a functional block diagram showing an implementation example of a decoding device. [Figure 69] FIG. 69 is a flowchart showing an example of the overall decoding process by the decoding device. [Figure 70] FIG. 70 is a conceptual diagram showing the relationship between the division determination unit and other components. [Figure 71] FIG. 71 is a block diagram showing an example of the functional configuration of the entropy decoding unit. [Figure 72] FIG. 72 is a conceptual diagram showing an example of the flow of CABAC processing in the entropy decoding unit. [Figure 73] FIG. 73 is a block diagram showing an example of the functional configuration of the inverse quantization unit. [Figure 74] FIG. 74 is a flowchart showing an example of the inverse quantization process performed by the inverse quantization unit. [Figure 75] FIG. 75 is a flowchart showing an example of processing by the inverse conversion unit. [Figure 76] FIG. 76 is a flowchart showing another example of the process performed by the inverse conversion unit. [Figure 77] FIG. 77 is a block diagram showing an example of the functional configuration of the loop filter unit. [Figure 78] FIG. 78 is a flowchart showing an example of processing performed by the prediction unit of the decoding device. [Figure 79] FIG. 79 is a flowchart showing another example of the processing performed by the prediction unit of the decoding device. [Figure 80]FIG. 80 is a flowchart showing another example of the processing performed by the prediction unit of the decoding device. [Figure 81] FIG. 81 is a diagram illustrating an example of processing by the intra prediction unit of the decoding device. [Figure 82] FIG. 82 is a flowchart showing an example of an MV derivation process in a decoding device. [Figure 83] FIG. 83 is a flowchart showing another example of the MV derivation process in the decoding device. [Figure 84] FIG. 84 is a flowchart showing an example of inter prediction processing in the normal inter mode in the decoding device. [Figure 85] FIG. 85 is a flowchart showing an example of inter prediction processing in the normal merge mode in the decoding device. [Figure 86] FIG. 86 is a flowchart showing an example of inter prediction processing in the FRUC mode in the decoding device. [Figure 87] FIG. 87 is a flowchart showing an example of inter prediction processing in the affine merge mode in the decoding device. [Figure 88] FIG. 88 is a flowchart showing an example of inter prediction processing in the affine inter mode in the decoding device. [Figure 89] FIG. 89 is a flowchart showing an example of inter prediction processing in the triangle mode in the decoding device. [Figure 90] FIG. 90 is a flowchart showing an example of a motion estimation process by the DMVR in the decoding device. [Figure 91] FIG. 91 is a flowchart showing an example of a motion estimation process by the DMVR in the decoding device. [Figure 92] FIG. 92 is a flowchart showing an example of a process for generating a predicted image in a decoding device. [Figure 93] FIG. 93 is a flowchart showing another example of the process of generating a predicted image in the decoding device. [Figure 94]FIG. 94 is a flowchart showing an example of correction processing of a predicted image by OBMC in a decoding device. [Figure 95] FIG. 95 is a flowchart showing an example of a correction process for a predicted image by BIO in a decoding device. [Figure 96] FIG. 96 is a flowchart showing an example of a correction process of a predicted image by LIC in a decoding device. [Figure 97] FIG. 97 is a flowchart illustrating an example of a process for decoding a block using predicted chroma samples. [Figure 98] FIG. 98 is a conceptual diagram for explaining an example of determining whether the chrominance block to be processed is within an M×N non-overlapping area that coincides with the M×N grid of chrominance samples. [Figure 99] FIG. 99 is a conceptual diagram for explaining an example of determining whether the chrominance block to be processed is within an M×N non-overlapping area that coincides with the M×N grid of chrominance samples. [Figure 100] FIG. 100 is a conceptual diagram for explaining a VPDU (virtual pipeline decoding unit). [Figure 101] FIG. 101 is a conceptual diagram illustrating an example of determining whether a VPDU to be processed can be used to predict a block of chrominance samples. [Figure 102] FIG. 102 is a conceptual diagram for explaining an example of a method for determining whether or not to divide a luminance VPDU into smaller blocks. [Figure 103] FIG. 103 is a conceptual diagram illustrating the use of a threshold size to determine whether or not to predict chrominance samples of a block using luminance samples. [Figure 104] FIG. 104 is a conceptual diagram showing an example of a non-rectangular partition. [Figure 105] FIG. 105 is a diagram showing the overall configuration of a content supply system that realizes a content distribution service. [Figure 106] FIG. 106 is a conceptual diagram showing an example of a display screen of a web page. [Figure 107] FIG. 107 is a conceptual diagram showing an example of a display screen of a web page. [Figure 108] FIG. 108 is a block diagram showing an example of a smartphone. [Figure 109] FIG. 109 is a block diagram showing an example of the functional configuration of a smartphone. DETAILED DESCRIPTION OF THE INVENTION

[0011] In the drawings, the same reference numbers refer to the same or similar components unless the content dictates otherwise, and the sizes and relative positions of components in the drawings are not necessarily drawn to scale.

[0012] 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.

[0013] Hereinafter, 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.

[0014] (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.

[0015] (2) In the encoding device or decoding device of the embodiment, the functions or processes performed by some of the multiple 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.

[0016] (3) In the method implemented by the encoding device or decoding device of 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.

[0017] (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 any of the aspects of the present disclosure.

[0018] (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.

[0019] (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.

[0020] (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.

[0021] (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 the video encoding or video decoding disclosed in the embodiments.

[0022] [Term definition] As an example, each term may be defined as follows:

[0023] An image is a unit of data made up of a set of pixels, and consists of pictures and smaller blocks. Images include both moving images and still images.

[0024] A picture, sometimes called a frame or a field, is a unit of image processing that consists of a set of pixels. A picture may take the form of, for example, a luma sample array in monochrome format, or a luma sample array and two corresponding chroma sample arrays in 4:2:0, 4:2:2, and 4:4:4 color formats.

[0025] A block is a processing unit containing a specific number of pixels. A block can have any shape. For example, a rectangle containing M×N pixels, a square containing M×M pixels, a triangle, a circle, or other shapes are possible. Examples of blocks include slices, tiles, bricks, CTUs, superblocks, basic division units, VPDUs, hardware processing division units, CUs, processing block units, prediction block units (PUs), orthogonal transform block units (TUs), units, and subblocks. A block may take the form of an M×N array of samples or an M×N array of transform coefficients. For example, a block may be a square or rectangular region of pixels containing one luma matrix and two chroma matrices.

[0026] A pixel or a sample is the smallest unit point that makes up an image. Pixels or samples include not only pixels at integer positions, but also pixels at sub-pixel positions that are generated based on pixels at integer positions.

[0027] A pixel value or sample value is a value inherent to a pixel. The pixel value or sample value may include one or more luminance values, color difference values, RGB gradations, as well as a depth value or two values ​​of 0 and 1.

[0028] Color difference (chroma or chrominance) is the intensity of a color and is usually represented by the symbols Cb and Cr, indicating that a sample array value or a single sample value represents the value of one of two color difference signals associated with the primary colors.

[0029] Luma (or luminance) is the brightness of an image and is usually represented by the symbol or subscript Y or L to indicate that the sample array value or single sample value represents a monochrome signal value associated with a primary color.

[0030] The flag may be one bit or multiple bits, and may be, for example, the value of a parameter or an index. The flag may also be a binary flag indicating a two-value flag, or may indicate a non-binary value of a parameter.

[0031] A signal conveys information symbolized or encoded by the signal, and includes both discretized digital signals and continuous-valued analog signals.

[0032] A stream or bitstream is a digital data string of a digital data flow. A stream or bitstream may consist of a single stream or multiple streams divided into multiple layers. It may also be transmitted by serial communication over a single transmission line, or by packet communication over multiple transmission lines.

[0033] Difference or differential refers to various mathematical differences, such as simple difference (xy), absolute difference (|xy|), squared difference (x^2-y^2), square root of difference (√(xy)), weighted difference (ax-by: a, b are constants), offset difference (x-y+a: a is offset), etc. For scalar quantities, simple difference is sufficient, and a difference operation may also be included.

[0034] Sum refers to various mathematical sums such as simple sum (x+y), absolute sum (|x+y|), sum of squares (x^2+y^2), square root of sum (√(x+y)), weighted sum (ax+by: a, b is a constant), offset sum (x+y+a: a is an offset), etc. For scalar quantities, simple sum is sufficient, and sum operations may be included.

[0035] A frame is a combination of a top field and a bottom field, with sample rows 0, 2, 4, ... coming from the top field and sample rows 1, 3, 5, ... coming from the bottom field.

[0036] A slice is an integer number of coding tree units that are contained in one independent slice segment and all subsequent dependent slice segments (if any) that precede the next independent slice segment (if any) within the same access unit.

[0037] A tile is a rectangular region of a coding tree block within a particular tile column and a particular tile row of a picture. A tile may also be a rectangular region of a frame. Tiles are intended to be independently decoded and coded, although loop filters across tile edges may still be applied.

[0038] A coding tree unit (CTU) may be a coding tree block of luma samples for a picture with a three-sample arrangement, or the corresponding two coding tree blocks of chroma samples. Alternatively, a CTU may be a coding tree block of one sample for a monochrome picture and a picture coded using the syntax structure and three separate color planes used to code the samples. A superblock may be a square block of 64x64 pixels, consisting of one or two mode information blocks, or recursively divided into four 32x32 blocks, each of which can be further divided.

[0039] [System Configuration] First, a transmission system according to an embodiment will be described. Fig. 1 is a schematic diagram showing an example of the configuration of a transmission system 400 according to this embodiment.

[0040] The transmission system 400 is a system that transmits a stream generated by encoding an image and decodes the transmitted stream. As shown in the figure, the transmission system 400 includes an encoding device 100, a network 300, and a decoding device 200, as shown in FIG. 1, for example.

[0041] 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 300. The stream includes, for example, the encoded image and control information for decoding the encoded image. The image is compressed by this encoding.

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

[0043] The network 300 transmits the stream generated by the encoding device 100 to the decoding device 200. The network 300 may be a network such as the Internet, a wide area network (WAN), The network 300 may be a large area network (LAN), a small-scale network (LAN: Local Area Network), or a combination of these. The network 300 is not necessarily limited to a two-way communication network, but may be a one-way communication network that transmits broadcast waves such as terrestrial digital broadcasting or satellite broadcasting. Furthermore, the network 300 may be replaced by a storage medium that records streams, such as a DVD (Digital Versatile Disc) or a BD (Blue-Ray Disc (registered trademark)).

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

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

[0046] [Data Structure] Fig. 2 is a conceptual diagram showing an example of a hierarchical structure of data in a stream. For convenience, Fig. 2 will be described with reference to the transmission system 400 of Fig. 1. The stream includes, for example, a video sequence. This video sequence includes, for example, one or more Video Parameter Sets (VPSs), one or more Sequence Parameter Sets (SPSs), one or more Picture Parameter Sets (PPSs), Supplemental Enhancement Information (SEI), and a plurality of pictures, as shown in Fig. 2(a).

[0047] In a video composed of multiple layers, the VPS may include coding parameters common to multiple layers, as well as coding parameters related to multiple layers or individual layers included in the video.

[0048] The SPS includes parameters used for a 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.

[0049] 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.

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

[0051] 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.

[0052] A brick is composed of one or more CTUs (Coding Tree Units), as shown in Figure 2(d). Includes the Serial Number (Serial Number).

[0053] 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.

[0054] A CTU is also called a superblock or a basic division unit. As shown in (e) of FIG. 2, a CTU includes a CTU header and one or more coding units (CUs). As shown in the figure, a CTU includes four CUs: CU(10), CU(11), CU(12), and CU(13). The CTU header includes coding parameters that decoding device 200 references to decode one or more CUs.

[0055] A CU may be divided into multiple smaller CUs. As shown in the figure, CU(10) is not divided into smaller CUs, CU(11) is divided into four smaller CUs (110), CU(111), CU(112), and CU(113), CU(12) is not divided into smaller CUs, and CU(13) is divided into seven smaller CUs (1310), CU(1311), CU(1312), CU(1313), CU(132), CU(133), and CU(134). Also, 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 a sub-block transform (SBT) 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.

[0056] Note that a stream does not necessarily have all of the layers shown in FIG. 2 . The order of these layers may be changed, or any layer may be replaced with another layer. 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.

[0057] [Picture Composition Slice / Tile] In order to perform picture encoding / decoding in parallel, a picture may be organized in slice units or tile units.

[0058] 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 CTUs.

[0059] FIG. 3 is a conceptual diagram illustrating an example of a slice configuration. For example, in FIG. 3, 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. Here, each CTU in a picture belongs to one of the slices. A slice is shaped like the picture divided horizontally. Slice boundaries do not need to be at the edges of the screen but may be anywhere within the boundaries of CTUs within the screen. The processing order (encoding order or decoding order) of CTUs within 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 CTU at the beginning of the slice and the slice type.

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

[0061] FIG. 4 is a conceptual diagram illustrating an example of a tile configuration. For example, in FIG. 4, 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 may be different from when tiles are not used. When tiles are not used, multiple CTUs in a picture are typically processed in, for example, raster scan order. When tiles are used, at least one CTU in each of multiple tiles is processed in, for example, 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.

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

[0063] Note that a picture may be composed of tile sets. A tile set may include one or more tile groups and one or more tiles. A picture may be composed of any 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 consecutive basic coding orders within each tile set 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.

[0064] [Scalable Coding] 5 and 6 are conceptual diagrams showing an example of the structure of a scalable stream, and for convenience, will be described with reference to FIG.

[0065] As shown in FIG. 5, the encoding device 100 may generate a temporally / spatially scalable stream by encoding each of multiple pictures into one of multiple 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 may determine 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 of the 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. 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.

[0066] Furthermore, the enhancement layer may include meta-information based on image statistics, etc. The decoding device 200 may generate high-quality moving images by super-resolution of pictures in the base layer based on the meta-information. Super-resolution may be, for example, improving the signal-to-noise ratio at the same resolution or increasing the resolution. The meta-information may include information for specifying linear or nonlinear filter coefficients used in the super-resolution process, or information for specifying parameter values ​​in the filter process, machine learning, or least-squares calculation used in the super-resolution process.

[0067] In an embodiment, 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 an SEI (supplemental enhancement information) message in HEVC. This meta information indicates, for example, the position, size, or color of the main object.

[0068] Furthermore, the meta information may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units. This allows the decoding device 200 to acquire 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 (person) exists and the position of the object within that picture.

[0069] [Encoding device] Next, a coding device according to an embodiment will be described. Fig. 7 is a block diagram showing the functional configuration of coding device 100 according to an embodiment. Coding device 100 is a video coding device that codes moving images on a block-by-block basis.

[0070] 7, the encoding device 100 is a device that encodes an image on a block-by-block basis, and includes a division unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, a prediction control unit 128, and a prediction parameter generation unit 130. As shown in the figure, the intra prediction unit 124 and the inter prediction unit 126 are each part of the prediction control unit.

[0071] The encoding device 100 is realized by, for example, a general-purpose processor and memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the division unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filter unit 120, the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128. Alternatively, the encoding device 100 may be realized as one or more dedicated electronic circuits corresponding to the division unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation unit 114, the addition unit 116, the loop filter unit 120, the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.

[0072] [Example of an encoder implementation] 8 is a functional 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.

[0073] The processor a1 is a circuit that performs information processing and is connected to 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 among the multiple components of the encoding device 100 shown in FIG. 7.

[0074] 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.

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

[0076] 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 etc. For example, 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 block, a reconstructed picture, or the like.

[0077] 7 may not be implemented in the encoding device 100, and all of the processes described herein may not be performed. Some of the components shown in FIG. 7 may be included in another device, and some of the processes described herein may be performed by another device.

[0078] 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.

[0079] [Overall encoding process flow] FIG. 9 is a flowchart showing an example of the overall encoding process by the encoding device 100, and will be described with reference to FIG. 7 for convenience.

[0080] First, the division unit 102 of the encoding device 100 divides a picture included in an input image into a plurality of fixed-size blocks (e.g., 128×128 pixels) (step Sa_1). Then, the division unit 102 selects a division pattern for the fixed-size blocks (also called block shapes) (step Sa_2). That is, the division unit 102 further divides the fixed-size blocks 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 on each of the plurality of blocks (i.e., the block to be encoded).

[0081] The prediction processing unit, which is composed 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). The predicted image may also be called a predicted signal, a predicted block, or a predicted sample.

[0082] Next, the subtraction unit 104 generates a difference between the current block and the predicted image as a prediction residual (step Sa_4). The prediction residual may also be called a prediction error.

[0083] 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). The plurality of quantized coefficients may also be called a coefficient block.

[0084] 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). The stream may also be called a coded bitstream or a compressed bitstream.

[0085] 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).

[0086] 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. The reconstructed image may also be called a reconstructed block or a decoded image block.

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

[0088] 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 processing from step Sa_2 on the next block of the picture.

[0089] In the above example, encoding device 100 selects one division pattern for fixed-size blocks and encodes each block according to that division pattern, but encoding device 100 may also encode each block according to each of a plurality of division patterns. In this case, 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 output stream.

[0090] As shown in the figure, the processes of steps Sa_1 to Sa_10 are performed sequentially by the encoding device 100. Alternatively, some of the processes may be performed in parallel, or the order of the processes may be changed.

[0091] 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.

[0092] [Divided part] The division unit 102 divides each picture included in the original image into multiple blocks and outputs each block to the subtraction unit 104. For example, the division unit 102 first divides the picture into blocks of a fixed size (e.g., 128x128 pixels). Other fixed block sizes may also be applied. These fixed-size blocks are sometimes called coding tree units (CTUs). The division unit 102 then divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 pixels or less) based on, for example, recursive quadtree and / or binary tree block division. That is, the division unit 102 selects a division pattern. These variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transform units (TUs). Note that in various processing 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.

[0093] Fig. 10 is a conceptual diagram showing an example of block division in the 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.

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

[0095] 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 64x64 pixel block is divided into two 16x64 pixel rectangular blocks 11 and 12 and a 32x64 pixel rectangular block 13.

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

[0097] The lower left 64x64 pixel 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.

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

[0099] 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.

[0100] 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.

[0101] Fig. 11 is a block diagram showing an example of the functional configuration of the division unit 102 according to the embodiment. 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.

[0102] The block division determination unit 102a may, for example, acquire or read block information from the block memory 118 and / or the frame memory 122, and determine a division pattern (for example, the above-mentioned division pattern) based on the block information. The division unit 102 divides the original image according to the division pattern, and outputs one or more blocks obtained by the division to the subtraction unit 104.

[0103] Furthermore, the block division determination unit 102a outputs, for example, one or more parameters indicating the determined division pattern (for example, 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 a prediction residual based on the one or more parameters, and the intra prediction unit 124 and the inter prediction unit 126 may generate a predicted image based on the one or more parameters. Furthermore, the entropy coding unit 110 may perform entropy coding on the one or more parameters.

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

[0105] 12 is a conceptual diagram showing examples of division patterns. The division patterns include, for example, 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).

[0106] 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.

[0107] FIG. 13A is a conceptual diagram showing an example of a syntax tree of a division pattern.

[0108] FIG. 13B is a conceptual diagram showing another example of a syntax tree of a division pattern.

[0109] 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 there is information indicating the division direction (Ver: Vertical flag or Hor: Horizontal flag). Note 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.

[0110] 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 to perform splitting (S: Split flag), then there is information indicating whether or not to perform splitting into four (QT: QT flag). Next there is information indicating the split direction (Ver: Vertical flag or Hor: Horizontal flag), and then there is information indicating whether to perform splitting into two or three (BT: BT flag or TT: TT flag).

[0111] 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.

[0112] [Subtraction section] The subtraction unit 104 subtracts a predicted image (a predicted sample input from a prediction control unit 128, which will be described later) from the original image, for each block input from the division unit 102 and divided by the division unit 102. That is, the subtraction unit 104 calculates a prediction residual (also called an error) of the current block. Then, the subtraction unit 104 outputs the calculated prediction residual to the conversion unit 106.

[0113] The original images may be images input to the encoding device 100 as signals representing the images of each picture constituting a video sequence (e.g., a luminance (luma) signal and two color difference (chroma) signals). The signals representing the images may be called samples.

[0114] [Conversion section] 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. The predetermined DCT or DST may be determined in advance.

[0115] 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 called a basis.

[0116] 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 examples of 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 (such as intra prediction or inter prediction) or the intra prediction mode.

[0117] 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, but signaling of this information does not need to be limited to the CU level and may be at other levels (e.g., the sequence level, picture level, slice level, tile level, or CTU level).

[0118] Furthermore, the transform unit 106 may retransform the transform coefficients (i.e., the transform results). Such retransformation may be referred to as an adaptive secondary transform (AST) or a non-separable secondary transform (NSST). For example, the transform unit 106 performs retransformation for each sub-block (e.g., a 4x4 pixel sub-block) included in a block of transform coefficients corresponding to intra-prediction residuals. Information indicating whether 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 also be at other levels (e.g., the sequence level, picture level, slice level, tile level, or CTU level).

[0119] 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 multi-dimensional input as one dimension and performing transformation all at once.

[0120] For example, an example of a non-separable transformation is when the input is a 4x4 pixel block, it is treated as a single array with 16 elements, and a 16x16 transformation matrix is ​​used to perform transformation processing on that array.

[0121] Another example of a non-separable transform is a transformation (hypercube givens transform) in which an input block of 4x4 pixels is treated as a single array with 16 elements, and then a Givens rotation is performed multiple times on the array.

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

[0123] FIG. 15 is a conceptual diagram showing an example of SVT.

[0124] 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. The 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 be not only divided into two equal parts, but also into four equal parts. Furthermore, more flexibility is possible, for example, by encoding information indicating the division method and signaling it in the same way as CU division. SVT is also called SBT (Sub-block Transform).

[0125] 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 the transform type to be used for orthogonal transform without coding index information. When IMTS is applied, for example, if the shape of a CU is rectangular, the shorter sides of the rectangle may be orthogonally transformed using DST7, and the longer sides may be orthogonally transformed using DCT2. Also, for example, if the shape of a CU is square, if MTS is enabled in the sequence, DCT2 may be used for orthogonal transform, and if MTS is disabled, DST7 may be used for orthogonal transform. DCT2 and DST7 are merely examples, and other transform types may also be used, or different combinations of transform types may be used. IMTS may be usable only for intra-predicted blocks, or may be usable for both intra-predicted blocks and inter-predicted blocks.

[0126] The above describes three selection processes, MTS, SBT, and IMTS, for selectively switching the transform type used in the orthogonal transform. However, all three selection processes may be applied, or only some of them may be selectively applied. Whether one or more selection processes are applied can be identified, for example, by flag information in a header such as SPS. For example, if all three selection processes are available, 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 be a selection process different from the three selection processes described above, or each of the three selection processes may be replaced with a different process. Generally, at least one of the following four functions [1] to [4] is performed. 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 portion of a CU and encoding information indicating the transform type used for the transform. Function [4] is a function for performing an orthogonal transform on a portion of a CU and determining the transform type based on a predetermined rule without encoding information indicating the transform type used for the transform. The predetermined rule may be determined in advance.

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

[0128] 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.

[0129] FIG. 16 is a flowchart showing an example of processing by the conversion unit 106, and for convenience, the description will be given with reference to FIG.

[0130] For example, the transform unit 106 determines whether or not to perform an orthogonal transform (step St_1). If the transform unit 106 determines to perform an orthogonal transform (Yes in step St_1), the transform unit 106 selects a transform type to be used for the orthogonal transform from among a plurality of 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 entropy coding unit 110 to encode the information (step St_4). On the other hand, if the transform unit 106 determines not to perform an orthogonal transform (No in step St_1), the transform unit 106 outputs information indicating that an orthogonal transform will not be performed to the entropy coding unit 110, thereby causing the entropy coding unit 110 to encode the information (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 to be used for the orthogonal transform may not be encoded, and the orthogonal transform may be performed using a specified transform type. The defined transformation types may be predefined.

[0131] Fig. 17 is a flowchart showing an example of processing by transform unit 106, and for convenience, the description will be made with reference to Fig. 7. Note that the example shown in Fig. 17 is an example of orthogonal transform in which a method of selectively switching the transform type used for orthogonal transform is applied, similar to the example shown in Fig. 16.

[0132] For example, the first group of transform types may include DCT2, DST7, and DCT8. For example, the second group of transform types may include DCT2. The transform types included in the first group of transform types and the second group of transform types may partially overlap, or may all be different transform types.

[0133] The transform unit 106 determines whether the transform size is equal to or smaller than a predetermined value (step Su_1). If it is determined that the transform size is equal to or smaller 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 the 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 smaller 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). The predetermined value may be a threshold value or a predetermined value.

[0134] 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. 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 coded. The second transform type group may include multiple transform types, and the information indicating the transform type to be used for the orthogonal transform from among the one or more transform types included in the second transform type group may be coded.

[0135] Alternatively, the transform type may be indicated based on the transform size without encoding the information indicating the transform type. 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.

[0136] [Quantization section] 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 scanned 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. The predetermined scanning order may be determined in advance.

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

[0138] 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 in the quantized coefficient (quantization error) also increases.

[0139] 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 luma and chroma. Note that quantization refers to digitizing values ​​sampled at predetermined intervals by associating them with predetermined levels, and in this technical field, it may be referred to using other expressions such as rounding, scaling, or the like, or rounding, rounding, or scaling may be adopted. The predetermined intervals and levels may be predetermined.

[0140] 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, in this case, there may be a 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.

[0141] On the other hand, there is also a method of quantizing the high-frequency component coefficients and the low-frequency component coefficients without using a quantization matrix. This method can be considered equivalent to a method using a quantization matrix in which the coefficients have the same value (a flat matrix).

[0142] The quantization matrix may be coded at, for example, the sequence level, picture level, slice level, brick level, or CTU level. The quantization matrix may be specified in, for example, an SPS (Sequence Parameter Set) or a PPS (Picture Parameter Set). The SPS includes parameters used for a sequence, and the PPS includes parameters used for a picture. The SPS and PPS may sometimes be simply referred to as parameter sets.

[0143] 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 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. The predetermined value may be determined in advance.

[0144] 18 is a block diagram showing an example of a functional configuration of a quantization unit according to an embodiment. 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.

[0145] FIG. 19 is a flowchart showing an example of the quantization process by the quantization unit 108, and for convenience, the description will be made with reference to FIGS.

[0146] 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). Here, if it is determined that quantization is to be performed (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).

[0147] Next, the quantization processing unit 108e quantizes the transform coefficients of the current block using the quantization parameters generated in step Sv_2 (step Sv_4). Then, the predicted quantization parameter generation unit 108b 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). A differential quantization parameter may be generated by calculating this difference. The differential quantization parameter generation unit 108a outputs the differential quantization parameter to the entropy coding unit 110, thereby causing the differential quantization parameter to be coded (step Sv_8).

[0148] 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.

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

[0150] [Entropy coding section] FIG. 20 is a block diagram showing an example of the functional configuration of the entropy coding unit 110, and for convenience, the description will be made with reference to FIG. 7. 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 the entropy coding, for example, CABAC (Context-based Adaptive Binary Arithmetic Coding) is used. 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-level signals such as the quantization coefficients and the prediction parameters into binary signals. Examples of binarization methods include truncated rice binarization and exponential binarization. Examples of such methods include 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, according to the characteristics of a syntax element or the surrounding circumstances. Methods for deriving this context value include, for example, bypassing, referencing syntax elements, referencing upper and left adjacent blocks, referencing hierarchical information, and others. The binary arithmetic coding unit 110c performs arithmetic coding on the binary signal using the derived context value.

[0151] FIG. 21 is a conceptual diagram illustrating an example of the flow of CABAC processing in the entropy coding unit 110. 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 may sequentially perform binarization and arithmetic coding on, for example, each of the multiple quantized coefficients of a CTU. The context control unit 110b may update the context values ​​each time arithmetic coding is performed. Then, as post-processing, the context control unit 110b may save the context values. The saved context values ​​may be used, for example, as the initial context values ​​for the next CTU.

[0152] [Dequantization section] The inverse quantization unit 112 inverse quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse quantizes the quantized coefficients of the current block in a predetermined scanning order. The inverse quantization unit 112 then outputs the inverse quantized transform coefficients of the current block to the inverse transform unit 114. The predetermined scanning order may be determined in advance.

[0153] [Inverse conversion section] 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.

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

[0155] [Addition section] 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. The reconstructed block is sometimes called a local decoded block.

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

[0157] [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.

[0158] [Loop filter section] 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. The 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) filter.

[0159] FIG. 22 is a block diagram illustrating an example of the functional configuration of the loop filter unit 120 according to the embodiment. As shown in FIG. 22, the loop filter unit 120 includes a deblocking filter processor 120a, an SAO processor 120b, and an ALF processor 120c. The deblocking filter processor 120a performs the deblocking filter process described above on the reconstructed image. The SAO processor 120b performs the SAO process described above on the reconstructed image after the deblocking filter process. The ALF processor 120c applies the ALF process described above to the reconstructed image after the SAO process. Details of the ALF and the deblocking filter will be described later. The SAO process improves image quality by reducing ringing (a phenomenon in which pixel values ​​ripple around edges) and correcting pixel value deviations. Examples of the SAO process include edge offset processing and band offset processing. Note that the loop filter unit 120 does not necessarily have to include all of the processing units disclosed in Fig. 22, but may include some of the processing units, or may include additional 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. 22, and may not necessarily perform all of the processes.

[0160] [Loop filter section > Adaptive loop filter] ALF applies a least squares error filter to remove coding artifacts, for example, for each 2x2 pixel sub-block in the current block, one filter selected from multiple filters based on the local gradient direction and activity.

[0161] Specifically, first, sub-blocks (e.g., 2x2 pixel sub-blocks) are classified into multiple classes (e.g., 15 or 25 classes). The sub-blocks may be 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 sub-blocks are classified into multiple classes based on the classification value C.

[0162] 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.

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

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

[0165] Whether to turn on or off the ALF may be determined, for example, at the picture level or the CU level. For example, whether to apply the ALF for luminance may be determined at the CU level, and whether to apply the ALF for chrominance may be determined at the picture level. Information indicating whether to turn on or off the ALF is usually signaled at the picture level or the CU level. Note that signaling of information indicating whether to turn on or off the ALF does not need to be limited to the picture level or the CU level, and may be at another level (for example, the sequence level, the slice level, the tile level, or the CTU level).

[0166] 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 the 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, tile level, CTU level, CU level, or sub-block level).

[0167] [Loop Filter > Cross Component Adaptive Loop Filter] FIG. 23D is a conceptual diagram illustrating an example of a cross-component ALF (CC-ALF) flow. FIG. 23E is a conceptual diagram illustrating an example of a filter shape used in a CC-ALF such as the CC-ALF of FIG. 23D. One example of CC-ALF in FIG. 23D and FIG. 23E operates by applying a linear diamond-shaped filter to the luma channel of each chrominance component. For example, the filter coefficients are transmitted in APS, scaled by a factor of 2^10, and rounded for fixed-point representation. For example, in FIG. 23D, the Y sample (first component) is used for the Cb CCALF and the Cr CCALF (a component different from the first component).

[0168] The application of the filter may be controlled by variable block sizes and signaled by a context-coded flag received for each block of samples. Block size and CC-ALF enablement flags may be received at the slice level for each chroma component. CC-ALF supports a variety of block sizes, e.g., 16x16, 32x32, 64x64, and 128x128 (for chroma samples).

[0169] [Loop Filter > Joint Chroma Cross Component Adaptive Loop Filter] An example of a joint chrominance CCALF is shown in Figures 23F and 23G. Figure 23F is a diagram showing an example flow of the joint chrominance CCALF. Figure 23G is a table showing example weight_index candidates. As shown, one CCALF filter is used to generate one CCALF filter output as a chrominance adjustment signal for one color component, and a weighted version of the same chrominance adjustment signal is applied to the other color component. In this way, the complexity of existing CCALF is roughly halved. The weight value may be coded into a sign flag and a weight index. The weight index (denoted as weight_index) may be coded into 3 bits and specify a non-zero magnitude of the JC-CCALF weight JcCcWeight. The magnitude of JcCcWeight may be determined, for example, as follows:

[0170] If weight_index is 4 or less, JcCcWeight is equal to weight_index>>2.

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

[0172] The block-level on / off control for Cb and Cr ALF filtering may be separate. This is the same as CCALF, where two separate sets of block-level on / off control flags may be coded. Unlike CCALF, here, the Cb and Cr on / off control block sizes are the same, so only one block size variable may be coded.

[0173] [Loop filter section > Deblocking filter] In the deblocking filtering process, the loop filter unit 120 reduces distortions that occur at block boundaries of the reconstructed image by filtering the block boundaries.

[0174] FIG. 24 is a block diagram showing an example of a detailed configuration of the deblocking filter processing unit 120a of the loop filter 120 (see FIGS. 7 and 22) that functions as a deblocking filter.

[0175] 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 .

[0176] 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.

[0177] 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.

[0178] The filter determination unit 1203 determines whether 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.

[0179] 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.

[0180] When the filter processing unit 1205 acquires an unfiltered 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 filter processing unit 1205 outputs the filtered pixel to the switch 1206.

[0181] 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 filter processing unit 1205 under the control of the processing determination unit 1208 .

[0182] The processing determination unit 1208 controls the switch 1206 based on the determination results of the boundary determination unit 1201 and the filter determination unit 1203. That is, when the boundary determination unit 1201 determines that a target pixel exists 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 unit 120a, and the deblocking filtering unit 120a may have various configurations.

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

[0184] In the deblocking filter process, for example, pixel values ​​and a quantization parameter may be used to select one of two deblocking filters with different characteristics, namely, a strong filter and a weak filter. In the strong filter, when pixels p0 to p2 and pixels q0 to q2 exist on either side of a block boundary as shown in Fig. 25, 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, for example.

[0185] 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

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

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

[0188] Fig. 26 is a conceptual diagram for explaining an example of a block boundary on which deblocking filtering is performed, and Fig. 27 is a conceptual diagram showing an example of a BS (Boundary Strength) value.

[0189] The block boundary on which the deblocking filter process is performed is, for example, the boundary between CU, PU, ​​or TU of an 8×8 pixel block as shown in Fig. 26. The deblocking filter process may be 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.

[0190] 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 the color difference signal is performed when the Bs value is 2. Deblocking filter processing for the luminance signal is performed when the Bs value is 1 or greater and a predetermined condition is satisfied. The predetermined condition may be determined in advance. 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.

[0191] [Prediction unit (intra prediction unit, inter prediction unit, prediction control unit)] 28 is a flowchart showing an example of processing performed by the prediction unit of the encoding device 100. 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.

[0192] The prediction unit generates a predicted image of the current block (step Sb_1). The predicted image may be called a predicted signal or a predicted block. The predicted signal may be, for example, an intra-predicted image (intra-predicted signal) or an inter-predicted image (inter-predicted signal). 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.

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

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

[0195] The prediction unit generates a predicted image using a first method (step Sc_1a), generates a predicted image using a second method (step Sc_1b), and generates a predicted image using 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.

[0196] 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 may be 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.

[0197] 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 a 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 a predicted image in step Sc_3 may be performed based on parameters used in the encoding process. The encoding device 100 may signal information for identifying the selected predicted image, method, or mode in the stream. The 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 the 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 the selected method or mode.

[0198] 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.

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

[0200] First, the prediction unit generates a predicted image by intra prediction (step Sd_1a), and 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.

[0201] 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. Then, the prediction unit may select, from the intra-predicted image and the inter-predicted image, the predicted image for which the smallest cost C is calculated as the final predicted image of the current block (step Sd_3). In other words, a prediction method or mode for generating a predicted image of the current block is selected.

[0202] Then, the prediction unit selects the predicted image with the smallest calculated cost C from the intra-predicted image and the inter-predicted image as the final predicted image of the current block (step Sd_3). That is, a prediction method or mode for generating a predicted image of the current block is selected.

[0203] [Intra prediction section] The intra prediction unit 124 generates a prediction signal (i.e., an intra prediction 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 an intra prediction 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 prediction image to the prediction control unit 128.

[0204] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of defined 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. The defined modes may be predetermined.

[0205] The one or more non-directional prediction modes include, for example, a planar prediction mode and a DC prediction mode defined in the H.265 / HEVC (high-efficiency video coding) standard.

[0206] 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 conceptual 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).

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

[0208] The intra prediction unit 124 may correct pixel values ​​after intra prediction based on gradients of reference pixels in the horizontal / vertical directions. Intra prediction involving such correction is sometimes called PDPC (position dependent intra prediction combination). Information indicating whether PDPC is applied (e.g., called a PDPC flag) is 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, tile level, or CTU level).

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

[0210] The intra prediction unit 124 selects one intra prediction mode from a plurality of 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 MPMs (Most Probable Modes) (step Sw_3). The MPMs consist of, for example, six intra prediction modes. For example, two of the six intra prediction modes may be a planar prediction mode and a 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 MPMs (step Sw_4).

[0211] Here, when 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 may each be coded by the entropy coding unit 110 as a prediction parameter.

[0212] On the other hand, when 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 may each be 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.

[0213] [Inter prediction section] 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. The inter prediction is performed in units of the current block or a current sub-block (e.g., a 4x4 block) within the current block. A sub-block is included in a block and is a smaller unit than a block. The size of the sub-block may be in the form of a slice, a brick, a picture, or the like.

[0214] For example, the inter prediction unit 126 performs motion estimation for a current block or a current sub-block within a reference picture to find a reference block or a sub-block that best matches the current block or the current sub-block. Then, the inter prediction unit 126 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.

[0215] The motion information used for motion compensation may be signaled as an inter prediction signal in various forms, such as a motion vector, or as a difference between a motion vector and a motion vector predictor.

[0216] [Reference Picture List] FIG. 33 is a conceptual diagram showing an example of each reference picture, and FIG. 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 FIG. 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 FIG. 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 FIG. 34, the reference picture list is a list indicating reference picture candidates, and for example, one picture (or slice) may have one or more reference picture lists. For example, if the current picture is a uni-predicted picture, one reference picture list is used, and if the current picture is a bi-predicted 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 predictor 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.

[0217] 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.

[0218] [Basic flow of inter prediction] FIG. 35 is a flowchart showing an example of the basic flow of inter prediction processing.

[0219] 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).

[0220] Here, in generating a predicted image, the inter prediction unit 126 determines a motion vector (MV) of the current block (steps Se_1 and Se_2) and performs motion compensation (step Se_3), thereby generating the predicted image. In determining an MV, the inter prediction unit 126 selects a candidate motion vector (candidate MV) (step Se_1) and derives an MV (step Se_2), thereby determining the MV. 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 MVs derived in the past may be added as candidate MVs 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, the region of the reference picture indicated by the candidate MV. Note that searching the region of the reference picture may also be referred to as motion estimation.

[0221] 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 another component included in the encoding device 100.

[0222] 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. Furthermore, 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. Furthermore, the process of step Se_3 corresponds to the process of step Sd_1b in Fig. 30.

[0223] [MV derivation flow] FIG. 36 is a flowchart showing an example of the MV derivation process.

[0224] The inter prediction unit 126 may derive the MV of the current block in a mode in which motion information (e.g., MV) is coded. In this case, for example, the motion information may be coded and signaled as a prediction parameter. That is, the coded motion information is included in the stream.

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

[0226] 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. Also, modes that do not encode motion information include FRUC mode. The inter prediction unit 126 selects a mode for deriving the MV of the current block from these multiple modes, and derives the MV of the current block using the selected mode.

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

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

[0229] Alternatively, the inter prediction unit 126 may derive the MV in a mode in which the differential MV is not coded. In this case, the coded differential MV is not included in the stream.

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

[0231] [MV derivation mode] 38A and 38B are conceptual diagrams showing an example of classification of each MV derivation mode. For example, as shown in FIG. 38A, MV derivation modes are roughly 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 FIG. 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 used to derive an MV for the current block. This merge mode is basically a mode in which motion information is coded but a differential MV is not coded. For example, as shown in FIG. 38B, merge modes include normal merge mode (sometimes called normal merge mode or regular merge mode), MMVD (Merge with Motion Vector Difference) mode, and CIIP (Combined Inverse Multiplier). The merge modes include a (inter merge / intra prediction) mode, a triangle mode, an ATMVP mode, and an affine merge mode. Among the modes included in the merge mode, an MMVD mode is an exception in which a differential MV is coded. The above-mentioned affine merge mode and affine inter mode are modes included in the affine mode. The affine mode is a mode in which, assuming an affine transformation, the MVs of each of a plurality of sub-blocks constituting the current block are derived as the MV of the current block. The FRUC mode is a mode in which the MV of the current block is derived by searching between coded regions, and neither motion information nor differential MV is coded. Details of each of these modes will be described later.

[0232] 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.

[0233] [MV Derivation > Normal Intermode] The normal inter mode is an inter prediction mode in which the MV of the current block is derived based on a block similar to the image of the current block from the region of the reference picture indicated by the candidate MV. In addition, in this normal inter mode, the differential MV is coded.

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

[0235] 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.

[0236] 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 acquired in step Sg_1 as motion vector predictor candidates (also called predicted MV candidates) according to a predetermined priority order (step Sg_2). Note that the priority order may be predetermined for each of the N candidate MVs.

[0237] Next, the inter prediction unit 126 selects one prediction MV candidate from the N prediction MV candidates as a predicted motion vector (also called a predicted MV) of 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.

[0238] Next, the inter prediction unit 126 derives the MV 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 value between the derived MV and the predicted 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. Note that the coded reference picture is a picture made up of multiple blocks reconstructed after coding.

[0239] 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 all blocks included in a slice, inter prediction using the normal inter mode for the slice is completed. Also, when the processes of steps Sg_1 to Sg_5 are performed for all blocks included in a picture, inter prediction using the normal inter mode for the 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 when they are performed for some blocks, inter prediction using the normal inter mode for the slice may be completed. This also applies to the processes of steps Sg_1 to Sg_5. When they are performed for some blocks included in a picture, inter prediction using the normal inter mode for the picture may be completed.

[0240] 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.

[0241] The candidate MV list may be used in common 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 this candidate MV list include extracting or selecting candidate MVs from the candidate MV list, sorting the candidate MVs, or deleting candidate MVs.

[0242] [MV Derivation > Normal Merge Mode] The 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 the normal merge mode is a type of merge mode, and may also be simply called a merge mode. In this embodiment, the normal merge mode and the merge mode are distinguished, and the merge mode is used in a broad sense.

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

[0244] 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.

[0245] Next, the inter prediction unit 126 derives the MV of the current block by selecting one candidate MV from the multiple candidate MVs acquired 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 a 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.

[0246] Finally, the inter prediction unit 126 generates a predicted image for 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 each block, for example. For example, when the processes of steps Sh_1 to Sh_3 are performed for all blocks included in a slice, inter prediction using the normal merge mode for the slice ends. Also, when the processes of steps Sh_1 to Sh_3 are performed for all blocks included in a picture, inter prediction using the normal merge mode for the picture ends. Note that the processes of steps Sh_1 to Sh_3 do not have to be performed for all blocks included in a slice, and inter prediction using the normal merge mode for the slice may end when they are performed for some blocks. This also applies to the processes of steps Sh_1 to Sh_3. When they are performed for some blocks included in a picture, inter prediction using the normal merge mode for the picture may end.

[0247] Furthermore, information that is included in the coded signal and indicates the inter prediction mode (normal merge mode in the above example) used to generate the predicted image is coded into the stream as, for example, a prediction parameter.

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

[0249] 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 located spatially around the current block, temporally adjacent candidate MVs, which are MVs held by nearby blocks onto which the position of the current block in a coded reference picture is projected, 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.

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

[0251] Furthermore, the entropy coding unit 110 writes merge_idx, which is a signal indicating which candidate MV has been selected, into the stream and codes it.

[0252] 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 additional candidate MVs other than the types of candidate MVs shown in the figure.

[0253] 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. In normal merge mode, motion information is coded, but the differential MV is not coded. In MMVD mode, one candidate MV is selected from a candidate MV list, similar to normal merge mode, but the differential MV is coded. Such MMVD may be classified as a merge mode along with normal merge mode, as shown in FIG. 38B. The differential MV in MMVD mode need not 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.

[0254] 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.

[0255] The candidate MV list may also be referred to as a candidate list. Furthermore, merge_idx is MV selection information.

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

[0257] In normal merge mode, the MV of the current block (e.g., CU) is determined by selecting one candidate MV from the MV list generated by referring to the coded block (e.g., CU). Here, 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.

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

[0259] 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, every 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.

[0260] Then, for example, the inter prediction unit 126 checks, for each MV managed in the FIFO buffer, starting from HMVP1, whether the 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. At this time, one or more candidate MVs in the FIFO buffer may be registered (added to the candidate MV list).

[0261] By using the HMVP mode in this way, it is possible to add not only MVs of blocks spatially or temporally adjacent to the current block but also MVs of blocks processed in the past to the candidates. As a result, the variation of candidate MVs for the normal merge mode is expanded, which increases the possibility of improving coding efficiency.

[0262] 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 the MV value 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.

[0263] Note that the candidate MV list and FIFO buffer in Figure 42 are just an example, and the candidate MV list and FIFO buffer may be lists or buffers of different sizes than those in Figure 42, or may be configured to register candidate MVs in an order different from that in Figure 42. Furthermore, the processing described here may be common to both encoding device 100 and decoding device 200.

[0264] 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 affine mode can be stored in a FIFO buffer in order from the most recent to the least recent, and used as candidate MVs, which may improve efficiency. A mode in which the HMVP mode is applied to the affine mode may be called a history affine mode.

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

[0266] An example of the FRUC process in a flowchart format is shown in Figure 43. First, by referring to the MVs of each coded block spatially or temporally adjacent to the current block, a list indicating those MVs as candidate MVs (i.e., a candidate MV list, which may be the same as the candidate MV list in the normal merge mode) is generated (step Si_1).

[0267] Next, a best candidate MV is selected from among the multiple candidate MVs registered in the candidate MV list (step Si_2). For example, an evaluation value of each candidate MV included in the candidate MV list is calculated, and one candidate MV is selected based on the evaluation value. Then, an MV for the current block is derived based on the selected candidate MV (step Si_4). Specifically, for example, the selected candidate MV (best candidate MV) is derived as the MV for the current block. Alternatively, for example, the MV for the current block may be derived by performing pattern matching in a surrounding area of ​​a position in the reference picture that corresponds to the selected candidate MV. That is, a search using pattern matching and evaluation values ​​may be performed on the surrounding area of ​​the best candidate MV, and if an MV with a better evaluation value is found, the best candidate MV may be updated to that MV, and this may be used as the final MV for the current block. In some embodiments, updating to an MV with a better evaluation value may not be performed.

[0268] 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 each block, for example. For example, when the processes of steps Si_1 to Si_5 are performed for all blocks included in a slice, inter prediction using the FRUC mode for the slice is completed. Also, when the processes of steps Si_1 to Si_5 are performed for all blocks included in a picture, inter prediction using the FRUC mode for the 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 the FRUC mode for the 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 the FRUC mode for the picture may be completed.

[0269] Similar processing may be performed on a sub-block basis.

[0270] 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 of another reference picture or a region of an adjacent block of the current picture, as shown below). The predetermined region may be predetermined.

[0271] Then, the difference between the pixel values ​​of the two reconstructed images may be calculated and used as the evaluation value of the MV. Note that the evaluation value may be calculated using information other than the difference value.

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

[0273] [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. The predetermined area may be determined in advance.

[0274] FIG. 44 is a conceptual 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 a pair of blocks that best match among pairs 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 can be selected as the final MV, which may lead to good results.

[0275] 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 (CurPic) and the two reference pictures (Ref0, Ref1). For example, if the current picture is located between two reference pictures in time 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.

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

[0277] Fig. 45 is a conceptual diagram for explaining 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, the difference between the reconstructed image of both or either of the coded areas adjacent to the left and / or above the current block and the reconstructed image at the same position in the coded reference picture (Ref0) specified by the candidate MV is derived, and an evaluation value is calculated using the obtained difference value. The candidate MV with the best evaluation value among the multiple candidate MVs may be selected as the best candidate MV.

[0278] Information indicating whether such a FRUC mode is applied (e.g., referred to as an FRUC flag) may be signaled at the CU level. Also, when the FRUC mode is applied (e.g., when 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., the sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

[0279] [MV Derivation > Affine Mode] The affine mode is a mode in which MVs are generated using an affine transform, and for example, MVs may be derived for each sub-block based on the MVs of multiple neighboring blocks. This mode is sometimes called an affine motion compensation prediction mode.

[0280] FIG. 46A is a conceptual diagram illustrating an example of derivation of MVs for each sub-block based on the MVs of multiple adjacent blocks. In FIG. 46A, the current block includes, for example, 16 sub-blocks each consisting of 4x4 pixels. Here, a motion vector v0 for the upper left corner control point of the current block is derived based on the MVs of the adjacent blocks, and similarly, a motion vector v1 for the upper right corner control point of the current block is derived based on the MVs of the adjacent sub-blocks. Then, the two motion vectors v0 and v1 are projected using the following equation (1A) to derive the motion vectors (v x ,v y ) may be derived.

[0281]

number

[0282] Here, x and y respectively represent the horizontal and vertical positions of the sub-block, and w represents a predetermined weighting factor, which may be determined in advance.

[0283] Such information indicating the affine mode (e.g., called an affine flag) may be signaled at the CU level. Note that 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., the sequence level, picture level, slice level, tile level, CTU level, or sub-block level).

[0284] 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, there are two affine modes: affine inter (also called affine normal inter) mode and affine merge mode.

[0285] FIG. 46B is a conceptual diagram illustrating an example of derivation of MVs for each sub-block in affine mode using three control points. In FIG. 46B, the current block includes, for example, 16 sub-blocks each consisting of 4x4 pixels. Here, a motion vector v0 for the upper left corner control point of the current block is derived based on the MV of an adjacent block. Similarly, a motion vector v1 for the upper right corner control point of the current block is derived based on the MV of an adjacent block, and a motion vector v2 for the lower left corner control point of the current block is derived based on the MV of the adjacent block. Then, the three motion vectors v0, v1, and v2 are projected using the following equation (1B) to obtain the motion vectors (v x ,v y ) may be derived.

[0286]

number

[0287] where x and y respectively indicate the horizontal and vertical positions of the sub-block center, and w and h indicate weighting factors, which may be predetermined weighting factors. In an embodiment, w may indicate the width of the current block, and h may indicate the height of the current block.

[0288] Affine modes using different numbers of control points (e.g., two and three) may be switched and signaled at the CU level. Note that 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, tile level, CTU level, or sub-block level).

[0289] Furthermore, such an affine mode with three control points may include several modes with different methods for deriving the MVs of the upper-left, upper-right, and lower-left corner control points. For example, the affine mode with three control points includes two modes, affine inter mode and affine merge mode, similar to the affine mode with two control points described above.

[0290] 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.

[0291] [MV Derivation > Affine Mode > Control Points] 47A, 47B, and 47C are conceptual diagrams for explaining an example of deriving the MV of a control point in the affine mode.

[0292] In the affine mode, as shown in FIG. 47A, for example, among the coded blocks A (left), B (top), C (top right), D (bottom left), and E (top left) adjacent to the current block, the predicted MVs of each control point of the current block are calculated based on a plurality of MVs corresponding to the blocks coded in the affine mode. Specifically, these blocks are examined in the order of the coded blocks A (left), B (top), C (top right), D (bottom left), and E (top left), and the first valid block coded in the affine mode is identified. Based on a plurality of MVs corresponding to this identified block, the predicted MVs of the control points of the current block are calculated.

[0293] For example, as shown in Figure 47B, if block A, adjacent to the left of the current block, is coded in affine mode with two control points, motion vectors v3 and v4 are derived by projecting them onto the positions of the upper left and upper right corners of a coded block that includes block A. Then, from the derived motion vectors v3 and v4, motion vector v0 for the upper left corner control point and motion vector v1 for the upper right corner control point of the current block are calculated.

[0294] For example, as shown in Figure 47C, if block A, adjacent to the left of the current block, is coded in affine mode with three control points, motion vectors v3, v4, and v5 are derived by projecting them onto the positions of the upper left, upper right, and lower left corners of a coded block that includes block A. Then, from the derived motion vectors v3, v4, and v5, motion vector v0 for the upper left corner control point, motion vector v1 for the upper right corner control point, and motion vector v2 for the lower left corner control point of the current block are calculated.

[0295] 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, 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.

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

[0297] FIG. 48A is a conceptual diagram for explaining an example of an affine mode having two control points.

[0298] In this affine mode, as shown in Figure 48A, an MV selected from the MVs of coded blocks A, B, and C adjacent to the current block is used as the motion vector v0 of the upper left corner control point of the current block. Similarly, an MV selected from the MVs of coded blocks D and E adjacent to the current block is used as the motion vector v1 of the upper right corner control point of the current block.

[0299] FIG. 48B is a conceptual diagram for explaining an example of an affine mode having three control points.

[0300] In this affine mode, as shown in Figure 48B, an MV selected from the MVs of coded blocks A, B, and C adjacent to the current block is used as the motion vector v0 for the upper-left corner control point of the current block. Similarly, an MV selected from the MVs of coded blocks D and E adjacent to the current block is used as the motion vector v1 for the upper-right corner control point of the current block. Furthermore, an MV selected from the MVs of coded blocks F and G adjacent to the current block is used as the motion vector v2 for the lower-left corner control point of the current block.

[0301] 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 of Figure 51 described below.

[0302] 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.

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

[0304] For example, as shown in Figure 49A, the current block has three control points (top left, top right, and bottom left), and block A, which is adjacent to the left of the current block, is coded in affine mode with two control points. In this case, motion vectors v3 and v4 are derived by projecting them onto the positions of the top left and top right corners of a coded block that includes block A. Then, from the derived motion vectors v3 and v4, motion vector v0 for the top left corner control point of the current block and motion vector v1 for the top right corner control point are calculated. Furthermore, from the derived motion vectors v0 and v1, motion vector v2 for the bottom left corner control point is calculated.

[0305] 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 affine mode with three control points. In this case, motion vectors v3, v4, and v5 are derived by projecting them to the positions of the upper left, upper right, and lower left corners of a coded block that includes block A. Then, from the derived motion vectors v3, v4, and v5, motion vector v0 for the upper left corner control point of the current block and motion vector v1 for the upper right corner control point are calculated.

[0306] 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 of Figure 51 described below.

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

[0308] In the affine merge mode, the inter prediction unit 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. The inter prediction unit 126 may encode MV selection information for identifying the derived two or three MVs into the stream.

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

[0310] The inter prediction unit 126 derives the MV of the control point using the first valid block coded in the identified affine mode. For example, when a block A is identified and the block A has two control points, as shown in FIG. 47B, the inter prediction unit 126 calculates the motion vector v0 of the upper left corner control point of the current block and the motion vector v1 of the upper right corner control point from the motion vectors v3 and v4 of the upper left corner and the upper right corner of the coded block including the block A. For example, the inter prediction unit 126 calculates the motion vector v0 of the upper left corner control point of the current block and the motion vector v1 of the upper right corner control point by projecting the motion vectors v3 and v4 of the upper left corner and the upper right corner of the coded block onto the current block.

[0311] Alternatively, when block A is identified and block A has three control points, as shown in Figure 47C, the inter prediction unit 126 calculates the motion vector v0 of the upper left corner control point, the motion vector v1 of the upper right corner control point, and the motion vector v2 of the lower left corner control point of the current block from the motion vectors v3, v4, and v5 of the upper left corner, upper right corner, and lower left corner of the coded block including block A. For example, the inter prediction unit 126 calculates the motion vector v0 of the upper left corner control point, the motion vector v1 of the upper right corner control point, and the motion vector v2 of the lower left corner control point of the current block by projecting the motion vectors v3, v4, and v5 of the upper left corner, upper right corner, and lower left corner of the coded block onto the current block.

[0312] 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.

[0313] Next, the inter prediction unit 126 performs motion compensation on each of the multiple sub-blocks included in the current block. That is, for each of the multiple sub-blocks, the inter prediction unit 126 calculates the MV of the sub-block as an affine MV using, for example, two motion vectors v0 and v1 and the above-mentioned formula (1A), or three motion vectors v0, v1, and v2 and the above-mentioned formula (1B) (step Sk_2). Then, the inter prediction unit 126 performs motion compensation on the sub-block using the affine MV and the coded reference picture (step Sk_3). When the processes of steps Sk_2 and Sk_3 are performed on each of 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. That is, motion compensation is performed on the current block, and a predicted image of the current block is generated.

[0314] In step Sk_1, the above-mentioned candidate MV list may be generated. The candidate MV list may be, for example, a list including candidate MVs derived for each control point using multiple MV derivation methods. The multiple MV derivation methods may be, for example, 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.

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

[0316] Note that, as the candidate MV list, for example, a candidate MV list including a candidate MV for an affine merge mode having two control points and a candidate MV for an affine merge mode having three control points may be generated. Alternatively, a candidate MV list including a candidate MV for an affine merge mode having two control points and a candidate MV list including a candidate MV for an affine merge mode having three control points may be generated. Alternatively, a candidate MV list including a candidate MV for one of an affine merge mode having two control points and an affine merge mode having three control points may be generated. The candidate MVs may be, for example, the MVs of coded block A (left), block B (top), block C (top right), block D (bottom left), and block E (top left), or may be the MVs of valid blocks among these blocks.

[0317] Note that an index indicating which candidate MV in the candidate MV list is being sent as the MV selection information.

[0318] [MV Derivation > Affine Mode > Affine Intermode] FIG. 51 is a flowchart showing an example of processing in the affine inter mode.

[0319] In the affine inter mode, the inter prediction unit 126 first derives predicted MVs (v0, v1) or (v0, v1, v2) for each of two or three control points of the current block (step Sj_1). The control points are, for example, the upper left corner, upper right corner, or lower left corner of the current block, as shown in Figure 46A or 46B.

[0320] For example, when using the MV derivation methods shown in Figures 48A and 48B, the inter prediction unit 126 derives the predicted MV (v0, v1) or (v0, v1, v2) of the control point of the current block by selecting the MV of any of the coded blocks near each control point of the current block shown in Figure 48A or 48B. At this time, the inter prediction unit 126 encodes predicted MV selection information for identifying the selected two or three predicted MVs into the stream.

[0321] 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.

[0322] Next, the inter prediction unit 126 performs motion search (steps Sj_3 and Sj_4) while updating each of the prediction MVs selected or derived in step Sj_1 (step Sj_2). That is, the inter prediction unit 126 calculates the MV of each sub-block corresponding to the updated prediction MV as an affine MV using the above-mentioned formula (1A) or (1B) (step Sj_3). Then, the inter prediction unit 126 performs motion compensation for each sub-block using the affine MVs and coded reference pictures (step Sj_4). The processes of steps Sj_3 and Sj_4 are performed for all blocks in the current block every time the prediction MV is updated in step Sj_2. As a result, the inter prediction unit 126 determines, for example, the prediction MV that obtains the smallest cost in the motion search loop as the MV of the control point (step Sj_5). At this time, the inter prediction unit 126 further encodes the difference value between the determined MV and the prediction MV as a differential MV into a stream. 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 .

[0323] 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).

[0324] In step Sj_1, the above-mentioned candidate MV list may be generated. The candidate MV list may be, for example, a list including candidate MVs derived for each control point using multiple MV derivation methods. The multiple MV derivation methods may be, for example, 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.

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

[0326] Note that a candidate MV list including candidate MVs for an affine inter mode having two control points and candidate MVs for an affine inter mode having three control points may be generated. Alternatively, a candidate MV list including candidate MVs for an affine inter mode having two control points and a candidate MV list including candidate MVs for an affine inter mode having three control points may be generated. Alternatively, a candidate MV list including candidate MVs for one of an affine inter mode having two control points and an affine inter mode having 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.

[0327] Note that an index indicating which candidate MV in the candidate MV list is being sent as predicted MV selection information.

[0328] [MV Derivation > Triangle Mode] In the above example, 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 the multiple predicted images to generate a final rectangular predicted image. The shape other than a rectangle may be, for example, a triangle.

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

[0330] The inter prediction unit 126 generates a triangular predicted image 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 triangular predicted image 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 that is the same rectangle as the current block.

[0331] Note that a first rectangular predicted image corresponding to the current block may be generated using a first MV as the predicted image for the first partition. Also, a second rectangular predicted image corresponding to the current block may be generated using a second MV as the predicted image for the second partition. A predicted image for the current block may be generated by weighting and adding the first predicted image and the second predicted image. Note that the portion subjected to weighting and adding may be limited to a partial area sandwiching the boundary between the first partition and the second partition.

[0332] 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 an 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 example in the center 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 triangular 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.

[0333] 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.

[0334] 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.

[0335] FIG. 53 is a flowchart showing an example of processing in the triangle mode.

[0336] 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.

[0337] 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.

[0338] Then, the inter prediction unit 126 selects a candidate MV for the first partition and a candidate MV for the second partition as a first MV and a second MV, respectively, from the multiple candidate MVs acquired 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.

[0339] 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).

[0340] Finally, the inter prediction unit 126 generates a predicted image of the current block by performing weighted addition of the first predicted image and the second predicted image (step Sx_6).

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

[0342] The first and second partitions may overlap, i.e., the first and second partitions may include the same pixel area. In this 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.

[0343] 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.

[0344] 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 candidate MV list.

[0345] The partition information may include at least an index indicating the division direction for dividing the current block into multiple partitions. The MV selection information may include an index indicating the selected first MV and an index indicating the 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.

[0346] [MV derivation > ATMVP mode] FIG. 54 is a conceptual diagram showing an example of an Advanced Temporal Motion Vector Prediction (ATMVP) mode in which MVs are derived for each sub-block.

[0347] 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.

[0348] Specifically, in ATMVP mode, first, as shown in Figure 54, a temporal MV reference block associated with the current block is 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 that sub-block. This generates a predicted image for each sub-block.

[0349] 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. Also, 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.

[0350] [Motion Search > DMVR] FIG. 55 is a flowchart showing the relationship between merge mode and DMVR (Decoder Motion Vector Refinement).

[0351] The inter prediction unit 126 derives an MV of the current block in merge mode (step Sl_1). Next, the inter prediction unit 126 determines whether or not to search for an MV, i.e., perform motion search (step Sl_2). Here, if the inter prediction unit 126 determines not to perform motion search (No in step Sl_2), it determines the MV derived in step Sl_1 as the final MV for the current block (step Sl_4). That is, in this case, the MV of the current block is determined in merge mode.

[0352] 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 prediction unit 126 derives a final MV for the current block by searching the surrounding area of ​​the reference picture indicated by the MV derived in step S1_1 (step S1_3). That is, in this case, the MV of the current block is determined by the DMVR.

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

[0354] 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.

[0355] 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 value between each pixel value of the template and each pixel value of the search area, the candidate MV value, etc.

[0356] Any other process may be used other than the process described here, as long as it is a process that can search the vicinity of the candidate MV and derive the final MV.

[0357] Fig. 57 is a conceptual diagram for explaining another example of a DMVR for determining an MV. In this example shown in Fig. 57, unlike the example of the DMVR shown in Fig. 56, costs are calculated without generating a template.

[0358] First, the inter prediction unit 126 searches around the reference blocks included in the reference pictures of 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 search, the inter prediction unit 126 first sets a search position for the reference picture in the L0 list. A difference vector indicating the set search position, specifically, a 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 a 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.

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

[0360] First, in Step 1, the inter prediction unit 126 calculates the costs of 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 process of Step 2. On the other hand, if the cost of the starting point is the smallest, the inter prediction unit 126 skips the process of Step 2 and performs the process of Step 3.

[0361] In Step 2, the inter prediction unit 126 performs a search similar to the process in 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 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 process in Step 4. On the other hand, if the cost of the starting point is the smallest, the inter prediction unit 126 performs the process in Step 3.

[0362] 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.

[0363] In Step 3, the inter prediction unit 126 determines the decimal precision pixel position with the smallest 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 decimal precision pixel position 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, using 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.

[0364] [Motion Compensation > BIO / OBMC / LIC] Motion compensation includes modes that generate a predicted image and then correct the predicted image, such as bi-directional optical flow (BIO), overlapped block motion compensation (OBMC), and local illumination compensation (LIC), which will be described later.

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

[0366] 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).

[0367] FIG. 60 is a flowchart showing another example of the predicted image generation process.

[0368] The inter prediction unit 126 determines the MV of the current block (step Sn_1). Next, the inter prediction unit 126 generates a predicted image using the MV (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, which will be described later, 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 the final predicted image without correction (step Sn_5).

[0369] [Motion Compensation > OBMC] An inter-prediction 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-prediction 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 neighboring blocks (in the current picture). This type of inter-prediction (motion compensation) is called OBMC (overlapped block motion compensation). compensation) or OBMC mode.

[0370] 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 is not 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).

[0371] 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.

[0372] 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 to obtain the predicted image.

[0373] 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 overlapping the two predicted images Pred and Pred_L. This has the effect of blending the boundaries between the neighboring blocks.

[0374] 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, with the boundaries with the adjacent blocks blended (smoothed).

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

[0376] 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.

[0377] Here, the OBMC predicted image correction process has been described, in which additional predicted images Pred_L and Pred_U are superimposed from one reference picture to obtain one predicted image Pred. However, when a predicted image is corrected based on multiple reference pictures, the same process may be applied to each of the multiple reference pictures. In such a case, the 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.

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

[0379] 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 an area with complex motion. If the current block belongs to an area with complex motion, the encoding device 100 sets the value of obmc_flag to 1 and applies OBMC to perform encoding, and if the current block does not belong to an area 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 obmc_flag described in the stream, and switches whether to apply OBMC depending on the value, and performs decoding.

[0380] [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. This bi-directional optical flow may also be expressed as BDOF instead of BIO.

[0381] FIG. 63 is a diagram for explaining a model assuming uniform linear motion. In FIG. 63, (v x ,v y ) denotes a velocity vector, and τ0 and τ1 denote the temporal distance between the current picture (Cur Pic) and two reference pictures (Ref0, Ref1), respectively. (MV x0 ,MV y0 ) indicates the MV corresponding to the reference picture Ref0, and (MV x1 , MV y1 ) indicates the MV corresponding to the reference picture Ref1.

[0382] At this time, the velocity vector (v x ,v y Under the assumption of uniform linear motion of (MV x0 ,MV y0 ) and (MV x1 ,MV y1 ) are respectively (v xτ0 ,v yτ0 ) and (-v xτ1 ,-v yτ1 ) and the following optical flow equation (2) holds:

[0383]

number

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

[0385] Note that the MV may be derived on the decoding device 200 side using a method different from the method of 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.

[0386] Figure 64 is a flowchart showing an example of inter prediction processing according to BIO, and Figure 65 is a functional block diagram showing an example of the functional configuration of inter prediction unit 126 that performs inter prediction according to BIO.

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

[0388] The inter prediction unit 126 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 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 a motion vector (MV x0 ,MV y0 ), and the motion vector M1 is the motion vector (MV x1 ,MV y1 )

[0389] 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 Furthermore, the interpolated image derivation unit 126b 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 0is an image included in the reference picture Ref0 derived for the current block, and is an interpolated image I 1 is the 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, or the interpolated image I 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 by applying a motion vector (M0, M1) and a reference picture (L0, L1) and a motion compensation filter.

[0390] 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). 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 indicate spatial variations in pixel values ​​along the horizontal direction, the vertical direction, or both.

[0391] 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 calculate the optical flow (v x ,vy ) is derived (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 not in units of sub-blocks but in other units such as in units of pixels.

[0392] Next, the inter prediction unit 126 calculates the optical flow (v x ,v y ) to correct the predicted image of the current block. For example, the correction value derivation unit 126e uses the optical flow (v x ,v y ) to derive correction values ​​for the values ​​of pixels included in the current block (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.

[0393] The processing flow of the BIO is not limited to the processing disclosed in Fig. 64. For example, 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.

[0394] [Motion Compensation > LIC] Next, an example of a mode for generating a predicted image (prediction) using LIC (local illumination compensation) processing will be described.

[0395] Fig. 66A is a conceptual diagram illustrating an example of a process of a predicted image generation method using luminance correction processing by LIC, and Fig. 66B is a flowchart illustrating an example of the process of the predicted image generation method using the LIC.

[0396] First, the inter prediction unit 126 derives an MV from an already-encoded reference picture to obtain a reference image corresponding to the current block (Step Sz_1).

[0397] 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. Then, the inter prediction unit 126 calculates a luminance correction parameter using the information indicating how the luminance values ​​have changed (step Sz_3).

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

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

[0400] 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 luminance 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.

[0401] 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, the encoding device 100 determines 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, sets the value of lic_flag to 1 and performs encoding by applying LIC, and if the current block does not belong to an area where a luminance change occurs, sets the value of lic_flag to 0 and performs encoding without applying LIC. On the other hand, the decoding device 200 may decode lic_flag described in the stream, and perform decoding by switching whether to apply LIC depending on the value.

[0402] As another method for determining whether to apply LIC, for example, there is a method of determining 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 the MV 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 process is applied to the process on the decoding device 200 side.

[0403] LIC (luminance correction processing) has been explained using FIGS. 66A and 66B, and will be explained in detail below.

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

[0405] 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 the 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.

[0406] Next, the inter prediction unit 126 performs luminance correction processing on the reference image in the reference picture specified by the MV using the luminance correction parameter, thereby generating a predicted image for the current block. 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.

[0407] Note that a part 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.

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

[0409] Note that LIC may be applied to color difference as well as luminance. In this case, correction parameters may be derived individually for Y, Cb, and Cr, or a common correction parameter may be used for any of them.

[0410] Alternatively, the LIC process may be applied to each sub-block. For example, the correction parameters may be derived using the surrounding reference regions of the current sub-block and the surrounding reference regions of the reference sub-blocks in the reference picture specified by the MV of the current sub-block.

[0411] [Predictive 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 as a predicted signal to the subtraction unit 104 and the addition unit 116.

[0412] [Prediction parameter generation part] 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, for example, 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.

[0413] [Decryption 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 functional 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.

[0414] 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.

[0415] [Example of implementation of a decryption device] Figure 68 is a functional block diagram showing an implementation example of decoding device 200. Decoding device 200 includes processor b1 and memory b2. For example, multiple components of decoding device 200 shown in Figure 67 are implemented by processor b1 and memory b2 shown in Figure 68.

[0416] 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.

[0417] 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 a storage or a recording medium. The memory b2 may also be a non-volatile memory or a volatile memory.

[0418] 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.

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

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

[0421] Hereinafter, 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, the inverse transform unit 206, the adder 208, the block memory 210, the frame memory 214, the intra prediction unit 216, the inter prediction unit 218, the prediction control unit 220, and the loop filter unit 212 included in the decoding device 200 perform the same processing as the inverse quantization unit 112, the inverse transform unit 114, the adder 116, the block memory 118, the frame memory 122, the intra prediction unit 124, the inter prediction unit 126, the prediction control unit 128, and the loop filter unit 120 included in the encoding device 100, respectively.

[0422] [Overall flow of decryption process] FIG. 69 is a flowchart showing an example of the overall decoding process by the decoding device 200.

[0423] 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 (step Sp_1), based on parameters input from the entropy decoding unit 202. 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.

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

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

[0426] 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).

[0427] 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).

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

[0429] 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 processing from step Sp_1.

[0430] 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.

[0431] [Division decision section] 70 is a conceptual diagram showing the relationship between the division determination section 224 and other components in the embodiment. The division determination section 224 may perform the following process, for example.

[0432] 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.

[0433] [Entropy Decoding] FIG. 71 is a block diagram showing an example of the functional configuration of the entropy decoding unit 202.

[0434] The entropy decoding unit 202 entropy-decodes the stream to generate quantization coefficients, prediction parameters, parameters related to the division pattern, and the like. 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 converts the binary signal output from the binary arithmetic decoding unit 202a into a multi-value signal indicating the above-mentioned quantization coefficients, etc. (debinarization). This multi-value conversion is performed according to the above-mentioned binarization method.

[0435] 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.

[0436] FIG. 72 is a conceptual diagram showing an example of the flow of CABAC processing in the entropy decoding unit 202.

[0437] First, initialization is performed in 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.

[0438] [Dequantization section] 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 inverse quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.

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

[0440] 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.

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

[0442] 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 or not to perform inverse quantization (step Sv_11). Here, 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 of the current block from the entropy decoding unit 202 (step Sv_12).

[0443] 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).

[0444] The quantization parameter generation unit 204a then generates a quantization parameter for the current block based on the differential quantization parameter for the current block acquired from the entropy decoding unit 202 and the predicted quantization parameter for the current block generated by the predicted quantization parameter generation unit 204b (step Sv_15). For example, the quantization parameter for the current block may be generated by adding the differential quantization parameter for the current block acquired from the entropy decoding unit 202 and the predicted quantization parameter for the current block generated by the predicted quantization parameter generation unit 204b. The quantization parameter generation unit 204a then stores the quantization parameter for the current block in the quantization parameter storage unit 204d (step Sv_16).

[0445] Next, the inverse quantization 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).

[0446] 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.

[0447] 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.

[0448] [Inverse conversion section] The inverse transform unit 206 restores the prediction residual by inverse transforming the transform coefficients input from the inverse quantization unit 204 .

[0449] 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.

[0450] 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.

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

[0452] For example, the inverse transform unit 206 determines whether or not 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) (e.g., there is no indication as to whether orthogonal transform is to be performed, but it indicates that an orthogonal transform is to be performed), 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). As shown in FIG. 75, if it is determined that information indicating that an orthogonal transform is not to be performed is present (Yes in step St_11) (e.g., it is clearly indicated that an orthogonal transform is not to be performed: it is not indicated that an orthogonal transform is to be performed), the orthogonal transform is not performed.

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

[0454] For example, the inverse transform unit 206 determines whether the transform size is equal to or smaller than a predetermined value (step Su_11). The predetermined value may be determined in advance. 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 transform type, among 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 such information is decoded by the entropy decoding unit 202 and output to the inverse transform unit 206.

[0455] 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 a second group of transform types (step Su_15).

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

[0457] [Addition section] 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.

[0458] [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.

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

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

[0461] 77 is a block diagram showing an example of the functional 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.

[0462] As shown in FIG. 77, for example, 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 be configured to perform the above processes in an order different from the processing order disclosed in FIG. 77, and may not need to perform all of the processes shown in FIG. 77.

[0463] [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.

[0464] [Prediction unit (intra prediction unit, inter prediction unit, prediction control unit)] 78 is a flowchart showing an example of processing performed by 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.

[0465] The prediction unit generates a predicted image of the current block (step Sq_1). This predicted image is also called 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.

[0466] 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.

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

[0468] 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.

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

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

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

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

[0473] [Intra prediction section] 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 an 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.

[0474] Note that, when an intra prediction mode that references a luminance block in intra prediction of a chrominance block is selected, the intra prediction unit 216 may predict the chrominance component of the current block based on the luminance component of the current block.

[0475] Furthermore, when the information interpreted from the stream indicates the application of PDPC, the intra prediction unit 216 corrects pixel values ​​after intra prediction based on the gradients of reference pixels in the horizontal and vertical directions.

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

[0477] The intra prediction unit 216 first determines whether or not 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 in the encoding device 100 from the entropy decoding unit 202 (step Sw_12). Note that the 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 among the multiple intra prediction modes included in the MPM (step Sw_14).

[0478] On the other hand, if the intra prediction unit 216 determines in step Sw_11 that the MPM flag indicating 1 does not exist 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 the 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).

[0479] 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).

[0480] [Inter prediction section] 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.

[0481] 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.

[0482] 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 neighboring blocks.

[0483] 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. Then, the inter prediction unit 218 performs motion compensation (prediction) using the derived motion information.

[0484] Furthermore, when the BIO mode is applied, the inter prediction unit 218 derives an MV 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 an MV for each sub-block based on the MVs of multiple adjacent blocks.

[0485] [MV derivation flow] FIG. 82 is a flowchart showing an example of the MV derivation process in the decoding device 200.

[0486] 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, when 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, when 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.

[0487] 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 MV but also prediction MV selection information, which will be described later. Also, modes that do not decode motion information include FRUC mode. The inter prediction unit 218 selects a mode for deriving the MV of the current block from these multiple modes, and derives the MV of the current block using the selected mode.

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

[0489] The inter prediction unit 218, for example, determines whether to decode a differential 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, when the inter prediction unit 218 determines to decode a differential MV, it may derive an 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.

[0490] 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.

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

[0492] [MV Derivation > Normal Intermode] For example, if the information interpreted from the stream indicates that normal inter mode is to 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 the MV.

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

[0494] The inter prediction unit 218 of the decoding device 200 performs motion compensation on each block. 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). That is, the inter prediction unit 218 creates a candidate MV list.

[0495] 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 acquired in step Sg_11 as motion vector predictor candidates (also referred to as predicted MV candidates) according to a predetermined priority order (step Sg_12). Note that the priority order may be predetermined for each of the N predicted MV candidates.

[0496] 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).

[0497] 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 predicted MV (step Sg_14).

[0498] 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. Also, 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 when they are performed for some blocks, inter prediction using the normal inter mode for that slice may be completed. This also applies to the pictures of steps Sg_11 to Sg_15. When they are performed for some blocks included in a picture, inter prediction using the normal inter mode for that picture may be completed.

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

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

[0501] 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 Sh_11). That is, the inter prediction unit 218 creates a candidate MV list.

[0502] 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.

[0503] Finally, the inter prediction unit 218 generates a predicted image for 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 each block, for example. 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. Also, 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. This also applies to the pictures of steps Sh_11 to Sh_13. When they are performed for some blocks included in a picture, inter prediction using the normal merge mode for that picture may be completed.

[0504] [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 search. In this case, the decoding device 200 performs motion search without using pixel values ​​of the current block.

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

[0506] First, the inter prediction unit 218 references the MVs of each decoded block spatially or temporally adjacent to the current block and generates a list indicating these MVs as candidate MVs (i.e., a candidate MV list, which may be the same as the candidate MV list for normal merge mode) (step Si_11). Next, the inter prediction unit 218 selects a best candidate MV from among the multiple candidate MVs registered in the candidate MV list (step Si_12). For example, the inter prediction unit 218 calculates an evaluation value for each candidate MV included in the candidate MV list and selects one candidate MV as the best candidate MV based on the evaluation value. Then, the inter prediction unit 218 derives an MV for the current block based on the selected best candidate MV (step Si_14). Specifically, for example, the selected best candidate MV is directly derived as the MV for the current block. Alternatively, for example, the MV for the current block may be derived by performing pattern matching in a peripheral area of ​​a position in the reference picture corresponding to the selected best candidate MV. That is, a search is performed on the area surrounding the best candidate MV using pattern matching and evaluation values ​​in the reference picture, and if an 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. In the embodiment, updating to an MV with a better evaluation value does not have to be performed.

[0507] 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 each block, for example. 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 the FRUC mode for the 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 the FRUC mode for the picture is completed. Processing may also be performed in units of sub-blocks, similar to the above-mentioned block units.

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

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

[0510] In the affine merge mode, first, the inter prediction unit 218 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.

[0511] For example, when using the MV derivation method shown in Figures 47A to 47C, the inter prediction unit 218 examines the decoded blocks A (left), B (top), C (top right), D (bottom left), and E (top left) in this order as shown in Figure 47A, and identifies the first valid block decoded in affine mode. The inter prediction unit 218 derives the MV of the control point using the identified first valid block decoded in affine mode. For example, if block A is identified and has two control points, as shown in Figure 47B, the inter prediction unit 218 calculates the motion vector v0 of the top left corner control point and the motion vector v1 of the top right corner control point of the current block from the motion vectors v3 and v4 of the top left and top right corners of the decoded blocks including block A. This derives the MV of each control point.

[0512] 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.

[0513] Furthermore, when MV selection information is included in the stream as a prediction parameter, the inter prediction unit 218 may use the MV selection information to derive the MV of each control point of the current block.

[0514] Next, the inter prediction unit 218 performs motion compensation on each of the multiple sub-blocks included in the current block. That is, for each of the multiple sub-blocks, the inter prediction unit 218 calculates the MV of the sub-block as an affine MV using two motion vectors v0 and v1 and the above-mentioned formula (1A), or using three motion vectors v0, v1, and v2 and the above-mentioned formula (1B) (step Sk_12). Then, the inter prediction unit 218 performs motion compensation on the sub-block using the affine MV and the decoded reference picture (step Sk_13). When the processes of steps Sk_12 and Sk_13 are performed on each of all sub-blocks included in the current block, the inter prediction using the affine merge mode for the current block is completed. That is, motion compensation is performed on the current block, and a predicted image of the current block is generated.

[0515] In step Sk_11, the above-mentioned candidate MV list may be generated. The candidate MV list may be, for example, a list including 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.

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

[0517] Note that, as the candidate MV list, for example, a candidate MV list including candidate MVs for an affine merge mode with two control points and a candidate MV for an affine merge mode with three control points may be generated. Alternatively, a candidate MV list including candidate MVs for an affine merge mode with two control points and a candidate MV list including candidate MVs for an affine merge mode with three control points may be generated. Alternatively, a candidate MV list including candidate MVs for one of an affine merge mode with two control points and an affine merge mode with three control points may be generated.

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

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

[0520] In the affine inter mode, the inter prediction unit 218 first derives predicted MVs (v0, v1) or (v0, v1, v2) for each of two or three control points of the current block (step Sj_11). The control points are, 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.

[0521] The inter prediction unit 218 obtains prediction MV selection information included in the stream as a prediction parameter, and derives a prediction MV for each control point of the current block using the MV 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 derives a prediction MV (v0, v1) or (v0, v1, v2) for the control point of the current block by selecting the MV of the block identified by the prediction MV selection information from among the decoded blocks near each control point of the current block shown in Figures 48A or 48B.

[0522] Next, the inter prediction unit 218 acquires, 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 differential MV corresponding to the predicted MV (step Sj_12). As a result, the MV of each control point of the current block is derived.

[0523] Next, the inter prediction unit 218 performs motion compensation on each of the multiple sub-blocks included in the current block. That is, for each of the multiple sub-blocks, the inter prediction unit 218 calculates the MV of the sub-block as an affine MV using two motion vectors v0 and v1 and the above-mentioned formula (1A), or using three motion vectors v0, v1, and v2 and the above-mentioned formula (1B) (step Sj_13). Then, the inter prediction unit 218 performs motion compensation on the sub-block using the affine MV and the decoded reference picture (step Sj_14). When the processes of steps Sj_13 and Sj_14 are performed on each of the sub-blocks included in the current block, inter prediction using the affine merge mode for the current block is completed. That is, motion compensation is performed on the current block, and a predicted image of the current block is generated.

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

[0525] [MV Derivation > Triangle Mode] For example, if the 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.

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

[0527] In the triangle mode, first, the inter prediction unit 218 divides the current block into a first partition and a second partition (step Sx_11). For example, 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.

[0528] Next, the inter prediction unit 218 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 Sx_12). That is, the inter prediction unit 218 creates a candidate MV list.

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

[0530] 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).

[0531] 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).

[0532] [Motion Search > DMVR] For example, if the information interpreted from the stream indicates the application of DMVR, the inter predictor 218 performs motion estimation using DMVR.

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

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

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

[0536] First, in Step 1 shown in Fig. 58A, the inter prediction unit 218 calculates the costs of 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.

[0537] In Step 2 shown in FIG. 58A, the inter prediction unit 218 performs a search similar to the process 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 process of Step 4. On the other hand, if the cost of the starting point is the smallest, the inter prediction unit 218 performs the process of Step 3.

[0538] 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.

[0539] In Step 3 shown in Figure 58A, the inter prediction unit 218 determines the pixel position with decimal precision that has the smallest 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.

[0540] The decimal precision pixel position is determined by weighting and adding four vectors ((0,1), (0,-1), (-1,0), (1,0)) of the four points above, below, left, and right, with the cost at each of the four search positions as weights. Then, the inter prediction unit 218 determines the difference between the position indicated by the initial MV and the final search position as a difference vector.

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

[0542] FIG. 92 is a flowchart showing an example of a process for generating a predicted image in the decoding device 200.

[0543] 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).

[0544] FIG. 93 is a flowchart showing another example of the process of generating a predicted image in the decoding device 200.

[0545] The inter prediction unit 218 derives the motion vector (MV) of the current block (step Sn_11). Next, the inter prediction unit 218 generates a predicted image using the MV (step Sn_12) and determines whether or not to perform correction processing (step Sn_13). For example, the inter prediction unit 218 acquires prediction parameters included in the stream and determines whether or not to perform correction processing based on the prediction parameters. The prediction parameters are, for example, flags indicating whether or not 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 correcting it (step Sn_15).

[0546] [Motion Compensation > OBMC] For example, if the 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.

[0547] 94 is a flowchart showing an example of a process of correcting a predicted image by OBMC in the decoding device 200. The flowchart in FIG. 94 shows the flow of correcting a predicted image using the current picture and reference pictures shown in FIG.

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

[0549] Next, the inter prediction unit 218 applies (reuses) the MV (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.

[0550] Similarly, the inter prediction unit 218 applies (reuses) the MV (MV_U) already derived for the decoded upper adjacent block to the current block to obtain a predicted image (Pred_U). Then, the inter prediction unit 218 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).

[0551] [Motion Compensation > BIO] For example, if the 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.

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

[0553] As shown in FIG. 63, the inter prediction unit 218 derives two motion vectors (M0, M1) using two reference pictures (Ref0, Ref1) different from the picture (Cur Pic) including 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 derived from the motion vector (MV x0 ,MV y0 ), and the motion vector M1 is the motion vector (MV x1 ,MV y1 )

[0554] 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 0 is an image included in the reference picture Ref0 derived for the current block, and is an interpolated image I 1 is the 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, or the interpolated image I 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 by applying a motion vector (M0, M1) and a reference picture (L0, L1) and a motion compensation filter.

[0555] In addition, the inter prediction unit 218 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.

[0556] 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.

[0557] 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.

[0558] The processing flow of 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.

[0559] [Motion Compensation > LIC] For example, if the 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 LIC.

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

[0561] 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).

[0562] 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 may be 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).

[0563] 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 a 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 a reference picture specified by the MV. In this correction, luminance or chrominance may be corrected.

[0564] [Predictive 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, the intra-prediction unit 216, and the inter-prediction unit 218 on the decoding device 200 side may correspond to the configurations, functions, and processing of the prediction control unit 128, the intra-prediction unit 124, and the inter-prediction unit 126 on the encoding device 100 side.

[0565] [Decoding using predicted chrominance samples] In a first aspect, a determination is made as to whether a block of chrominance samples of the current block can be predicted using luma samples, and the predicted chrominance samples are used for decoding the block.

[0566] Figure 97 is a flowchart illustrating an example of a process 1000 for decoding a block using predicted chroma samples, which may be performed, for example, by encoding apparatus 100 of Figure 7 or decoding apparatus 200 of Figure 67. For convenience, Figure 97 will be described with reference to decoding apparatus 200 of Figure 67.

[0567] In S1001, the decoding device 200 determines whether a chrominance block to be processed is located within an M×N non-overlapping area that coincides with the M×N grid of chrominance samples. FIGS. 98 and 99 are conceptual diagrams illustrating an example of determining whether a chrominance block to be processed is located within an M×N non-overlapping area that coincides with the M×N grid of chrominance samples. In some formats, such as the YUV420 format, a 16×16 pixel chrominance area corresponds to a 32×32 pixel luma area. As shown in FIGS. 98 and 99, a chrominance block located within a 32×32 luma area that coincides with the 16×16 chrominance grid is determined to be located within the M×N non-overlapping area that coincides with the M×N grid of chrominance samples. A chrominance block that is not located within the 32×32 luma area is not determined to be located within the M×N non-overlapping area that coincides with the M×N grid of chrominance samples. As shown in Figure 99, the chrominance blocks are contained within a grid (a 16x16 grid as shown), and the co-located luma blocks are also within the co-located 32x32 area, so the chrominance samples for the illustrated chrominance blocks may be predicted using the luma samples for the chrominance blocks.

[0568] In some embodiments, chrominance samples of blocks that are not determined to be within an M×N non-overlapping area that coincides with the M×N grid of chrominance samples may not be predicted using luma samples, but chrominance samples of blocks that are determined to be within an M×N non-overlapping area that coincides with the M×N grid of chrominance samples may be predicted using luma samples, e.g., by default, or if other conditions are met, such as those described below with reference to S1002.

[0569] 97, if it is determined in S1001 that the chrominance block to be processed is not within an M×N non-overlapping area that coincides with the M×N grid of chrominance samples, process 1000 proceeds from S1001 to S1004, where the decoding device 200 predicts chrominance samples of the block without using luma samples. Process 1000 proceeds from S1004 to S1005, where the decoding device 200 decodes the block using the predicted chrominance samples. If it is determined in S1001 that the chrominance block to be processed is within the M×N non-overlapping area, process 1000 proceeds from S1001 to S1002.

[0570] In S1002, the decoding device 200 determines whether to divide the current luma VPDU into smaller blocks. The determination of whether to divide the current luma VPDU into smaller blocks may be made in various ways. Some examples will be described in detail later with reference to Figures 102 and 103. If it is determined not to divide the current luma VPDU into smaller blocks in S1002, the process 1000 proceeds from S1002 to S1004, where the decoding device 200 predicts chrominance samples of the block without using luma samples in S1004. The process 1000 proceeds from S1004 to S1005, where the decoding device 200 decodes the block using the predicted chrominance samples in S1005. If it is determined in S1002 that the current luma VPDU is divided into smaller blocks, the process 1000 proceeds from S1002 to S1003, where the decoding device 200 predicts chrominance samples of the block using luma samples in S1003. The process 1000 proceeds from S1003 to S1005, where the decoding apparatus 200 decodes the block using the predicted chrominance samples. In some embodiments, additional considerations may be taken into account to determine whether to decode the chrominance samples of the block using luma samples, as described below with reference to Figure 103, for example.

[0571] Figure 100 is a conceptual diagram to explain VPDUs. A VPDU is a non-overlapping area that represents the buffer size for a pipeline stage. The left side of Figure 100 (labeled a) shows an example of a 128x128 CTU with four 64x64 VPDUs. The right side of Figure 100 (labeled b) shows an example of a 128x128 CTU with sixteen 32x32 VPDUs.

[0572] FIG. 101 is a conceptual diagram illustrating an example of determining whether a VPDU to be processed can predict blocks of chrominance samples using luma samples, based on whether the luma VPDU is divided into blocks. The left side shows a luma CTU, and the right side shows the corresponding chrominance CTU. As shown in the figure, luma VPDU0 is divided into blocks, and luma VPDU1 is not divided into blocks. Therefore, the chrominance samples of VPDU0 may be predicted using luma samples, and the chrominance samples of VPDU1 may not be predicted using luma samples.

[0573] Figure 102 is a conceptual diagram illustrating two example methods for determining whether to segment a luma VPDU into smaller blocks. In the first example, shown on the left side of Figure 102 (labeled a), the determination of whether to segment a luma VPDU may be based on a segmentation flag associated with the luma VPDU. As shown, if the segmentation flag has a value of 1, the VPDU is segmented (and the chrominance samples of the block may be predicted using the luma samples). If the segmentation flag has a value of 0, the VPDU is not segmented (and the chrominance samples of the block may not be predicted using the luma samples). Other segmentation flag values ​​may also be used to determine whether a luma VPDU can be segmented.

[0574] In a second example shown on the right side of Figure 102 (labeled b), the determination of whether to split a luma VPDU may be based on the quadtree partitioning depth of the luma blocks of the VPDU. As shown, the quadtree partitioning depth of the luma blocks of VPDU0 is greater than 1, so when decoding blocks of VPDU0, the chroma samples may be predicted using the luma samples. In contrast, the quadtree partitioning depth of the blocks of VPDU1 is less than or equal to 1, so when decoding blocks of VPDU1, the chroma samples may not be predicted using the luma samples. Other partitioning depth values ​​may also be used to determine whether a luma VPDU can be split.

[0575] 103 is a conceptual diagram illustrating an additional determination that may be taken into account when determining whether to use luma samples to predict chroma samples of a block. As shown in the figure, an additional determination when determining whether to use luma samples to predict chroma samples of a block may be whether the size of the block to be processed is equal to or smaller than a threshold block size.

[0576] The threshold block size may be a default block size, a signaled block size, or a predetermined block size, or may be a luma or chroma block size. For example, if the threshold block size is a 16x16 luma block size, it may be determined that the luma block size of VPDU0 is larger than 16x16 and therefore luma samples should not be used to determine the chroma samples for the block. The threshold block size may be used in S1002 to determine whether to split the luma VPDU being processed into smaller blocks.

[0577] Aspects of process 1000 of FIG. 97 may be modified in various ways. For example, process 1000 may be modified to perform more steps than those shown, to perform fewer steps than those shown, to perform steps in a different order, or to combine or split steps. For example, process 1000 may be modified to determine, prior to S1001 or S1002, whether to predict chrominance samples for the block based on other considerations, such as the size of the current block, as described with reference to FIG. 103. In another example, process 1000 may be modified to omit S1001.

[0578] The blocks described in each aspect may be replaced with rectangular or non-rectangular shaped partitions. Figure 104 shows examples of non-rectangular shaped partitions, such as triangular shaped partitions, L-shaped partitions, pentagonal shaped partitions, hexagonal shaped partitions, and polygonal shaped partitions. Other non-rectangular shaped partitions may be used, or combinations of various shapes may be used. The term "partition" in each aspect may be replaced with the term "prediction unit." Also, the term "partition" in each aspect may be replaced with the term "sub-prediction unit." Also, the term "partition" in each aspect may be replaced with the term "coding unit."

[0579] Among other benefits, determining whether the chrominance samples used to decode the current block can be predicted using luma samples can reduce reconstruction latency and improve the flexibility of hardware implementations.

[0580] One or more aspects disclosed herein may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some processes, some device configurations, some syntaxes, etc. shown in the flowcharts of one or more aspects disclosed herein may be implemented in combination with other aspects. Aspects described with reference to components of an encoding device may be similarly implemented by corresponding components of a decoding device.

[0581] [Implementation and Application] In each of the above embodiments, each of the functional or operational blocks can typically be realized by an MPU (micro processing unit), memory, etc. Furthermore, the processing by each of the functional blocks may be realized as a program execution unit such as a processor that reads and executes software (programs) recorded on a recording medium such as a ROM. The software may be distributed. The software may be recorded on various recording media such as semiconductor memory. Note that each functional block can also be realized by hardware (dedicated circuits). Furthermore, various combinations of hardware and software may be employed.

[0582] The processing described in each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using multiple devices. Furthermore, the processor that executes the program may be a single processor or multiple processors. In other words, centralized processing or distributed processing may be performed.

[0583] The aspects of the present disclosure are not limited to the above examples, and various modifications are possible, and these modifications are also included within the scope of the aspects of the present disclosure.

[0584] Furthermore, here, application examples of the video coding method (image coding method) or video decoding method (image decoding method) shown in each of the above embodiments and various systems implementing the application examples will be described. Such systems may be characterized by having an image coding device using the image coding method, an image decoding device using the image decoding method, or an image coding / decoding device including both. Other configurations of such systems can be appropriately changed depending on the situation.

[0585] [Usage example] 105 is a diagram showing the overall configuration of an appropriate content supply system ex100 that realizes a content distribution service. The area where communication services are provided is divided into cells of a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations in the illustrated example, are installed in each cell.

[0586] In this content supply system ex100, devices such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 are connected to the Internet ex101 via an Internet service provider ex102 or a communication network ex104 and base stations ex106 to ex110. The content supply system ex100 may connect any combination of the above devices. In various implementations, the devices may be connected to each other directly or indirectly via a telephone network or short-range wireless communication, without the intervention of the base stations ex106 to ex110. Furthermore, the streaming server ex103 may be connected to devices such as the computer ex111, the game console ex112, the camera ex113, the home appliance ex114, and the smartphone ex115 via the Internet ex101, etc. Furthermore, the streaming server ex103 may be connected to a terminal in a hotspot on an airplane ex117, etc., via a satellite ex116.

[0587] Note that wireless access points, hotspots, etc. may be used instead of the base stations ex106 to ex110. Furthermore, the streaming server ex103 may be directly connected to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or may be directly connected to an airplane ex117 without going through a satellite ex116.

[0588] The camera ex113 may be a device capable of taking still images and videos, such as a digital camera, and the smartphone ex115 may be a smartphone, a mobile phone, or a PHS (Personal Handyphone System) compatible with mobile communication systems such as 2G, 3G, 3.9G, 4G, and, in the future, 5G.

[0589] The home appliance ex114 is a refrigerator or an appliance included in a home fuel cell cogeneration system.

[0590] In the content supply system ex100, a terminal having a photographing function is connected to a streaming server ex103 via a base station ex106 or the like, thereby enabling live streaming and the like. In live streaming, a terminal (such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal on an airplane ex117) may perform the encoding process described in each of the above embodiments on still image or video content captured by a user using the terminal, may multiplex the video data obtained by encoding with audio data obtained by encoding audio corresponding to the video, and may transmit the obtained data to the streaming server ex103. In other words, each terminal functions as an image encoding device according to one aspect of the present disclosure.

[0591] Meanwhile, the streaming server ex103 streams the transmitted content data to the requesting client. The client is a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, a terminal on an airplane ex117, or the like, which is capable of decoding the encoded data. Each device that receives the distributed data decodes and plays back the received data. That is, each device may function as an image decoding device according to one aspect of the present disclosure.

[0592] [Distributed processing] The streaming server ex103 may also be multiple servers or multiple computers that process, record, and distribute data in a distributed manner. For example, the streaming server ex103 may be implemented as a CDN (Content Delivery Network), where content distribution is achieved through a network connecting numerous edge servers distributed around the world. In a CDN, a physically nearby edge server may be dynamically assigned depending on the client. Content is then cached and distributed to that edge server, thereby reducing latency. Furthermore, when certain types of errors occur or communication conditions change due to increased traffic, processing can be distributed among multiple edge servers, the distribution entity can be switched to another edge server, or distribution can be continued by bypassing the failed portion of the network, thereby achieving high-speed and stable distribution.

[0593] In addition to the distributed processing of the distribution itself, the encoding of captured data can be performed on each device, on the server side, or shared among devices. For example, encoding generally involves two processing loops. The first loop detects the image complexity or code size for each frame or scene. The second loop maintains image quality while improving encoding efficiency. For example, a device can perform the first encoding process, and the server that receives the content can perform the second encoding process, thereby improving content quality and efficiency while reducing the processing load on each device. In this case, if there is a request for near-real-time reception and decoding, the data encoded by a device can be received and played back on another device, enabling more flexible real-time distribution.

[0594] As another example, the camera ex113 or the like extracts features from an image, compresses the data related to the features as metadata, and transmits the data to the server. The server performs compression according to the meaning of the image (or the importance of the content), for example, by determining the importance of an object from the features and switching the quantization precision accordingly. The feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction when the server recompresses the image. Alternatively, the terminal may perform simple encoding such as VLC (variable length coding), and the server may perform encoding with a heavy processing load such as CABAC (context-adaptive binary arithmetic coding).

[0595] As another example, in a stadium, shopping mall, factory, etc., there may be multiple pieces of video data that have been shot by multiple terminals of almost the same scene. In this case, using the multiple terminals that shot the video and, as necessary, other terminals and servers that did not shoot the video, encoding processes are assigned to each of them, for example, in units of GOPs (Group of Pictures), pictures, or tiles obtained by dividing a picture, for distributed processing. This reduces delays and achieves better real-time performance.

[0596] Since multiple video data are of nearly the same scene, the server may manage and / or instruct the video data shot by each terminal to be mutually referential. The server may also receive encoded data from each terminal and change the reference relationships between multiple data, or correct or replace the pictures themselves and re-encode them. This allows for the generation of streams with improved quality and efficiency for each piece of data.

[0597] Furthermore, the server may perform transcoding to change the encoding format of the video data before distributing it. For example, the server may convert an MPEG-based encoding format to a VP-based encoding format (e.g., VP9), or convert H.264 to H.265, etc.

[0598] In this way, the encoding process can be performed by a terminal or one or more servers. Therefore, although the following uses terms such as "server" or "terminal" to refer to the entity performing the process, some or all of the processing performed by the server may be performed by the terminal, and some or all of the processing performed by the terminal may be performed by the server. The same applies to the decoding process.

[0599] [3D, multi-angle] Images or videos of different scenes or the same scene taken from different angles by multiple devices such as cameras ex113 and / or smartphones ex115 that are approximately synchronized with each other are increasingly being integrated and used. The videos taken by each device may be integrated based on the relative positional relationship between the devices obtained separately, or on areas where feature points in the videos match.

[0600] The server may not only encode 2D video, but also encode still images automatically or at a time specified by the user based on scene analysis of the video and transmit them to the receiving terminal. Furthermore, if the server can acquire the relative positional relationship between the capturing terminals, it can generate a 3D shape of the scene based on not only the 2D video but also images of the same scene captured from different angles. The server may separately encode 3D data generated by point clouds, etc., or may select or reconstruct images to be transmitted to the receiving terminal from images captured by multiple terminals based on the results of recognizing or tracking people or objects using the 3D data.

[0601] In this way, a user can enjoy a scene by arbitrarily selecting each video corresponding to each shooting device, or can enjoy content in which a video from a selected viewpoint is cut out from 3D data reconstructed using multiple images or videos. Furthermore, together with the video, sound may also be collected from multiple different angles, and the server may multiplex the sound from a specific angle or space with the corresponding video and transmit the multiplexed video and sound.

[0602] In recent years, content that associates the real world with a virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become popular. In the case of VR images, the server creates viewpoint images for the right eye and left eye, and may perform encoding that allows reference between the viewpoint images using Multi-View Coding (MVC) or the like, or may encode them as separate streams without mutual reference. When decoding the separate streams, it is preferable to play them in synchronization with each other so that a virtual three-dimensional space is reproduced according to the user's viewpoint.

[0603] In the case of AR images, the server may superimpose virtual object information in the virtual space onto camera information in the real space based on the 3D position or the movement of the user's viewpoint. The decoding device may acquire or store virtual object information and 3D data, generate a 2D image according to the movement of the user's viewpoint, and smoothly connect the images to create superimposed data. Alternatively, the decoding device may send the user's viewpoint movement to the server in addition to a request for virtual object information. The server may create superimposed data based on the viewpoint movement received from the 3D data stored on the server, encode the superimposed data, and distribute it to the decoding device. Note that superimposed data typically has an α value indicating transparency in addition to RGB. The server may set the α value of parts other than the object created from the 3D data to 0, for example, to encode the parts in a transparent state. Alternatively, the server may generate data by setting a predetermined RGB value as the background, like a chromakey, and using the background color for parts other than the object. The predetermined RGB value may be predetermined.

[0604] Similarly, the decoding of distributed data may be performed by each client terminal, by the server, or by multiple terminals. For example, one terminal may first send a reception request to the server, and then other terminals may receive and decode content according to the request, after which the decoded signal is transmitted to a device with a display. By distributing the processing and selecting appropriate content regardless of the capabilities of the communication terminals themselves, high-quality data can be reproduced. As another example, large-sized image data may be received on a TV or other device, and only a portion of the picture, such as a tile into which the picture is divided, may be decoded and displayed on the viewer's personal device. This allows the viewer to share the overall picture while checking their own area of ​​responsibility or an area of ​​interest in more detail.

[0605] In situations where multiple short-, medium-, or long-range wireless communications are available, both indoors and outdoors, it may be possible to seamlessly receive content using distribution system standards such as MPEG-DASH. Users may freely select and switch between decoding and display devices, such as their own devices and indoor / outdoor displays, in real time. Decoding can also be performed by switching between decoding and display devices using location information. This allows information to be mapped and displayed on a part of the wall or ground of a neighboring building with an embedded display device while the user is moving toward their destination. It is also possible to switch the bit rate of received data based on the accessibility of the encoded data on the network, such as if the encoded data is cached on a server that can be quickly accessed from the receiving device or copied to an edge server in a content delivery service.

[0606] [Webpage optimization] FIG. 106 is a diagram showing an example of a web page display screen on a computer ex111 or the like. FIG. 107 is a diagram showing an example of a web page display screen on a smartphone ex115 or the like. As shown in FIGS. 106 and 107, a web page may include multiple link images that are links to image content, and the appearance of the web page may differ depending on the device used to view the page. When multiple link images are visible on the screen, the display device (decoding device) may display a still image or I-picture contained in each content as a link image, or may display a video such as a GIF animation using multiple still images or I-pictures, or may receive only the base layer and decode and display the video until the user explicitly selects the link image, or until the link image approaches the center of the screen or until the entire link image is within the screen.

[0607] When a link image is selected by a user, the display device performs decoding while prioritizing the base layer. Note that if the HTML constituting the web page contains information indicating that the content is scalable, the display device may decode up to the enhancement layer. Furthermore, to ensure real-time performance, before selection or when the communication bandwidth is very limited, the display device decodes and displays only forward-referenced pictures (I pictures, P pictures, and forward-reference-only B pictures), thereby reducing the delay between the decoding time of the first picture and the display time (the delay from the start of content decoding to the start of display). Furthermore, the display device may intentionally ignore the picture reference relationships and roughly decode all B and P pictures using forward reference, and then perform normal decoding as the number of received pictures increases over time.

[0608] [Autonomous driving] Furthermore, when transmitting and receiving still image or video data such as 2D or 3D map information for automatic driving or driving assistance of a vehicle, the receiving terminal may receive weather or construction information as meta information in addition to image data belonging to one or more layers, and may associate and decode these. Note that the meta information may belong to a layer, or may simply be multiplexed with the image data.

[0609] In this case, since a vehicle, drone, or airplane including a receiving terminal is moving, the receiving terminal can transmit location information of the receiving terminal, thereby realizing seamless reception and decoding while switching between base stations ex106 to ex110. Furthermore, the receiving terminal can dynamically switch how much meta information to receive or how much to update map information depending on the user's selection, the user's situation, and / or the state of the communication bandwidth.

[0610] In the content supply system ex100, the client can receive, decode, and play back encoded information sent by a user in real time.

[0611] [Distribution of personal content] Furthermore, the content supply system ex100 allows not only high-quality, long-duration content from video distribution companies, but also low-quality, short-duration content from individuals via unicast or multicast. It is expected that such personal content will continue to increase in the future. To improve the quality of personal content, the server may perform editing before encoding. This can be achieved, for example, using the following configuration.

[0612] During shooting, either in real time or after accumulating and shooting, the server performs recognition processing such as detecting shooting errors, scene search, semantic analysis, and object detection from the original image data or encoded data. Based on the recognition results, the server manually or automatically corrects out-of-focus or camera shake, deletes less important scenes such as scenes with lower brightness or out-of-focus compared to other pictures, emphasizes object edges, changes color, and performs other editing. The server then encodes the edited data based on the editing results. It is also known that viewing rates decrease if the shooting time is too long. Therefore, the server may automatically clip not only less important scenes as described above but also scenes with little movement, based on the image processing results, so that the content falls within a specific time range depending on the shooting time. Alternatively, the server may generate and encode a digest based on the results of the semantic analysis of the scenes.

[0613] Personal content may contain content that, if left as is, violates copyright, moral rights, or portrait rights, and may cause the scope of sharing to exceed the intended scope, resulting in inconvenience to individuals. Therefore, for example, the server may intentionally defocus images of people's faces on the periphery of the screen or the interior of a house before encoding. Furthermore, the server may recognize whether the image to be encoded contains the face of a person other than a pre-registered person, and if so, perform processing such as blurring the face. Alternatively, as pre- or post-processing before encoding, the user may specify a person or background area they wish to modify in the image for copyright or other reasons. The server may replace the specified area with another image or blur the focus. If the image contains a person, the server may track the person in the video and replace the image of the person's face.

[0614] Because viewing personal content with small data volumes requires real-time performance, the decoding device may first receive the base layer as a top priority and decode and play it back, depending on the bandwidth. The decoding device may also receive the enhancement layer during this time, and if the content is played back more than once, such as when playback is looped, play back high-quality video including the enhancement layer. A stream that has undergone scalable encoding in this way can provide an experience in which the video appears rough when not selected or when viewing begins, but gradually becomes smoother and the image quality improves. In addition to scalable encoding, a similar experience can also be provided by configuring a single stream consisting of a rough stream played the first time and a second stream that is encoded with reference to the first video.

[0615] [Other application examples] Furthermore, these encoding or decoding processes are generally performed by an LSI ex500 possessed by each terminal. The LSI (large scale integration circuitry) ex500 (see FIG. 105) may be a single chip or may be configured with multiple chips. It is also possible to incorporate video encoding or decoding software into some kind of recording medium (such as a CD-ROM, flexible disk, or hard disk) that can be read by a computer ex111, and perform the encoding or decoding process using that software. Furthermore, if the smartphone ex115 is equipped with a camera, video data captured by the camera may be transmitted. This video data is data that has been encoded by the LSI ex500 possessed by the smartphone ex115.

[0616] The LSIex500 may be configured to download and activate application software. In this case, the terminal first determines whether it supports the content encoding method or has the capability to execute a specific service. If the terminal does not support the content encoding method or does not have the capability to execute a specific service, the terminal downloads the codec or application software and then acquires and plays the content.

[0617] Furthermore, at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) of each of the above embodiments can be incorporated into a digital broadcasting system, not limited to the content supply system ex100 via the Internet ex101. Since multiplexed data in which video and audio are multiplexed is transmitted and received over broadcast radio waves using a satellite or the like, the content supply system ex100 is more suited to multicast than the content supply system ex100, which is more suited to unicast, but similar applications are possible with regard to encoding and decoding processes.

[0618] [Hardware configuration] FIG. 108 is a diagram illustrating further details of the smartphone ex115 illustrated in FIG. 105. FIG. 109 is a diagram illustrating an example of the functional configuration of the smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex465 capable of capturing video and still images, and a display unit ex458 for displaying video captured by the camera unit ex465 and decoded data of the video and other images received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting voice or sound, an audio input unit ex456 such as a microphone for inputting voice, a memory unit ex467 capable of storing encoded data or decoded data such as captured video or still images, recorded voice, received video or still images, and email, and a slot unit ex464 that serves as an interface with a SIM ex468 for identifying users and authenticating access to various data, including networks. In addition, an external memory may be used instead of or in addition to the memory unit ex467.

[0619] A main control unit ex460 that compr...

Claims

1. The circuit and a memory connected to the circuit; The circuit, in operation, determining whether to segment a luma VPDU (virtual pipeline decoding unit) to be processed into smaller blocks when a chroma VPDU corresponding to the luma VPDU to be processed is segmented into smaller blocks based on a segmentation flag associated with the luma VPDU; predicting blocks of chrominance samples without using luma samples in response to a determination that the luma VPDU to be processed is not to be divided into smaller blocks; In response to a determination that the current luma VPDU is divided into smaller blocks, predicting blocks of chroma samples using luma samples; encoding the block using the predicted chrominance samples; Encoding device.

2. The circuit and a memory connected to the circuit; The circuit, in operation, determining whether to segment a luma VPDU (virtual pipeline decoding unit) to be processed into smaller blocks when a chroma VPDU corresponding to the luma VPDU to be processed is segmented into smaller blocks based on a segmentation flag associated with the luma VPDU; predicting blocks of chrominance samples without using luma samples in response to a determination that the luma VPDU to be processed is not to be divided into smaller blocks; In response to a determination that the current luma VPDU is divided into smaller blocks, predicting blocks of chroma samples using luma samples; decoding the block using the predicted chrominance samples; Decryption device.

3. The circuit and a memory connected to the circuit; The circuit, in operation, determining whether to divide a luma VPDU (virtual pipeline decoding unit) to be processed into smaller blocks when a chroma VPDU corresponding to the luma VPDU to be processed is divided into smaller blocks based on parameters related to division information including a division flag associated with the luma VPDU; predicting blocks of chrominance samples without using luma samples in response to a determination that the luma VPDU to be processed is not to be divided into smaller blocks; In response to a determination that the current luma VPDU is divided into smaller blocks, predicting blocks of chroma samples using luma samples; encoding the block using the predicted chrominance samples; transmitting a bitstream including parameters related to the segmentation information; A bitstream transmitter.

Citation Information

Patent Citations

  • Method and device for picture encoding and decoding

    WO2020176459A1

  • Intra-frame prediction method and apparatus for video sequence

    WO2020220884A1