Symbolization device and decoding device
By correcting motion vectors using correction values from tables with varying index intervals, the proposed method improves encoding and decoding efficiency, reduces processing volume, and minimizes circuit scale, addressing the limitations of existing H.265/HEVC-based methods.
Patent Information
- Application Number
- JP2024096532
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-07-18
- Filing Date
- 2024-06-14
- Publication Date
- 2025-06-30
- Estimated Expiration
- 2039-07-05
AI Technical Summary
Existing encoding and decoding methods for moving images, such as those based on H.265/HEVC, face challenges in improving processing efficiency, image quality, and reducing circuit scale while maintaining effective encoding and decoding performance.
The proposed solution involves an encoding and decoding method that corrects motion vectors using correction values specified by indices in predetermined tables. These tables have different intervals between indexes, allowing for precise motion vector correction and improved encoding efficiency.
This approach enhances encoding efficiency, reduces processing volume, and minimizes circuit scale, while maintaining high encoding and decoding speeds by accurately selecting components and operations in the encoding and decoding processes.
Smart Images

Figure 0007700325000004 
Figure 0007700325000005 
Figure 0007700325000006
Abstract
Description
Technical Field
[0001] The present disclosure relates to an encoding device, a decoding device, an encoding method, and a decoding method.
Background Art
[0002] Conventionally, H.265 exists as a standard for encoding moving images. H.265 is also called HEVC (High Efficiency Video Coding).
Prior Art Documents
Non-Patent Documents
[0003]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In such encoding and decoding methods, it is desired to be able to propose a new method for improving processing efficiency, improving image quality, reducing circuit scale, etc.
[0005] Each of the configurations or methods disclosed in the embodiments or parts thereof in the present disclosure can contribute to at least any one of, for example, improving encoding efficiency, reducing encoding / decoding processing volume, reducing circuit scale, improving encoding / decoding speed, and appropriately selecting components / operations such as filters, blocks, sizes, motion vectors, reference pictures, reference blocks, etc. in encoding and decoding.
[0006] Note that the present disclosure also includes disclosure of configurations or methods that can provide benefits other than the above. For example, a configuration or method for improving encoding efficiency while suppressing an increase in processing volume.
Means for Solving the Problems
[0007] An encoding apparatus according to an aspect of the present disclosure includes a memory and a circuit connected to the memory. The circuit is used to correct a motion vector of a block to be encoded included in an image, and selects a first table from a plurality of tables in which an index and a correction value are associated. In the first table, a parameter indicating a first index among a plurality of indexes is written into a bit stream, a first correction value associated with the first index is specified, the motion vector is corrected by the specified first correction value in a predetermined direction, and based on the corrected motion vector, the block to be encoded is encoded. The plurality of tables have correction values with different intervals between indexes, and in each of the plurality of tables, a correction value with a smaller value among the correction values is assigned to an index with a smaller value among the plurality of indexes.
[0008] An encoding method according to an aspect of the present disclosure includes selecting a first table from a plurality of tables that are each used to correct a motion vector of a block to be encoded included in an image and in which an index and a correction value are associated, writing, in the first table, a parameter indicating a first index among a plurality of indexes into a bit stream, specifying a first correction value associated with the first index, correcting the motion vector by the specified first correction value in a predetermined direction, and encoding the block to be encoded based on the corrected motion vector. The plurality of tables have correction values with different intervals between indexes.
[0009] A decoding method according to an aspect of the present disclosure includes, for each of the blocks to be decoded included in an image, selecting a first table from a plurality of tables each used to correct a motion vector of the block to be decoded and having an index associated with a correction value, analyzing a parameter indicating a first index among the plurality of indexes in the first table, specifying a first correction value associated with the first index, correcting the motion vector by the specified first correction value in a predetermined direction, and decoding the block to be decoded based on the corrected motion vector, wherein the plurality of tables have correction values with different intervals between the indexes.
[0010] Note that these general or specific aspects may be implemented in a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be implemented in any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
[0011] Further benefits and advantages provided by the disclosed embodiments will become apparent from the specification and the drawings. These benefits and advantages may be individually brought about by various embodiments and features of the specification and the drawings, and not all are necessarily provided in order to obtain one or more of the benefits and advantages.
Effects of the Invention
[0012] The present disclosure can provide an encoding device, a decoding device, an encoding method, and a decoding method capable of improving encoding efficiency.
Brief Description of the Drawings
[0013]
Figure 1
Figure 2
Figure 3
Figure 4A
Figure 4B
Figure 5A
Figure 5B
Figure 6A
Figure 6B
Figure 6C
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25A
Figure 25B
Figure 26A
Figure 26B
Figure 26C
Figure 27
Figure 28A
Figure 28B
Figure 29
Figure 30A
Figure 30B
Figure 31A
Figure 31B
Figure 32
Figure 33
Figure 34
Figure 35
Figure 36
Figure 37
Figure 38
Figure 39
Figure 40
Figure 41
Figure 42
Figure 43
Figure 44
Figure 45
Figure 46
Figure 47
Figure 48
Figure 49
Figure 50
Figure 51
Figure 52
Figure 53
Figure 54
Figure 55
Figure 56
Figure 57
Figure 58
Figure 59
Figure 60
Figure 61
Figure 62
Embodiments for Carrying Out the Invention
[0014] For example, an encoding device according to one aspect of the present disclosure is an encoding device that encodes a moving image, and includes a circuit and a memory connected to the circuit. In operation, the circuit is used to correct a reference motion vector with a correction value specified by an index in a predetermined direction, and selects a first table to be used for a partition of an image to be encoded in the moving image from a plurality of tables having different correction values at different intervals between the indexes, writes a parameter indicating a first index to be selected among the indexes included in the first table, and encodes the partition using the reference motion vector corrected by the correction value specified by the first index.
[0015] According to this, when using a motion vector with higher accuracy than the reference motion vector, it is possible to specify the motion vector with high accuracy by using an index with a smaller numerical value (less information) in the first table selected from a plurality of tables. Therefore, the encoding device may be able to improve the encoding performance of the inter-prediction process.
[0016] Here, for example, the circuit selects the first table by analyzing a first parameter that specifies the first table among the plurality of tables.
[0017] Also, for example, the circuit acquires a slice header of a current slice including the partition, and the first parameter is written in the slice header.
[0018] Also, for example, the circuit selects the first table from the plurality of tables by using a motion vector in an already encoded frame.
[0019] Also, for example, the circuit selects the first table from the plurality of tables by using a differential motion vector in an already encoded frame.
[0020] Also, for example, the circuit selects the first table from the plurality of tables using the resolution of the picture to which the partition to be encoded belongs.
[0021] Also, for example, the circuit selects the first table from the plurality of tables using the temporal ID of the picture to which the partition to be encoded belongs.
[0022] Also, for example, the circuit selects the first table from the plurality of tables using the value of the predicted motion vector in the partition to be encoded.
[0023] Also, a decoding device according to an aspect of the present disclosure is a decoding device that decodes a moving image, and includes a circuit and a memory connected to the circuit. In operation, the circuit is used to correct a reference motion vector with a correction value specified by an index in a predetermined direction, and selects a first table to be used for a partition to be decoded of an image in the moving image from a plurality of tables having correction values with different intervals between the indexes, analyzes a parameter indicating a first index to be selected among the indexes of the first table, and decodes the partition using the reference motion vector corrected by the correction value specified by the first index.
[0024] According to this, when using a motion vector with higher accuracy than the reference motion vector, it is possible to specify the motion vector with high accuracy using an index with a smaller numerical value (less information) in the first table selected from the plurality of tables. Therefore, the decoding device may be able to improve the encoding performance of the inter-prediction process.
[0025] Here, for example, the circuit selects the first table by analyzing a first parameter that specifies the first table among the plurality of tables.
[0026] Also, for example, the circuit obtains a slice header of a current slice including the partition, and the first parameter is written in the slice header.
[0027] Also, for example, the circuit selects the first table from the plurality of tables using a motion vector in a frame that has already been decoded.
[0028] Also, for example, the circuit selects the first table from the plurality of tables using a differential motion vector in a frame that has already been decoded.
[0029] Also, for example, the circuit selects the first table from the plurality of tables using the resolution of a picture to which the partition to be decoded belongs.
[0030] Also, for example, the circuit selects the first table from the plurality of tables using the temporal ID of a picture to which the partition to be decoded belongs.
[0031] Also, for example, the circuit selects the first table from the plurality of tables using the distance between a current picture and a reference picture to which the partition to be decoded belongs.
[0032] Also, for example, the circuit selects the first table from the plurality of tables using the value of a predicted motion vector in the partition to be decoded.
[0033] Further, for example, an encoding method according to an aspect of the present disclosure is an encoding method for encoding a moving image, and is used to correct a reference motion vector with a correction value specified by an index in a predetermined direction. From a plurality of tables having correction values with different intervals between indexes, a first table to be used for a partition of an image to be encoded in the moving image is selected, a parameter indicating a first index to be selected among the indexes of the first table is written, and the partition is encoded using the reference motion vector corrected by the correction value specified by the first index.
[0034] According to this, when using a motion vector with higher accuracy than the reference motion vector, it is possible to specify the motion vector with high accuracy by using an index with a smaller numerical value (less information) in the first table selected from a plurality of tables. Therefore, the encoding method may be able to improve the encoding performance of the inter prediction process.
[0035] Further, for example, a decoding method according to an aspect of the present disclosure is a decoding method for decoding a moving image, and is used to correct a reference motion vector with a correction value specified by an index in a predetermined direction. From a plurality of tables having correction values with different intervals between indexes, a first table to be used for a partition of an image to be decoded in the moving image is selected, a parameter indicating a first index to be selected among the indexes of the first table is analyzed, and the partition is decoded using the reference motion vector corrected by the correction value specified by the first index.
[0036] According to this, when using a motion vector with higher accuracy than the reference motion vector, it is possible to specify the motion vector with high accuracy by using an index with a smaller numerical value (less information) in the first table selected from a plurality of tables. Therefore, the decoding method may be able to improve the encoding performance of the inter prediction process.
[0037] Further, for example, a decoding apparatus according to an aspect of the present disclosure is a decoding apparatus that decodes a moving image, and includes a circuit and a memory connected to the circuit. In operation, the circuit corrects the motion vector using a correction value that corrects the reference motion vector in a predetermined direction, and decodes a partition of an image to be processed in the moving image using the corrected motion vector. The correction value is specified by a first parameter indicating any one of a plurality of values included in a table, and one of a plurality of tables is selected and used.
[0038] According to this, when using a motion vector with higher accuracy than the reference motion vector, it is possible to specify the motion vector with high accuracy using an index of a smaller numerical value (less information) in the first table selected from a plurality of tables. Therefore, the decoding method may be able to improve the encoding performance of the inter-prediction process.
[0039] Furthermore, these general or specific aspects may be implemented by a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be implemented by any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
[0040] Hereinafter, embodiments will be specifically described with reference to the drawings.
[0041] Note that the embodiments described below are all examples showing general or specific aspects. Numerical values, shapes, materials, components, arrangement positions and connection forms of components, steps, relationships and orders of steps, etc. shown in the following embodiments are merely examples and are not intended to limit the scope of the claims.
[0042] Hereinafter, embodiments of an encoding device and a decoding device will be described. The embodiments are examples of an encoding device and a decoding device to which the processes and / or configurations described in each aspect of the present disclosure are applicable. The processes and / or configurations can also be implemented in encoding devices and decoding devices different from the embodiments. For example, with respect to the processes and / or configurations applied to the embodiments, any of the following may be implemented.
[0043] (1) Any one of the plurality of components of the encoding device or decoding device of the embodiment described in each aspect of the present disclosure may be replaced or combined with any other component described in any aspect of the present disclosure.
[0044] (2) In the encoding device or decoding device of the embodiment, arbitrary changes such as addition, replacement, and deletion of functions or processes may be made to the functions or processes performed by some of the plurality of components of the encoding device or decoding device. For example, any function or process may be replaced or combined with any other function or process described in any aspect of the present disclosure.
[0045] (3) In the method implemented by the encoding device or decoding device of the embodiment, arbitrary changes such as addition, replacement, and deletion may be made to some of the plurality of processes included in the method. For example, any process in the method may be replaced or combined with any other process described in any aspect of the present disclosure.
[0046] (4) Some of the plurality of components constituting the encoding device or decoding device of the embodiment may be combined with the components described in any aspect of the present disclosure, or may be combined with components having a part of the functions described in any aspect of the present disclosure, or may be combined with components that implement a part of the processes performed by the components described in each aspect of the present disclosure.
[0047] (5) A component having a part of the functions of the encoding device or the decoding device according to the embodiment, or a component that implements a part of the processing of the encoding device or the decoding device according to the embodiment may be combined or replaced with a component described in any of the aspects of the present disclosure, a component having a part of the functions described in any of the aspects of the present disclosure, or a component that implements a part of the processing described in any of the aspects of the present disclosure.
[0048] (6) In the method implemented by the encoding device or the decoding device according to the embodiment, any of the plurality of 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.
[0049] (7) Some of the plurality of processes included in the method implemented by the encoding device or the decoding device according to the embodiment may be combined with the process described in any of the aspects of the present disclosure.
[0050] (8) The manner of implementing the processes and / or configurations described in each aspect of the present disclosure is not limited to the encoding device or the decoding device according to the embodiment. For example, the processes and / or configurations may be implemented in a device used for a purpose different from the moving image encoding or moving image decoding disclosed in the embodiment.
[0051] (Embodiment 1) [Encoding Device] First, the encoding device according to the present embodiment will be described. FIG. 1 is a block diagram showing the functional configuration of the encoding device 100 according to the present embodiment. The encoding device 100 is a moving image encoding device that encodes moving images in block units.
[0052] As shown in FIG. 1, the encoding device 100 is a device that encodes an image in block units, and includes a splitting unit 102, a subtraction unit 104, a conversion unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse conversion unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.
[0053] The encoding device 100 is realized by, for example, a general-purpose processor and a memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the splitting unit 102, the subtraction unit 104, the conversion unit 106, the quantization unit 108, the entropy encoding unit 110, the inverse quantization unit 112, the inverse conversion 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. Further, the encoding device 100 may be realized as one or more dedicated electronic circuits corresponding to the splitting unit 102, the subtraction unit 104, the conversion unit 106, the quantization unit 108, the entropy encoding unit 110, the inverse quantization unit 112, the inverse conversion 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.
[0054] After explaining the overall processing flow of the encoding device 100 below, each component included in the encoding device 100 will be described.
[0055] [Overall Flow of Encoding Process] FIG. 2 is a flowchart showing an example of the overall encoding process by the encoding device 100.
[0056] First, the splitting unit 102 of the encoding device 100 splits each picture included in the input image, which is a moving image, into a plurality of fixed-size blocks (128×128 pixels) (step Sa_1). Then, the splitting unit 102 selects a splitting pattern (also referred to as a block shape) for the fixed-size blocks (step Sa_2). That is, the splitting unit 102 further splits the fixed-size blocks into a plurality of blocks that make up the selected splitting pattern. Then, for each of the plurality of blocks, the encoding device 100 performs the processes of steps Sa_3 to Sa_9 on the block (i.e., the block to be encoded).
[0057] That is, the prediction processing unit, which consists of all or part of the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128, generates a prediction signal (also referred to as a prediction block) for the block to be encoded (current block) (step Sa_3).
[0058] Next, the subtraction unit 104 generates the difference between the block to be encoded and the prediction block as a prediction residual (also referred to as a difference block) (step Sa_4).
[0059] Next, the conversion unit 106 and the quantization unit 108 perform conversion and quantization on the difference block to generate a plurality of quantization coefficients (step Sa_5). Note that a block consisting of a plurality of quantization coefficients is also referred to as a coefficient block.
[0060] Next, the entropy encoding unit 110 generates an encoded signal by performing encoding (specifically, entropy encoding) on the coefficient block and the prediction parameters related to the generation of the prediction signal (step Sa_6). Note that the encoded signal is also referred to as an encoded bit stream, a compressed bit stream, or a stream.
[0061] Next, the inverse quantization unit 112 and the inverse conversion unit 114 restore a plurality of prediction residuals (i.e., difference blocks) by performing inverse quantization and inverse conversion on the coefficient block (step Sa_7).
[0062] Next, the addition unit 116 reconstructs the current block into a reconstructed image (also referred to as a reconstructed block or a decoded image block) by adding the predicted block to the restored difference block (step Sa_8). Thereby, a reconstructed image is generated.
[0063] When this reconstructed image is generated, the loop filter unit 120 performs filtering on the reconstructed image as necessary (step Sa_9).
[0064] Then, the encoding device 100 determines whether the encoding of the entire picture is completed (step Sa_10). If it is determined that the encoding is not completed (No in step Sa_10), the processing from step Sa_2 is repeatedly executed.
[0065] In the above example, the encoding device 100 selects one splitting pattern for a block of a fixed size and performs encoding of each block according to the splitting pattern. However, the encoding of each block may be performed according to each of a plurality of splitting patterns. In this case, the encoding device 100 may evaluate the cost for each of the plurality of splitting patterns, and select, for example, the encoded signal obtained by encoding according to the splitting pattern with the smallest cost as the finally output encoded signal.
[0066] Also, the processing of these steps Sa_1 to Sa_10 may be sequentially performed by the encoding device 100, a plurality of parts of these processes may be performed in parallel, or the order may be changed.
[0067] [Splitting Unit] The splitting unit 102 splits each picture included in the input moving image into a plurality of blocks, and outputs each block to the subtraction unit 104. For example, the splitting unit 102 first splits the picture into blocks of a fixed size (for example, 128x128). These blocks of fixed size are sometimes called Coding Tree Units (CTUs). Then, the splitting unit 102 splits each of the fixed-size blocks into blocks of variable size (for example, 64x64 or less) based on, for example, recursive quadtree and / or binary tree block splitting. That is, the splitting unit 102 selects a splitting pattern. These blocks of variable size are sometimes called Coding Units (CUs), Prediction Units (PUs), or Transformation Units (TUs). Note that in various implementation examples, it is not necessary to distinguish between CUs, PUs, and TUs, and some or all of the blocks in the picture may be processing units for CUs, PUs, and TUs.
[0068] FIG. 3 is a diagram showing an example of block splitting in the present embodiment. In FIG. 3, the solid line represents the block boundary by quadtree block splitting, and the broken line represents the block boundary by binary tree block splitting.
[0069] Here, the block 10 is a square block of 128x128 pixels (128x128 block). This 128x128 block 10 is first split into four square 64x64 blocks (quadtree block splitting).
[0070] The upper-left 64x64 block is further vertically split into two rectangular 32x64 blocks, and the left 32x64 block is further vertically split into two rectangular 16x64 blocks (binary tree block splitting). As a result, the upper-left 64x64 block is split into two 16x64 blocks 11, 12 and a 32x64 block 13.
[0071] The upper-right 64x64 block is horizontally split into two rectangular 64x32 blocks 14, 15 (binary tree block splitting).
[0072] The 64x64 block in the lower left is divided into four square 32x32 blocks (quad-tree block division). Among the four 32x32 blocks, the upper left block and the lower right block are further divided. The upper left 32x32 block is vertically divided into two rectangular 16x32 blocks, and the right 16x32 block is further horizontally divided into two 16x16 blocks (binary-tree block division). The lower right 32x32 block is horizontally divided into two 32x16 blocks (binary-tree block division). As a result, the 64x64 block in the lower left is divided into 16 16x32 blocks, two 16x16 blocks 17 and 18, two 32x32 blocks 19 and 20, and two 32x16 blocks 21 and 22.
[0073] The 64x64 block 23 in the lower right is not divided.
[0074] As described above, in FIG. 3, the block 10 is divided into 13 variable-size blocks 11 to 23 based on recursive quad-tree and binary-tree block division. Such division is sometimes called QTBT (quad-tree plus binary tree) division.
[0075] Note that in FIG. 3, one block is divided into four or two blocks (quad-tree or binary-tree block division), but the division is not limited to these. For example, one block may be divided into three blocks (ternary-tree block division). Such division including ternary-tree block division is sometimes called MBT (multi type tree) division.
[0076] [Picture Composition Slices / Tiles] To decode a picture in parallel, the picture may be composed in units of slices or tiles. A picture composed of units of slices or tiles may be composed by the dividing unit 102.
[0077] A slice is the basic encoding unit that constitutes a picture. A picture is composed of, for example, one or more slices. Also, a slice consists of one or more consecutive CTUs (Coding Tree Units).
[0078] Figure 4A is a diagram showing an example of the composition of a slice. For example, a picture contains 11×8 CTUs and is divided into 4 slices (Slice 1 - 4). Slice 1 consists of 16 CTUs, Slice 2 consists of 21 CTUs, Slice 3 consists of 29 CTUs, and Slice 4 consists of 22 CTUs. Here, each CTU in the picture belongs to one of the slices. The shape of the slice is in the form of dividing the picture horizontally. The boundary of the slice does not have to be at the edge of the screen and can be anywhere among the boundaries of the CTUs within the screen. The processing order (encoding order or decoding order) of the CTUs within a slice is, for example, in raster scan order. Also, a slice contains header information and encoded data. The header information may describe the characteristics of that slice, such as the CTU address at the beginning of the slice and the slice type.
[0079] A tile is a unit of a rectangular area that constitutes a picture. A number called TileId may be assigned to each tile in raster scan order.
[0080] Figure 4B is a diagram showing an example of the composition of a tile. For example, a picture contains 11×8 CTUs and is divided into 4 rectangular area tiles (Tile 1 - 4). When tiles are used, the processing order of the CTUs is changed compared to when tiles are not used. When tiles are not used, multiple CTUs in the picture are processed in raster scan order. When tiles are used, in each of the multiple tiles, at least one CTU is processed in raster scan order. For example, as shown in Figure 4B, 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.
[0081] Note that one tile may include one or more slices, and one slice may include one or more tiles.
[0082] [Subtraction unit] The subtraction unit 104 receives an input from the division unit 102 and subtracts a predicted signal (predicted sample input from the prediction control unit 128 shown below) from the original signal (original sample) in block units divided by the division unit 102. That is, the subtraction unit 104 calculates the prediction error (also referred to as the residual) of the block to be encoded (hereinafter referred to as the current block). Then, the subtraction unit 104 outputs the calculated prediction error (residual) to the conversion unit 106.
[0083] The original signal is the input signal of the encoding device 100 and is a signal representing the image of each picture constituting a moving image (for example, a luminance (luma) signal and two color difference (chroma) signals). Hereinafter, the signal representing the image may also be referred to as a sample.
[0084] [Conversion unit] The conversion unit 106 converts the prediction error in the spatial domain into conversion coefficients in the frequency domain and outputs the conversion coefficients to the quantization unit 108. Specifically, the conversion unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error in the spatial domain.
[0085] Note that the conversion unit 106 may adaptively select a conversion type from a plurality of conversion types and convert the prediction error into conversion coefficients using a conversion basis function corresponding to the selected conversion type. Such a conversion may be referred to as an explicit multiple core transform (EMT) or an adaptive multiple transform (AMT).
[0086] The plurality of transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. FIG. 5A is a table showing the transform basis functions corresponding to each transform type. In FIG. 5A, N indicates the number of input pixels. The selection of the transform type from among these plurality of transform types may depend on, for example, the type of prediction (intra prediction and inter prediction), or may depend on the intra prediction mode.
[0087] Information indicating whether to apply such EMT or AMT (for example, called an EMT flag or an AMT flag) and information indicating the selected transform type are usually signaled at the CU level. Note that the signaling of this information does not necessarily have to be limited to the CU level and may be at other levels (for example, bit sequence level, picture level, slice level, tile level, or CTU level).
[0088] Also, the transform unit 106 may re-transform the transform coefficients (transformation results). Such re-transformation may be called AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the transform unit 106 performs re-transformation for each sub-block (for example, 4x4 sub-block) included in the block of transform coefficients corresponding to the intra prediction error. Information indicating whether to apply NSST and information regarding the transform matrix used for NSST are usually signaled at the CU level. Note that the signaling of this information does not necessarily have to be limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).
[0089] A separable transform and a non-separable transform may be applied to the transform unit 106. The separable transform is a method in which the input is separated for each direction by the number of dimensions of the input and transformed multiple times, and the non-separable transform is a method in which when the input is multi-dimensional, two or more dimensions are regarded as one dimension and transformed together.
[0090] For example, as an example of a non-separable transform, when the input is a 4×4 block, it can be regarded as an array with 16 elements, and a transform process is performed on the array using a 16×16 transform matrix.
[0091] Also, in a further example of a non-separable transform, after regarding a 4×4 input block as an array with 16 elements, a transform (Hypercube Givens Transform) that performs multiple Givens rotations on the array may be performed.
[0092] In the transform in the transform unit 106, the type of basis for transformation into the frequency domain can also be switched according to the region within the CU. As an example, there is SVT (Spatially Varying Transform). In SVT, as shown in FIG. 5B, the CU is divided into two equal parts in the horizontal or vertical direction, and transformation into the frequency domain is performed only on one of the regions. The type of transform basis can be set for each region. For example, DST7 and DCT8 are used. In this example, only one of the two regions within the CU is transformed, and the other is not transformed, but both regions may be transformed. Also, the division method can be made more flexible, not only by dividing into two equal parts, but also by dividing into four equal parts, or separately encoding information indicating the division and signaling it in the same way as CU division. Note that SVT is sometimes also called SBT (Sub-block Transform).
[0093] [Quantization Unit] The quantization unit 108 quantizes the transform coefficients output from the transform unit 106. Specifically, the quantization unit 108 scans the transform coefficients of the current block in a predetermined scanning order, and quantizes the transform coefficients based on the quantization parameter (QP) corresponding to the scanned transform coefficients. Then, the quantization unit 108 outputs the quantized transform coefficients (hereinafter referred to as quantization coefficients) of the current block to the entropy encoding unit 110 and the inverse quantization unit 112.
[0094] The predetermined scanning order is the order for quantization / inverse quantization of the conversion coefficients. For example, the predetermined scanning order is defined in ascending order of frequency (from low frequency to high frequency) or descending order of frequency (from high frequency to low frequency).
[0095] 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. That is, as the value of the quantization parameter increases, the quantization error increases.
[0096] Also, a quantization matrix may be used for quantization. For example, several types of quantization matrices may be used corresponding to frequency conversion sizes such as 4x4 and 8x8, prediction modes such as intra prediction and inter prediction, and pixel components such as luminance and color difference. Note that quantization means digitizing the sampled values at predetermined intervals by associating them with predetermined levels, and in this technical field, expressions such as rounding, rounding, and scaling may also be used.
[0097] As methods of using the quantization matrix, there are a method of using the quantization matrix directly set on the encoder side and a method of using the default quantization matrix (default matrix). On the encoder side, by directly setting the quantization matrix, a quantization matrix corresponding to the characteristics of the image can be set. However, in this case, there is a demerit that the amount of code increases due to the encoding of the quantization matrix.
[0098] On the other hand, there is also a method of quantizing the high-frequency component coefficients and the low-frequency component coefficients in the same way without using the quantization matrix. Note that this method is equivalent to a method of using a quantization matrix (flat matrix) in which all the coefficients have the same value.
[0099] The quantization matrix may be specified, for example, by 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 the PPS may sometimes be simply referred to as parameter sets.
[0100] [Entropy Encoding Unit] The entropy encoding unit 110 generates an encoded signal (encoded bit stream) based on the quantization coefficients input from the quantization unit 108. Specifically, the entropy encoding unit 110, for example, binarizes the quantization coefficients, arithmetically encodes the binary signal, and outputs a compressed bit stream or sequence.
[0101] [Inverse Quantization Unit] The inverse quantization unit 112 inverse-quantizes the quantization coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse-quantizes the quantization coefficients of the current block in a predetermined scanning order. Then, the inverse quantization unit 112 outputs the inverse-quantized transform coefficients of the current block to the inverse transform unit 114.
[0102] [Inverse Transform Unit] The inverse transform unit 114 restores the prediction error (residual) by inverse-transforming the transform coefficients input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 performs an inverse transform corresponding to the transform by the transform unit 106 on the transform coefficients to restore the prediction error of the current block. Then, the inverse transform unit 114 outputs the restored prediction error to the addition unit 116.
[0103] Note that since information is usually lost due to quantization, the restored prediction error does not match the prediction error calculated by the subtraction unit 104. That is, the restored prediction error usually includes a quantization error.
[0104] [Addition Unit] The addition unit 116 reconstructs the current block by adding the prediction error input from the inverse transformation unit 114 and the prediction sample input from the prediction control unit 128. Then, the addition unit 116 outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block may also be referred to as a local decoding block.
[0105] [Block Memory] The block memory 118 is, for example, a storage unit for storing blocks within the coded target picture (referred to as the current picture) that are referenced in intra prediction. Specifically, the block memory 118 stores the reconstructed block output from the addition unit 116.
[0106] [Frame Memory] The frame memory 122 is, for example, a storage unit for storing reference pictures used in inter prediction, and may also be referred to as a frame buffer. Specifically, the frame memory 122 stores the reconstructed block filtered by the loop filter unit 120.
[0107] [Loop Filter Unit] The loop filter unit 120 applies a loop filter to the block reconstructed by the addition unit 116 and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (in-loop filter) used within the coding loop, and includes, for example, a deblocking filter (DF or DBF), sample adaptive offset (SAO), and adaptive loop filter (ALF).
[0108] In the case of ALF, a least squares error filter for removing coding distortion is applied, and for example, for each 2x2 sub-block within the current block, one filter selected from a plurality of filters based on the direction and activity of the local gradient is applied.
[0109] Specifically, first, sub-blocks (e.g., 2x2 sub-blocks) are classified into a plurality of classes (e.g., 15 or 25 classes). The classification of sub-blocks is performed based on the direction and activity of gradients. For example, a classification value C (e.g., C = 5D + A) is calculated using a gradient direction value D (e.g., 0 to 2 or 0 to 4) and a gradient activity value A (e.g., 0 to 4). Then, based on the classification value C, the sub-blocks are classified into a plurality of classes.
[0110] The gradient direction value D is derived, for example, by comparing gradients in a plurality of directions (e.g., horizontal, vertical, and two diagonal directions). Also, the gradient activity value A is derived, for example, by adding gradients in a plurality of directions and quantizing the addition result.
[0111] Based on the results of such classification, a filter for the sub-blocks is determined from among a plurality of filters.
[0112] As the shape of the filter used in ALF, for example, a circularly symmetric shape is utilized. FIGS. 6A to 6C are diagrams showing a plurality of examples of the shape of the filter used in ALF. FIG. 6A shows a 5x5 diamond-shaped filter, FIG. 6B shows a 7x7 diamond-shaped filter, and FIG. 6C shows a 9x9 diamond-shaped filter. Information indicating the shape of the filter is usually signaled at the picture level. Note that the signaling of information indicating the shape of the filter is not necessarily limited to the picture level and may be at other levels (e.g., sequence level, slice level, tile level, CTU level, or CU level).
[0113] The on / off of ALF may be determined, for example, at the picture level or CU level. For example, for luminance, it may be determined whether to apply ALF at the CU level, and for color difference, it may be determined whether to apply ALF at the picture level. The information indicating the on / off of ALF is usually signaled at the picture level or CU level. Note that the signaling of the information indicating the on / off of ALF does not have to be limited to the picture level or CU level, and it may be at other levels (e.g., sequence level, slice level, tile level, or CTU level).
[0114] The coefficient sets of a plurality of selectable filters (e.g., filters up to 15 or 25) are usually signaled at the picture level. Note that the signaling of the coefficient sets does not have to be limited to the picture level, and it may be at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
[0115] [Loop Filter Section > Deblocking Filter] In the deblocking filter, the loop filter section 120 reduces the distortion generated at the block boundary by performing filter processing on the block boundary of the reconstructed image.
[0116] FIG. 7 is a block diagram showing an example of the detailed configuration of the loop filter section 120 that functions as a deblocking filter.
[0117] The loop filter section 120 includes a boundary determination section 1201, a filter determination section 1203, a filter processing section 1205, a processing determination section 1208, a filter characteristic determination section 1207, and switches 1202, 1204, and 1206.
[0118] The boundary determination section 1201 determines whether the pixel to be deblocking-filtered (i.e., the target pixel) exists near the block boundary. Then, the boundary determination section 1201 outputs the determination result to the switches 1202 and the processing determination section 1208.
[0119] When the boundary determination unit 1201 determines that the target pixel exists near the block boundary, the switch 1202 outputs the image before the filter process to the switch 1204. Conversely, when the boundary determination unit 1201 determines that the target pixel does not exist near the block boundary, the switch 1202 outputs the image before the filter process to the switch 1206.
[0120] The filter determination unit 1203 determines whether to perform deblocking filter processing on the target pixel based on the pixel values of at least one peripheral pixel around the target pixel. Then, the filter determination unit 1203 outputs the determination result to the switch 1204 and the process determination unit 1208.
[0121] When it is determined by the filter determination unit 1203 that deblocking filter processing is to be performed on the target pixel, the switch 1204 outputs the image before the filter process obtained via the switch 1202 to the filter processing unit 1205. Conversely, when it is determined by the filter determination unit 1203 that deblocking filter processing is not to be performed on the target pixel, the switch 1204 outputs the image before the filter process obtained via the switch 1202 to the switch 1206.
[0122] When the filter processing unit 1205 obtains the image before the filter process via the switches 1202 and 1204, it performs deblocking filter processing having the filter characteristics determined by the filter characteristic determination unit 1207 on the target pixel. Then, the filter processing unit 1205 outputs the pixel after the filter process to the switch 1206.
[0123] The switch 1206 selectively outputs the pixel that has not been subjected to deblocking filter processing and the pixel that has been subjected to deblocking filter processing by the filter processing unit 1205 in accordance with the control by the process determination unit 1208.
[0124] The processing determination unit 1208 controls the switch 1206 based on the respective determination results of the boundary determination unit 1201 and the filter determination unit 1203. That is, when the processing determination unit 1208 determines by the boundary determination unit 1201 that the target pixel exists near the block boundary and determines by the filter determination unit 1203 that the target pixel is to be subjected to deblocking filter processing, the processing determination unit 1208 causes the switch 1206 to output the pixel that has been subjected to deblocking filter processing. Further, in cases other than the above, the processing determination unit 1208 causes the switch 1206 to output the pixel that has not been subjected to deblocking filter processing. By repeatedly outputting such pixels, the image after the filter processing is output from the switch 1206.
[0125] FIG. 8 is a diagram showing an example of a deblocking filter having filter characteristics symmetric with respect to a block boundary.
[0126] In the deblocking filter processing, for example, using the pixel value and the quantization parameter, one of two deblocking filters having different characteristics, that is, a strong filter and a weak filter, is selected. In the strong filter, as shown in FIG. 8, when there are pixels p0 to p2 and pixels q0 to q2 sandwiching the block boundary, the respective pixel values of pixels q0 to q2 are changed to pixel values q'0 to q'2 by performing the operations shown in the following equations.
[0127] 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
[0128] Note that in the above equations, p0 to p2 and q0 to q2 are the respective pixel values of pixels p0 to p2 and pixels q0 to q2. Also, q3 is the pixel value of pixel q3 adjacent to pixel q2 on the side opposite to the block boundary. Further, in the right side of each of the above equations, the coefficient multiplied by the pixel value of each pixel used in the deblocking filter processing is the filter coefficient.
[0129] Furthermore, in the deblocking filter process, clip processing may be performed so that the pixel value after the operation does not change beyond the threshold value. In this clip processing, the pixel value after the operation by the above formula is clipped to "the pixel value before the operation ± 2 × threshold value" using the threshold value determined from the quantization parameter. This can prevent excessive smoothing.
[0130] FIG. 9 is a diagram for explaining a block boundary where deblocking filter processing is performed. FIG. 10 is a diagram showing an example of the Bs value.
[0131] The block boundary where deblocking filter processing is performed is, for example, the boundary of a PU (Prediction Unit) or TU (Transform Unit) of an 8×8 pixel block as shown in FIG. 9. The deblocking filter processing is performed in units of 4 rows or 4 columns. First, for blocks P and Q shown in FIG. 9, a Bs (Boundary Strength) value is determined as shown in FIG. 10.
[0132] According to the Bs value in FIG. 10, even for block boundaries belonging to the same image, it is determined whether to perform deblocking filter processing with different strengths. 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 more and a predetermined condition is satisfied. Note that the determination condition of the Bs value is not limited to that shown in FIG. 10 and may be determined based on other parameters.
[0133] [Prediction processing unit (intra prediction unit · inter prediction unit · prediction control unit)] FIG. 11 is a diagram showing an example of the processing performed by the prediction processing unit of the encoding apparatus 100. Note that the prediction processing unit includes all or some of the components of the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.
[0134] The prediction processing unit generates a predicted image of the current block (step Sb_1). This predicted image is also referred to as a prediction signal or a prediction block. Note that the prediction signal includes, for example, an intra prediction signal or an inter prediction signal. Specifically, the prediction processing unit generates a predicted image of the current block using the reconstructed image that has already been obtained by performing generation of a prediction block, generation of a difference block, generation of a coefficient block, restoration of the difference block, and generation of a decoded image block.
[0135] The reconstructed image may be, for example, an image of a reference picture, or may be an image of an encoded block in the current picture which is a picture including the current block. The encoded block in the current picture is, for example, an adjacent block of the current block.
[0136] FIG. 12 is a diagram showing another example of the processing performed by the prediction processing unit of the encoding apparatus 100.
[0137] The prediction processing unit generates a predicted image in a first method (step Sc_1a), generates a predicted image in a second method (step Sc_1b), and generates a predicted image in a third method (step Sc_1c). The first method, the second method, and the third method are different methods for generating a predicted image, and may be, for example, an inter prediction method, an intra prediction method, and other prediction methods, respectively. In these prediction methods, the above-described reconstructed image may be used.
[0138] Next, the prediction processing unit selects any one of the plurality of predicted images generated in steps Sc_1a, Sc_1b, and Sc_1c (step Sc_2). The selection of this predicted image, that is, the selection of the method or mode for obtaining the final predicted image, may be performed based on calculating the cost for each generated predicted image and based on that cost. Or, the selection of the predicted image may be performed based on the parameters used in the encoding process. The encoding device 100 may signal information for specifying the selected predicted image, method, or mode in an encoded signal (also referred to as an encoded bit stream). The information may be, for example, a flag. Thereby, the decoding device can generate a predicted image according to the method or mode selected in the encoding device 100 based on that information. Note that in the example shown in FIG. 12, the prediction processing unit selects any predicted image after generating predicted images by each method. However, the prediction processing unit may select a method or mode based on the parameters used in the above-described encoding process before generating those predicted images, and generate a predicted image according to the method or mode.
[0139] For example, the first method and the second method are intra prediction and inter prediction, respectively, and the prediction processing unit may select the final predicted image for the current block from the predicted images generated according to these prediction methods.
[0140] FIG. 13 is a diagram showing another example of the processing performed by the prediction processing unit of the encoding device 100.
[0141] First, the prediction processing 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 referred to as an intra predicted image, and the predicted image generated by inter prediction is also referred to as an inter predicted image.
[0142] Next, the prediction processing unit evaluates each of the intra-predicted image and the inter-predicted image (step Sd_2). A cost may be used for this evaluation. That is, the prediction processing unit calculates the cost C for each of the intra-predicted image and the inter-predicted image. This cost C is calculated by an equation of an R-D optimization model, for example, C = D + λ × R. In this equation, D is the encoding distortion of the predicted image, which is represented by, for example, the sum of absolute differences between the pixel values of the current block and the pixel values of the predicted image. Also, R is the amount of generated code of the predicted image, specifically, the amount of code required for encoding motion information or the like for generating the predicted image. Also, λ is, for example, the Lagrange undetermined multiplier.
[0143] Then, the prediction processing unit selects, as the final predicted image of the current block, the predicted image for which the smallest cost C has been calculated from the intra-predicted image and the inter-predicted image (step Sd_3). That is, a prediction method or mode for generating the predicted image of the current block is selected.
[0144] [Intra Prediction Unit] The intra prediction unit 124 generates a prediction signal (intra prediction signal) by performing intra prediction (also referred to as in-picture prediction) of the current block with reference to the block in the current picture stored in the block memory 118. Specifically, the intra prediction unit 124 generates an intra prediction signal by performing intra prediction with reference to samples (for example, luminance values, color difference values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 128.
[0145] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predefined intra prediction modes. The plurality of intra prediction modes usually include one or more non-directional prediction modes and a plurality of directional prediction modes.
[0146] The one or more non-directional prediction modes include, for example, the Planar prediction mode and the DC prediction mode defined in the H.265 / HEVC standard.
[0147] The plurality of directional prediction modes include, for example, the 33-direction prediction mode defined in the H.265 / HEVC standard. Note that the plurality of directional prediction modes may further include a 32-direction prediction mode (a total of 65 directional prediction modes) in addition to the 33 directions. FIG. 14 is a diagram showing all 67 intra prediction modes (2 non-directional prediction modes and 65 directional prediction modes) in intra prediction. The solid arrows represent the 33 directions defined in the H.265 / HEVC standard, and the dashed arrows represent the additional 32 directions. (The 2 non-directional prediction modes are not shown in FIG. 14.)
[0148] In various implementation examples, in the intra prediction of a chrominance block, a luminance block may be referenced. That is, based on the luminance component of the current block, the chrominance component of the current block may be predicted. Such intra prediction is sometimes called CCLM (cross-component linear model) prediction. An intra prediction mode of a chrominance block that references such a luminance block (for example, called the CCLM mode) may be added as one of the intra prediction modes of the chrominance block.
[0149] The intra prediction unit 124 may correct the pixel value after intra prediction based on the gradient of the reference pixels in the horizontal / vertical direction. Such intra prediction with such correction is sometimes called PDPC (position dependent intra prediction combination). Information indicating the presence or absence of application of PDPC (for example, called a PDPC flag) is usually signaled at the CU level. Note that the signaling of this information is not necessarily limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).
[0150] [Inter Prediction Unit] The inter prediction unit 126 generates a prediction signal (inter prediction signal) by performing inter prediction (also called inter-frame prediction) of a 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 a current block or a current sub-block (e.g., 4x4 block) within the current block. For example, the inter prediction unit 126 performs motion estimation within the reference picture for the current block or current sub-block, and finds the reference block or sub-block that most matches the current block or current sub-block. Then, the inter prediction unit 126 acquires motion information (e.g., a motion vector) for compensating 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, and generates an inter prediction signal for the current block or sub-block. The inter prediction unit 126 outputs the generated inter prediction signal to the prediction control unit 128.
[0151] The motion information used for motion compensation may be signaled as an inter prediction signal in various forms. For example, a motion vector may be signaled. As another example, the difference between a motion vector and a motion vector predictor may be signaled.
[0152] [Basic Flow of Inter Prediction] FIG. 15 is a flowchart showing the basic flow of inter prediction.
[0153] The inter prediction unit 126 first generates a prediction image (steps Se_1 to Se_3). Next, the subtraction unit 104 generates the difference between the current block and the prediction image as a prediction residual (step Se_4).
[0154] Here, in generating the predicted image, the inter prediction unit 126 generates the predicted image by performing determination of the motion vector (MV) of the current block (steps Se_1 and Se_2) and motion compensation (step Se_3). Also, in determining the MV, the inter prediction unit 126 determines the MV by performing selection of candidate motion vectors (candidate MVs) (step Se_1) and derivation of the MV (step Se_2). The selection of candidate MVs is performed, for example, by selecting at least one candidate MV from a candidate MV list. Also, in deriving the MV, the inter prediction unit 126 may determine the selected at least one candidate MV as the MV of the current block by further selecting at least one candidate MV from the at least one candidate MV. Alternatively, the inter prediction unit 126 may determine the MV of the current block by searching for the region of the reference picture indicated by the candidate MV for each of the selected at least one candidate MVs. Note that searching for the region of this reference picture may be referred to as motion estimation.
[0155] Also, in the above example, steps Se_1 to Se_3 are performed by the inter prediction unit 126, but processing such as step Se_1 or step Se_2 may be performed by other components included in the encoding device 100.
[0156] [Flow of Derivation of Motion Vector] FIG. 16 is a flowchart showing an example of motion vector derivation.
[0157] The inter prediction unit 126 derives the MV of the current block in a mode in which motion information (e.g., MV) is encoded. In this case, for example, the motion information is encoded as a prediction parameter and signaled. That is, the encoded motion information is included in the encoded signal (also referred to as an encoded bitstream).
[0158] Alternatively, the inter prediction unit 126 derives an MV in a mode in which motion information is not encoded. In this case, the motion information is not included in the encoded signal.
[0159] Here, the modes of MV derivation include a normal inter mode, a merge mode, a FRUC mode, an affine mode, etc., which will be described later. Among these modes, the modes in which motion information is encoded include a normal inter mode, a merge mode, and an affine mode (specifically, an affine inter mode and an affine merge mode). Note that the motion information may include not only the MV but also prediction motion vector selection information, which will be described later. Also, the modes in which motion information is not encoded include a 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.
[0160] FIG. 17 is a flowchart showing another example of motion vector derivation.
[0161] The inter prediction unit 126 derives the MV of the current block in a mode in which the differential MV is encoded. In this case, for example, the differential MV is encoded as a prediction parameter and signaled. That is, the encoded differential MV is included in the encoded signal. This differential MV is the difference between the MV of the current block and its predicted MV.
[0162] Alternatively, the inter prediction unit 126 derives an MV in a mode in which the differential MV is not encoded. In this case, the encoded differential MV is not included in the encoded signal.
[0163] Here, as described above, the modes for deriving the MV include the normal inter, merge mode, FRUC mode, and affine mode, etc., which will be described later. Among these modes, the modes for encoding the differential MV include the normal inter mode and the affine mode (specifically, the affine inter mode), etc. Also, the modes for not encoding the differential MV include the FRUC mode, the merge mode, and the affine mode (specifically, the affine merge mode), etc. 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.
[0164] [Flow of Deriving Motion Vector] FIG. 18 is a flowchart showing another example of motion vector derivation. There are multiple modes for the mode of MV derivation, that is, the inter prediction mode, which can be roughly divided into a mode for encoding the differential MV and a mode for not encoding the differential motion vector. The modes for not encoding the differential MV include the merge mode, the FRUC mode, and the affine mode (specifically, the affine merge mode). The details of these modes will be described later. Briefly, the merge mode is a mode for deriving the MV of the current block by selecting a motion vector from surrounding encoded blocks, and the FRUC mode is a mode for deriving the MV of the current block by performing a search between encoded regions. Also, the affine mode is a mode for deriving the motion vector of each of a plurality of sub-blocks constituting the current block as the MV of the current block assuming an affine transformation.
[0165] Specifically, when the inter-prediction mode information indicates 0 (0 in Sf_1), the inter-prediction unit 126 derives a motion vector by the merge mode (Sf_2). Further, when the inter-prediction mode information indicates 1 (1 in Sf_1), the inter-prediction unit 126 derives a motion vector by the FRUC mode (Sf_3). Further, when the inter-prediction mode information indicates 2 (2 in Sf_1), the inter-prediction unit 126 derives a motion vector by the affine mode (specifically, the affine merge mode) (Sf_4). Further, when the inter-prediction mode information indicates 3 (3 in Sf_1), the inter-prediction unit 126 derives a motion vector by a mode that encodes a differential MV (for example, the normal inter mode) (Sf_5).
[0166] [MV Derivation > Normal Inter Mode] The normal inter mode is an inter-prediction mode that derives the MV of the current block by finding a block similar to the image of the current block from the region of the reference picture indicated by the candidate MV. Also, in this normal inter mode, the differential MV is encoded.
[0167] FIG. 19 is a flowchart showing an example of inter-prediction by the normal inter mode.
[0168] First, the inter-prediction unit 126 obtains a plurality of candidate MVs for the current block based on information such as the MVs of a plurality of encoded blocks temporally or spatially around the current block (step Sg_1). That is, the inter-prediction unit 126 creates a candidate MV list.
[0169] Next, the inter-prediction unit 126 extracts each of N (N is an integer of 2 or more) candidate MVs from the plurality of candidate MVs obtained in step Sg_1 as a prediction motion vector candidate (also referred to as a prediction MV candidate) according to a predetermined priority order (step Sg_2). Note that the priority order is determined in advance for each of the N candidate MVs.
[0170] Next, the inter prediction unit 126 selects one candidate prediction motion vector from among the N candidate prediction motion vectors as the prediction motion vector (also referred to as the prediction MV) of the current block (step Sg_3). At this time, the inter prediction unit 126 encodes prediction motion vector selection information for identifying the selected prediction motion vector into the stream. Note that the stream is the encoded signal or encoded bit stream described above.
[0171] Next, the inter prediction unit 126 refers to the encoded reference picture and derives the MV of the current block (step Sg_4). At this time, the inter prediction unit 126 further encodes the difference value between the derived MV and the prediction motion vector as the differential MV into the stream. Note that the encoded reference picture is a picture composed of a plurality of blocks reconstructed after encoding.
[0172] 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 encoded reference picture (step Sg_5). Note that the predicted image is the inter prediction signal described above.
[0173] Also, information indicating the inter prediction mode (normal inter mode in the above example) used for generating the predicted image included in the encoded signal is encoded as, for example, prediction parameters.
[0174] Note that the candidate MV list may be used in common with lists used in other modes. Also, the processing related to the candidate MV list may be applied to the processing related to the lists used in other modes. The processing related to this candidate MV list is, for example, extraction or selection of candidate MVs from the candidate MV list, rearrangement of candidate MVs, or deletion of candidate MVs.
[0175] [MV Derivation > Merge Mode] The merge mode is an inter prediction mode that derives an MV by selecting a candidate MV from a candidate MV list as the MV of the current block.
[0176] FIG. 20 is a flowchart showing an example of inter prediction by the merge mode.
[0177] The inter prediction unit 126 first obtains a plurality of candidate MVs for the current block based on information such as the MVs of a plurality of encoded blocks temporally or spatially around the current block (step Sh_1). That is, the inter prediction unit 126 creates a candidate MV list.
[0178] Next, the inter prediction unit 126 derives the MV of the current block by selecting one candidate MV from the plurality of candidate MVs obtained in step Sh_1 (step Sh_2). At this time, the inter prediction unit 126 encodes the MV selection information for identifying the selected candidate MV into the stream.
[0179] 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 encoded reference picture (step Sh_3).
[0180] Also, information indicating the inter prediction mode (merge mode in the above example) used for generating the predicted image, which is included in the encoded signal, is encoded as, for example, prediction parameters.
[0181] FIG. 21 is a diagram for explaining an example of the motion vector derivation process of the current picture by the merge mode.
[0182] First, a prediction MV list in which candidates for the predicted MV are registered is generated. As candidates for the predicted MV, there are a spatial adjacent prediction MV which is the MV of a plurality of encoded blocks spatially adjacent to the target block, a temporal adjacent prediction MV which is the MV of a neighboring block obtained by projecting the position of the target block in the encoded reference picture, a combined prediction MV which is an MV generated by combining the MV values of the spatial adjacent prediction MV and the temporal adjacent prediction MV, and a zero prediction MV which is an MV with a value of zero, and the like.
[0183] Next, one predicted MV is selected from among the plurality of predicted MVs registered in the prediction MV list, and is determined as the MV of the target block.
[0184] Furthermore, in the variable length encoding unit, merge_idx, which is a signal indicating which predicted MV is selected, is described in the stream and encoded.
[0185] Note that the predicted MVs registered in the prediction MV list described in FIG. 21 are merely examples, and the number may be different from that in the figure, the configuration may not include some types of the predicted MVs in the figure, or the configuration may include predicted MVs other than the types of the predicted MVs in the figure.
[0186] The final MV may be determined by performing DMVR (dynamic motion vector refreshing) processing described later using the MV of the target block derived in the merge mode.
[0187] Note that the candidates for the predicted MV are the above-described candidate MVs, and the prediction MV list is the above-described candidate MV list. Also, the candidate MV list may be referred to as a candidate list. Also, merge_idx is MV selection information.
[0188] [MV Derivation > FRUC Mode] Motion information may be derived on the decoder side without being signaled from the encoder side. Note that, as described above, the merge mode defined in the H.265 / HEVC standard may be used. Also, for example, motion information may be derived by performing motion search on the decoder side. In this case, on the decoder side, motion search is performed without using the pixel values of the current block.
[0189] Here, a mode in which motion search is performed on the decoder side will be described. This mode in which motion search is performed on the decoder side may be referred to as the PMMVD (pattern matched motion vector derivation) mode or the FRUC (frame rate up-conversion) mode.
[0190] An example of FRUC processing is shown in FIG. 22. First, by referring to the motion vectors of the encoded blocks that are spatially or temporally adjacent to the current block, a list of a plurality of candidates each having a predicted motion vector (MV) (that is, a candidate MV list, which may be common to the merge list) is generated (step Si_1). Next, the best candidate MV is selected from among the plurality of 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, based on the motion vector of the selected candidate, a motion vector for the current block is derived (step Si_4). Specifically, for example, the motion vector of the selected candidate (the best candidate MV) is directly derived as the motion vector for the current block. Also, for example, in the peripheral region of the position in the reference picture corresponding to the motion vector of the selected candidate, a motion vector for the current block may be derived by performing pattern matching. That is, for the region around the best candidate MV, search using pattern matching and evaluation value in the reference picture is performed, and if there is an MV with a better evaluation value, the best candidate MV may be updated to the MV and used as the final MV of the current block. It is also possible to adopt a configuration in which the process of updating to an MV having a better evaluation value is not performed.
[0191] 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 encoded reference picture (step Si_5).
[0192] When processing is performed in units of sub-blocks, the same processing may be performed.
[0193] The evaluation value may be calculated by various methods. For example, the reconstructed image of the region in the reference picture corresponding to the motion vector is compared with the reconstructed image of a predetermined region (the region may be, for example, the region of another reference picture or the region of an adjacent block of the current picture as shown below). Then, the difference between the pixel values of the two reconstructed images may be calculated and used as the evaluation value of the motion vector. Note that, in addition to the difference value, other information may be used to calculate the evaluation value.
[0194] Next, pattern matching will be described in detail. First, one candidate MV included in the candidate MV list (for example, the merge list) is selected as the start point of the search by pattern matching. As the pattern matching, the first pattern matching or the second pattern matching is used. The first pattern matching and the second pattern matching may be called bilateral matching and template matching, respectively.
[0195] [MV Derivation > FRUC > Bilateral Matching] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures, which are two blocks along the motion trajectory of the current block. Therefore, in the first pattern matching, as the predetermined region for calculating the evaluation value of the above-described candidate, the region in another reference picture along the motion trajectory of the current block is used.
[0196] FIG. 23 is a diagram for explaining an example of first pattern matching (bilateral matching) between two blocks in two reference pictures along a motion trajectory. As shown in FIG. 23, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the most matching pair among pairs of two blocks in two different reference pictures (Ref0, Ref1) that are two blocks along the motion trajectory of the current block (Cur block). Specifically, for the current block, the difference between the reconstructed image at the specified position in the first encoded reference picture (Ref0) specified by the candidate MV and the reconstructed image at the specified position in the second encoded reference picture (Ref1) specified by the symmetric MV obtained by scaling the candidate MV by the display time interval is derived, and an evaluation value is calculated using the obtained difference value. It is preferable to select, as the final MV, the candidate MV having the best evaluation value among a plurality of candidate MVs.
[0197] Under the assumption of a continuous motion trajectory, the motion vectors (MV0, MV1) indicating the two reference blocks are proportional to the temporal distances (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, when the current picture is temporally located between the two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, in the first pattern matching, mirror-symmetric bidirectional motion vectors are derived.
[0198] [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., the upper and / or left adjacent block)) and a block in the reference picture. Therefore, in the second pattern matching, a block adjacent to the current block in the current picture is used as the predetermined region for calculating the evaluation value of the above-described candidate.
[0199] FIG. 24 is a diagram for explaining an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. As shown in FIG. 24, in the second pattern matching, the motion vector of the current block is derived by searching in the reference picture (Ref0) for the block that most closely matches the block adjacent to the current block (Cur block) in the current picture (Cur Pic). Specifically, for the current block, the difference between the reconstructed image of the encoded region of both or either of the left adjacent and upper adjacent blocks and the reconstructed image at the equivalent position in the encoded reference picture (Ref0) specified by the candidate MV is derived, an evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value among the plurality of candidate MVs is selected as the best candidate MV.
[0200] Information indicating whether or not to apply such a FRUC mode (for example, called a FRUC flag) may be signaled at the CU level. Also, when the FRUC mode is applied (for example, when the FRUC flag is true), information indicating the applicable pattern matching method (first pattern matching or second pattern matching) may be signaled at the CU level. Note that the signaling of this information does not have to be limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0201] [MV Derivation > Affine Mode] Next, the affine mode for deriving a motion vector in sub-block units based on the motion vectors of a plurality of adjacent blocks will be described. This mode is sometimes called an affine motion compensation prediction mode.
[0202] FIG. 25A is a diagram for explaining an example of deriving a motion vector for each sub-block based on motion vectors of a plurality of adjacent blocks. In FIG. 25A, a current block includes 16 4x4 sub-blocks. Here, based on the motion vectors of the adjacent blocks, the motion vector v0 of the upper left control point of the current block is derived. Similarly, based on the motion vectors of the adjacent sub-blocks, the motion vector v1 of the upper right control point of the current block is derived. Then, according to the following formula (1A), the two motion vectors v0 and v1 are projected to derive the motion vectors (v x , v y ) of each sub-block within the current block.
[0203] [Number]
[0204] Here, x and y respectively indicate the horizontal position and vertical position of the sub-block, and w indicates a predetermined weighting factor.
[0205] Information indicating such an affine mode (for example, called an affine flag) may be signaled at the CU level. Note that the signaling of the information indicating this affine mode does not have to be limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, CTU level or sub-block level).
[0206] Also, such an affine mode may include several modes in which the methods for deriving the motion vectors of the upper left and upper right control points are different. For example, the affine mode includes two modes: an affine inter (also called affine normal inter) mode and an affine merge mode.
[0207] [MV Derivation > Affine Mode] FIG. 25B is a diagram for explaining an example of deriving a motion vector of a sub-block unit in an affine mode having three control points. In FIG. 25B, a current block includes 16 4x4 sub-blocks. Here, a motion vector v0 of the upper left control point of the current block is derived based on the motion vectors of adjacent blocks. Similarly, a motion vector v1 of the upper right control point of the current block is derived based on the motion vectors of adjacent blocks, and a motion vector v2 of the lower left control point of the current block is derived based on the motion vectors of adjacent blocks. Then, the three motion vectors v0, v1, and v2 are projected by the following equation (1B) to derive the motion vectors (v x , v y ) of each sub-block within the current block.
[0208] [Equation]
[0209] Here, x and y indicate the horizontal position and the vertical position of the sub-block center, respectively, w indicates the width of the current block, and h indicates the height of the current block.
[0210] The affine modes with 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 be signaled at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0211] Also, such an affine mode having three control points may include several modes in which the methods for deriving the motion vectors of the upper left, upper right, and lower left control points are different. For example, the affine mode includes two modes: an affine inter (also referred to as affine normal inter) mode and an affine merge mode.
[0212] [MV Derivation > Affine Merge Mode] Figures 26A, 26B, and 26C are conceptual diagrams for explaining the affine merge mode.
[0213] In the affine merge mode, as shown in Figure 26A, for example, among the encoded blocks A (left), B (above), C (upper right), D (lower left), and E (upper left) adjacent to the current block, a plurality of predicted motion vectors of the control points of the current block are calculated based on the motion vectors corresponding to the blocks encoded in the affine mode. Specifically, these blocks are inspected in the order of the encoded blocks A (left), B (above), C (upper right), D (lower left), and E (upper left), and the first valid block encoded in the affine mode is identified. Based on the plurality of motion vectors corresponding to this identified block, the predicted motion vectors of the control points of the current block are calculated.
[0214] For example, as shown in Figure 26B, when the block A adjacent to the left of the current block is encoded in the affine mode having two control points, the motion vectors v3 and v4 projected onto the upper left corner and upper right corner positions of the encoded block including the block A are derived. Then, from the derived motion vectors v3 and v4, the predicted motion vector v0 of the control point at the upper left corner of the current block and the predicted motion vector v1 of the control point at the upper right corner are calculated.
[0215] For example, as shown in Figure 26C, when the block A adjacent to the left of the current block is encoded in the affine mode having three control points, the motion vectors v3, v4, and v5 projected onto the upper left corner, upper right corner, and lower left corner positions of the encoded block including the block A are derived. Then, from the derived motion vectors v3, v4, and v5, the predicted motion vector v0 of the control point at the upper left corner of the current block, the predicted motion vector v1 of the control point at the upper right corner, and the predicted motion vector v2 of the control point at the lower left corner are calculated.
[0216] Note that this predicted motion vector derivation method may also be used to derive each predicted motion vector of the control points of the current block in step Sj_1 of FIG. 29 described later.
[0217] FIG. 27 is a flowchart showing an example of the affine merge mode.
[0218] In the affine merge mode, first, the inter prediction unit 126 derives each predicted MV of the control points of the current block (step Sk_1). As shown in FIG. 25A, the control points are the upper left and upper right points of the current block, or as shown in FIG. 25B, the upper left, upper right, and lower left points of the current block.
[0219] That is, as shown in FIG. 26A, the inter prediction unit 126 inspects these blocks in the order of the encoded block A (left), block B (upper), block C (upper right), block D (lower left), and block E (upper left), and identifies the first valid block encoded in the affine mode.
[0220] When block A is identified and block A has two control points, as shown in FIG. 26B, the inter prediction unit 126 calculates the motion vector v0 of the control point at the upper left corner of the current block and the motion vector v1 of the control point at the upper right corner from the motion vectors v3 and v4 at the upper left and upper right corners of the encoded block including block A. For example, the inter prediction unit 126 projects the motion vectors v3 and v4 at the upper left and upper right corners of the encoded block onto the current block to calculate the predicted motion vector v0 of the control point at the upper left corner of the current block and the predicted motion vector v1 of the control point at the upper right corner.
[0221] Alternatively, when block A is identified and block A has three control points, as shown in FIG. 26C, the inter prediction unit 126 calculates the motion vectors v0, v1, and v2 of the control points at the upper left corner, upper right corner, and lower left corner of the current block from the motion vectors v3, v4, and v5 at the upper left corner, upper right corner, and lower left corner of the encoded block including block A. For example, the inter prediction unit 126 projects the motion vectors v3, v4, and v5 at the upper left corner, upper right corner, and lower left corner of the encoded block onto the current block to calculate the predicted motion vector v0 of the control point at the upper left corner of the current block, the predicted motion vector v1 of the control point at the upper right corner, and the motion vector v2 of the control point at the lower left corner.
[0222] Next, the inter prediction unit 126 performs motion compensation for each of the plurality of sub-blocks included in the current block. That is, the inter prediction unit 126 calculates the motion vector of each of the plurality of sub-blocks as an affine MV using two predicted motion vectors v0 and v1 and the above-described formula (1A), or three predicted motion vectors v0, v1, and v2 and the above-described formula (1B) (step Sk_2). Then, the inter prediction unit 126 performs motion compensation for the sub-block using those affine MVs and the encoded reference picture (step Sk_3). As a result, motion compensation is performed on the current block, and a predicted image of the current block is generated.
[0223] [MV Derivation > Affine Inter Mode] FIG. 28A is a diagram for explaining the affine inter mode having two control points.
[0224] In this affine inter mode, as shown in FIG. 28A, a motion vector selected from the motion vectors of the encoded blocks A, B, and C adjacent to the current block is used as the predicted motion vector v0 of the control point at the upper left corner of the current block. Similarly, a motion vector selected from the motion vectors of the encoded blocks D and E adjacent to the current block is used as the predicted motion vector v1 of the control point at the upper right corner of the current block.
[0225] FIG. 28B is a diagram for explaining the affine inter mode having three control points.
[0226] In this affine inter mode, as shown in FIG. 28B, a motion vector selected from the motion vectors of the encoded blocks A, B, and C adjacent to the current block is used as the predicted motion vector v0 of the control point at the upper left corner of the current block. Similarly, a motion vector selected from the motion vectors of the encoded blocks D and E adjacent to the current block is used as the predicted motion vector v1 of the control point at the upper right corner of the current block. Further, a motion vector selected from the motion vectors of the encoded blocks F and G adjacent to the current block is used as the predicted motion vector v2 of the control point at the lower left corner of the current block.
[0227] FIG. 29 is a flowchart showing an example of the affine inter mode.
[0228] In the affine inter mode, first, the inter prediction unit 126 derives the predicted MV (v0, v1) or (v0, v1, v2) of each of the two or three control points of the current block (step Sj_1). The control points are the points at the upper left corner, upper right corner, or lower left corner of the current block, as shown in FIG. 25A or FIG. 25B.
[0229] That is, the inter prediction unit 126 derives the predicted motion vectors (v0, v1) or (v0, v1, v2) of the control points of the current block by selecting the motion vector of any one of the encoded blocks near each control point of the current block shown in FIG. 28A or FIG. 28B. At this time, the inter prediction unit 126 encodes the prediction motion vector selection information for identifying the two selected motion vectors into the stream.
[0230] For example, the inter prediction unit 126 determines which block's motion vector to select as the predicted motion vector of the control point from the encoded blocks adjacent to the current block using cost evaluation or the like, and may describe a flag indicating which predicted motion vector is selected in the bit stream.
[0231] Next, the inter prediction unit 126 performs motion search (steps Sj_3 and Sj_4) while updating the predicted motion vectors selected or derived in step Sj_1 (step Sj_2). That is, the inter prediction unit 126 calculates the motion vectors of the respective sub-blocks corresponding to the updated predicted motion vectors as affine MVs using the above-described formula (1A) or formula (1B) (step Sj_3). Then, the inter prediction unit 126 performs motion compensation on each sub-block using those affine MVs and the encoded reference picture (step Sj_4). As a result, the inter prediction unit 126 determines, in the motion search loop, for example, the predicted motion vector that obtains the smallest cost as the motion vector 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 each predicted motion vector as a differential MV into the stream.
[0232] Finally, the inter prediction unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the determined MV and the encoded reference picture (step Sj_6).
[0233] [MV Derivation > Affine Inter Mode] When signaling by switching affine modes with different numbers of control points (e.g., two and three) at the CU level, the number of control points may be different between the coded block and the current block. FIGS. 30A and 30B are conceptual diagrams for explaining a method of deriving a prediction vector of control points when the number of control points is different between the coded block and the current block.
[0234] For example, as shown in FIG. 30A, when the current block has three control points at the upper left corner, upper right corner, and lower left corner, and the block A adjacent to the left of the current block is coded in an affine mode with two control points, motion vectors v3 and v4 projected onto the upper left corner and upper right corner positions of the coded block including block A are derived. Then, from the derived motion vectors v3 and v4, a predicted motion vector v0 of the control point at the upper left corner of the current block and a predicted motion vector v1 of the control point at the upper right corner are calculated. Further, from the derived motion vectors v0 and v1, a predicted motion vector v2 of the control point at the lower left corner is calculated.
[0235] For example, as shown in FIG. 30B, when the current block has two control points at the upper left corner and upper right corner, and the block A adjacent to the left of the current block is coded in an affine mode with three control points, motion vectors v3, v4, and v5 projected onto the upper left corner, upper right corner, and lower left corner positions of the coded block including block A are derived. Then, from the derived motion vectors v3, v4, and v5, a predicted motion vector v0 of the control point at the upper left corner of the current block and a predicted motion vector v1 of the control point at the upper right corner are calculated.
[0236] This prediction motion vector derivation method may be used to derive each prediction motion vector of the control points of the current block in step Sj_1 of FIG. 29.
[0237] [MV Derivation > DMVR] FIG. 31A is a diagram showing the relationship between the merge mode and DMVR.
[0238] The inter prediction unit 126 derives the motion vector of the current block in the merge mode (step Sl_1). Next, the inter prediction unit 126 determines whether to perform motion vector search, that is, 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 motion vector derived in step Sl_1 as the final motion vector for the current block (step Sl_4). That is, in this case, the motion vector of the current block is determined in the merge mode.
[0239] On the other hand, if it is determined to perform motion search in step Sl_1 (Yes in step Sl_2), the inter prediction unit 126 derives the final motion vector for the current block by searching the peripheral area of the reference picture indicated by the motion vector derived in step Sl_1 (step Sl_3). That is, in this case, the motion vector of the current block is determined by DMVR.
[0240] FIG. 31B is a conceptual diagram for explaining an example of the DMVR process for determining the MV.
[0241] First, the optimal MVP set for the current block (for example, in the merge mode) is used as the candidate MV. Then, according to the candidate MV (L0), reference pixels are specified from the first reference picture (L0) which is the encoded picture in the L0 direction. Similarly, according to the candidate MV (L1), reference pixels are specified from the second reference picture (L1) which is the encoded picture in the L1 direction. A template is generated by taking the average of these reference pixels.
[0242] Next, using the template, search the peripheral regions of the candidate MVs of the first reference picture (L0) and the second reference picture (L1), respectively, and determine the MV with the minimum cost as the final MV. Note that the cost value may be calculated using, for example, the difference value between each pixel value of the template and each pixel value of the search region, and the candidate MV value, etc.
[0243] Note that the configurations and operations of the processes described here are basically common to the encoding device and the decoding device described later.
[0244] Any process may be used as long as it can derive the final MV by searching the periphery of the candidate MV, not necessarily the process itself described here.
[0245] [Motion Compensation > BIO / OBMC] In motion compensation, there are modes for generating a predicted image and correcting the predicted image. Those modes are, for example, BIO and OBMC described later.
[0246] FIG. 32 is a flowchart showing an example of generating a predicted image.
[0247] The inter prediction unit 126 generates a predicted image (step Sm_1) and corrects the predicted image by any of the above-described modes (step Sm_2).
[0248] FIG. 33 is a flowchart showing another example of generating a predicted image.
[0249] The inter prediction unit 126 determines the motion vector of the current block (step Sn_1). Next, the inter prediction unit 126 generates a predicted image (step Sn_2) and determines whether to perform correction processing (step Sn_3). Here, when the inter prediction unit 126 determines to perform correction processing (Yes in step Sn_3), it generates a final predicted image by correcting the predicted image (step Sn_4). On the other hand, when the inter prediction unit 126 determines not to perform correction processing (No in step Sn_3), it outputs the predicted image as the final predicted image without correction (step Sn_5).
[0250] Also, in motion compensation, there is a mode in which the luminance is corrected when generating a predicted image. That mode is, for example, LIC described later.
[0251] FIG. 34 is a flowchart showing still another example of generating a predicted image.
[0252] The inter prediction unit 126 derives the motion vector of the current block (step So_1). Next, the inter prediction unit 126 determines whether to perform luminance correction processing (step So_2). Here, when the inter prediction unit 126 determines to perform luminance correction processing (Yes in step So_2), it generates a predicted image while performing luminance correction (step So_3). That is, the predicted image is generated by LIC. On the other hand, when the inter prediction unit 126 determines not to perform luminance correction processing (No in step So_2), it generates a predicted image by normal motion compensation without performing luminance correction (step So_4).
[0253] [Motion Compensation > OBMC] Not only the motion information of the current block obtained by motion search but also the motion information of adjacent blocks may be used to generate an inter prediction signal. Specifically, an inter prediction signal may be generated for each sub-block within the current block by weighted addition of a prediction signal based on the motion information obtained by motion search (within the reference picture) and a prediction signal based on the motion information of adjacent blocks (within the current picture). Such inter prediction (motion compensation) is sometimes called OBMC (overlapped block motion compensation).
[0254] In the OBMC mode, information indicating the size of sub-blocks for OBMC (for example, called OBMC block size) may be signaled at the sequence level. Further, information indicating whether or not to apply the OBMC mode (for example, called OBMC flag) may be signaled at the CU level. Note that the signaling levels of these pieces of information do not need to be limited to the sequence level and the CU level, and may be other levels (for example, picture level, slice level, tile level, CTU level, or sub-block level).
[0255] The OBMC mode will be described more specifically. FIGS. 35 and 36 are a flowchart and a conceptual diagram for explaining the outline of the prediction image correction process by OBMC processing.
[0256] First, as shown in FIG. 36, a prediction image (Pred) by normal motion compensation is obtained using the motion vector (MV) assigned to the processing target (current) block. In FIG. 36, the arrow “MV” points to the reference picture, indicating what the current block of the current picture refers to in order to obtain the prediction image.
[0257] Next, the motion vector (MV_L) already derived for the encoded left adjacent block is applied (reused) to the block to be encoded to obtain a predicted image (Pred_L). The motion vector (MV_L) is indicated by an arrow "MV_L" pointing from the current block to the reference picture. Then, the first correction of the predicted image is performed by superimposing the two predicted images Pred and Pred_L. This has the effect of blending the boundaries between adjacent blocks.
[0258] Similarly, the motion vector (MV_U) already derived for the encoded upper adjacent block is applied (reused) to the block to be encoded to obtain a predicted image (Pred_U). The motion vector (MV_U) is indicated by an arrow "MV_U" pointing from the current block to the reference picture. Then, the second correction of the predicted image is performed by superimposing the predicted image Pred_U on the predicted image (e.g., Pred and Pred_L) that has undergone the first correction. 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 mixed (smoothed) with adjacent blocks.
[0259] Note that the above example is a two-pass correction method using left and upper adjacent blocks, but the correction method may also be a three-pass or more pass correction method using right and / or lower adjacent blocks.
[0260] Note that the area for superimposition may be only a partial area near the block boundary, rather than the pixel area of the entire block.
[0261] Here, the OBMC prediction image correction process for obtaining one prediction image Pred by superimposing additional prediction images Pred_L and Pred_U from one reference picture has been described. However, when the prediction image is corrected based on a plurality of reference images, the same process may be applied to each of the plurality of reference pictures. In such a case, by performing OBMC image correction based on a plurality of reference pictures, after obtaining the corrected prediction images from each reference picture, the final prediction image is obtained by further superimposing the plurality of obtained corrected prediction images.
[0262] Note that in OBMC, the unit of the target block may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.
[0263] As a method for determining whether to apply OBMC processing, for example, there is a method using obmc_flag, which is a signal indicating whether to apply OBMC processing. As a specific example, the encoding device may determine whether the target block belongs to a region with complex motion. When the target block belongs to a region with complex motion, the encoding device sets the value 1 as obmc_flag and applies OBMC processing for encoding. When the target block does not belong to a region with complex motion, the encoding device sets the value 0 as obmc_flag and performs block encoding without applying OBMC processing. On the other hand, the decoding device decodes the obmc_flag described in the stream (for example, the compressed sequence) and switches whether to apply OBMC processing according to the value for decoding.
[0264] In the above example, the inter prediction unit 126 generates one rectangular prediction image for the rectangular current block. However, the inter prediction unit 126 may generate a plurality of prediction images with shapes different from the rectangle for the rectangular current block, and generate the final rectangular prediction image by combining the plurality of prediction images. The shape different from the rectangle may be, for example, a triangle.
[0265] FIG. 37 is a diagram for explaining the generation of two predicted images of a triangle.
[0266] The inter prediction unit 126 generates a predicted image of the triangle by performing motion compensation on the first partition of the triangle in the current block using the first MV of the first partition. Similarly, the inter prediction unit 126 generates a predicted image of the triangle by performing motion compensation on the second partition of the triangle in the current block using the second MV of the second partition. Then, the inter prediction unit 126 generates a predicted image of a rectangle identical to the current block by combining these predicted images.
[0267] Note that in the example shown in FIG. 37, the first partition and the second partition are each a triangle, but they may be trapezoids or may have different shapes from each other. Further, in the example shown in FIG. 37, the current block is composed of two partitions, but it may be composed of three or more partitions.
[0268] Also, the first partition and the second partition may overlap. That is, the first partition and the second partition may include the same pixel region. In this case, a predicted image of the current block may be generated using the predicted image in the first partition and the predicted image in the second partition.
[0269] Also, in this example, an example in which predicted images are generated by inter prediction for both of the two partitions is shown, but predicted images may be generated by intra prediction for at least one partition.
[0270] [Motion Compensation > BIO] Next, a method for deriving a motion vector will be described. First, a mode for deriving a motion vector based on a model assuming uniform linear motion will be described. This mode is sometimes called the BIO (bi - directional optical flow) mode.
[0271] FIG. 38 is a diagram for explaining a model assuming a uniform linear motion. In FIG. 38, (vx, vy) indicates a velocity vector, and τ0 and τ1 respectively indicate the temporal distances between the current picture (Cur Pic) and two reference pictures (Ref0, Ref1). (MVx0, MVy0) indicates a motion vector corresponding to the reference picture Ref0, and (MVx1, MVy1) indicates a motion vector corresponding to the reference picture Ref1.
[0272] At this time, under the assumption of the uniform linear motion of the velocity vector (vx, vy), (MVx0, MVy0) and (MVx1, MVy1) are respectively expressed as (vxτ0, vyτ0) and (-vxτ1, -vyτ1), and the following optical flow equation (2) holds.
[0273]
Equation
[0274] Here, I(k) indicates the luminance value of the reference image k (k = 0, 1) after motion compensation. This optical flow equation indicates that the sum of (i) the temporal derivative of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference image, and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference image is equal to zero. Based on the combination of this optical flow equation and Hermite interpolation, the motion vector in block units obtained from a merge list or the like may be corrected in pixel units.
[0275] Note that the motion vector may be derived on the decoder side by a method different from the derivation of the motion vector based on the model assuming a uniform linear motion. For example, the motion vector may be derived in sub-block units based on the motion vectors of a plurality of adjacent blocks.
[0276] [Motion Compensation > LIC] Next, an example of a mode for generating a predicted image (prediction) using LIC (local illumination compensation) processing will be described.
[0277] FIG. 39 is a diagram for explaining an example of a method for generating a predicted image using luminance correction processing by LIC processing.
[0278] First, an MV is derived from the encoded reference picture to obtain a reference image corresponding to the current block.
[0279] Next, for the current block, information indicating how the luminance value changes between the reference picture and the current picture is extracted. This extraction is performed based on the luminance pixel values in the encoded left adjacent reference area (peripheral reference area) and the encoded 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, a luminance correction parameter is calculated using the information indicating how the luminance value changes.
[0280] A predicted image for the current block is generated by performing a luminance correction process of applying the luminance correction parameter to the reference image in the reference picture specified by the MV.
[0281] Note that the shape of the peripheral reference area in FIG. 39 is an example, and other shapes may be used.
[0282] Also, 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 a plurality of reference pictures. The luminance correction process may be performed on the reference images obtained from each reference picture in the same manner as described above, and then the predicted image may be generated.
[0283] As a method for determining whether to apply LIC processing, for example, there is a method of using lic_flag, which is a signal indicating whether to apply LIC processing. As a specific example, in an encoding device, it is determined whether the current block belongs to an area where a luminance change has occurred. If it belongs to an area where a luminance change has occurred, a value 1 is set as lic_flag and LIC processing is applied for encoding. If it does not belong to an area where a luminance change has occurred, a value 0 is set as lic_flag and encoding is performed without applying LIC processing. On the other hand, in a decoding device, by decoding the lic_flag described in the stream, decoding may be performed by switching whether to apply LIC processing according to the value thereof.
[0284] As another method for determining whether to apply LIC processing, for example, there is also a method of determining according to whether LIC processing has been applied to neighboring blocks. As a specific example, when the current block is in merge mode, it is determined whether the neighboring encoded blocks selected when deriving the MV in the merge mode processing have been encoded with LIC processing applied. Encoding is performed by switching whether to apply LIC processing according to the result. Note that also in this example, the same processing is applied to the processing on the decoder side.
[0285] Although the LIC processing (luminance correction processing) has been described with reference to FIG. 39, the details will be described below.
[0286] First, the inter prediction unit 126 derives a motion vector for obtaining a reference image corresponding to the block to be encoded from the reference picture, which is an encoded picture.
[0287] Next, the inter prediction unit 126 extracts information indicating how the luminance values change between the reference picture and the picture to be coded for the block to be coded, using the luminance pixel values in the left and upper adjacent coded peripheral reference regions and the luminance pixel values at the equivalent positions in the reference picture specified by the motion vectors, and calculates the luminance correction parameters. For example, let the luminance pixel value of a certain pixel in the peripheral reference region within the picture to be coded be p0, and the luminance pixel value of the pixel in the peripheral reference region within the reference picture at the equivalent position to this pixel be p1. The inter prediction unit 126 calculates, as the luminance correction parameters, the coefficients A and B that optimize A×p1 + B = p0 for a plurality of pixels in the peripheral reference region.
[0288] Next, the inter prediction unit 126 generates a prediction picture for the block to be coded by performing luminance correction processing on the reference picture in the reference picture specified by the motion vector using the luminance correction parameters. For example, let the luminance pixel value in the reference picture be p2, and the luminance pixel value of the prediction picture after the luminance correction processing be p3. The inter prediction unit 126 generates the prediction picture after the luminance correction processing by calculating A×p2 + B = p3 for each pixel in the reference picture.
[0289] Note that the shape of the peripheral reference region in FIG. 39 is an example, and other shapes may be used. Also, a part of the peripheral reference region shown in FIG. 39 may be used. For example, a region including a predetermined number of pixels decimated from each of the upper adjacent pixel and the left adjacent pixel may be used as the peripheral reference region. Also, the peripheral reference region is not limited to the region adjacent to the block to be coded, and may be a region not adjacent to the block to be coded. Also, in the example shown in FIG. 39, the peripheral reference region in the reference picture is the region specified by the motion vector of the picture to be coded from the peripheral reference region in the picture to be coded, but may be the region specified by another motion vector. For example, the other motion vector may be the motion vector of the peripheral reference region in the picture to be coded.
[0290] Note that here, the operations in the coding device 100 have been described, but the operations in the decoding device 200 are the same.
[0291] Note that the LIC process may be applied not only to luminance but also to color difference. At this time, correction parameters may be derived individually for each of Y, Cb, and Cr, or a common correction parameter may be used for any of them.
[0292] Also, the LIC process may be applied in sub-block units. For example, correction parameters may be derived using the peripheral reference region of the current sub-block and the peripheral reference region of the reference sub-block in the reference picture specified by the MV of the current sub-block.
[0293] [Prediction control unit] The prediction control unit 128 selects either an intra prediction signal (a signal output from the intra prediction unit 124) or an inter prediction signal (a signal output from the inter prediction unit 126), and outputs the selected signal as a prediction signal to the subtraction unit 104 and the addition unit 116.
[0294] As shown in FIG. 1, in various implementation examples, the prediction control unit 128 may output prediction parameters input to the entropy encoding unit 110. The entropy encoding unit 110 may generate an encoded bit stream (or sequence) based on the prediction parameters input from the prediction control unit 128 and the quantization coefficients input from the quantization unit 108. The prediction parameters may be used by a decoding device. The decoding device may receive and decode the encoded bit stream, and perform the same processing as the prediction processing performed in the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128. The prediction parameters may include a selected prediction signal (e.g., a motion vector, a prediction type, or a prediction mode used in 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 in the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.
[0295] [Implementation example of encoding device] FIG. 40 is a block diagram showing an implementation example of the encoding device 100. The encoding device 100 includes a processor a1 and a memory a2. For example, a plurality of components of the encoding device 100 shown in FIG. 1 are implemented by the processor a1 and the memory a2 shown in FIG. 40.
[0296] The processor a1 is a circuit that performs information processing and is a circuit that can access the memory a2. For example, the processor a1 is a dedicated or general-purpose electronic circuit that encodes a moving image. The processor a1 may be a processor such as a CPU. Also, the processor a1 may be an aggregate of a plurality of electronic circuits. Further, for example, the processor a1 may play the roles of a plurality of components of the encoding device 100 shown in FIG. 1, etc., excluding the components for storing information.
[0297] The memory a2 is a dedicated or general-purpose memory in which information for the processor a1 to encode a moving image is stored. The memory a2 may be an electronic circuit and may be connected to the processor a1. Also, the memory a2 may be included in the processor a1. Further, the memory a2 may be an aggregate of a plurality of electronic circuits. Also, the memory a2 may be a magnetic disk or an optical disk, etc., or may be expressed as a storage or a recording medium, etc. Also, the memory a2 may be a non-volatile memory or a volatile memory.
[0298] For example, the memory a2 may store the moving image to be encoded, or may store the bit sequence corresponding to the encoded moving image. Also, the memory a2 may store a program for the processor a1 to encode a moving image.
[0299] Also, for example, the memory a2 may serve as a component for storing information among a plurality of components of the encoding device 100 shown in FIG. 1 and the like. Specifically, the memory a2 may serve as the block memory 118 and the frame memory 122 shown in FIG. 1. More specifically, the memory a2 may store the reconstructed blocks, the reconstructed pictures, and the like.
[0300] Note that in the encoding device 100, not all of the plurality of components shown in FIG. 1 and the like need to be implemented, and not all of the plurality of processes described above need to be performed. A part of the plurality of components shown in FIG. 1 and the like may be included in another device, and a part of the plurality of processes described above may be executed by another device.
[0301] [Decoder] Next, a decoder capable of decoding the encoded signal (encoded bitstream) output from the above encoding device 100 will be described. FIG. 41 is a block diagram showing the functional configuration of the decoder 200 according to the present embodiment. The decoder 200 is a moving image decoder that decodes moving images in block units.
[0302] As shown in FIG. 41, the decoder 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.
[0303] The decoding device 200 is realized by, for example, a general-purpose processor and a memory. In this case, when the software program stored in the memory is executed by the processor, the processor functions as an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a loop filter unit 212, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220. Further, the decoding device 200 may be realized as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0304] After explaining the overall processing flow of the decoding device 200 below, each component included in the decoding device 200 will be described.
[0305] [Overall Flow of Decoding Process] FIG. 42 is a flowchart showing an example of the overall decoding process by the decoding device 200.
[0306] First, the entropy decoding unit 202 of the decoding device 200 specifies the division pattern of a block of a fixed size (128×128 pixels) (step Sp_1). This division pattern is the division pattern selected by the encoding device 100. Then, the decoding device 200 performs the processing of steps Sp_2 to Sp_6 for each of the plurality of blocks constituting the division pattern.
[0307] That is, the entropy decoding unit 202 decodes (specifically, entropy decodes) the encoded quantization coefficients and prediction parameters of the block to be decoded (also referred to as the current block) (step Sp_2).
[0308] Next, the inverse quantization unit 204 and the inverse transformation unit 206 restore a plurality of prediction residuals (that is, difference blocks) by performing inverse quantization and inverse transformation on the plurality of quantization coefficients (step Sp_3).
[0309] Next, a prediction processing unit composed of all or part of the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220 generates a prediction signal (also referred to as a prediction block) for the current block (step Sp_4).
[0310] Next, the addition unit 208 reconstructs the current block into a reconstructed image (also referred to as a decoded image block) by adding the prediction block to the difference block (step Sp_5).
[0311] When this reconstructed image is generated, the loop filter unit 212 performs filtering on the reconstructed image (step Sp_6).
[0312] Then, the decoding device 200 determines whether the decoding of the entire picture is completed (step Sp_7). If it is determined that the decoding is not completed (No in step Sp_7), the processing from step Sp_1 is repeatedly executed.
[0313] Note that the processing of these steps Sp_1 to Sp_7 may be sequentially performed by the decoding device 200, or a plurality of parts of these processes may be performed in parallel, or the order may be changed.
[0314] [Entropy Decoding Unit] The entropy decoding unit 202 entropy-decodes the encoded bit stream. Specifically, the entropy decoding unit 202, for example, arithmetically decodes the encoded bit stream into a binary signal. Then, the entropy decoding unit 202 de-binarizes the binary signal. The entropy decoding unit 202 outputs quantization coefficients to the inverse quantization unit 204 in block units. The entropy decoding unit 202 may output prediction parameters included in the encoded bit 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 execute the same prediction processing as that performed by the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128 on the encoding device side.
[0315] [Inverse Quantization Unit] The inverse quantization unit 204 inverse-quantizes the quantization coefficients of the decoding target block (hereinafter referred to as the current block), which is the input from the entropy decoding unit 202. Specifically, for each of the quantization coefficients of the current block, the inverse quantization unit 204 inverse-quantizes the quantization coefficient based on the quantization parameter corresponding to the quantization coefficient. Then, the inverse quantization unit 204 outputs the inverse-quantized quantization coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.
[0316] [Inverse Transform Unit] The inverse transform unit 206 restores the prediction error by inverse-transforming the transform coefficients, which are the input from the inverse quantization unit 204.
[0317] For example, when the information decoded from the encoded bit 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 information indicating the decoded transform type.
[0318] Also, for example, when the information decoded from the encoded bit stream indicates that NSST is to be applied, the inverse transform unit 206 applies an inverse reverse transform to the transform coefficients.
[0319] [Addition unit] The addition unit 208 reconstructs the current block by adding the prediction error, which is the input from the inverse conversion unit 206, and the prediction sample, which is the input from the prediction control unit 220. Then, the addition unit 208 outputs the reconstructed block to the block memory 210 and the loop filter unit 212.
[0320] [Block memory] The block memory 210 is a storage unit for storing blocks within the decoded target picture (hereinafter referred to as the current picture), which are blocks referred to in intra prediction. Specifically, the block memory 210 stores the reconstructed block output from the addition unit 208.
[0321] [Loop filter unit] The loop filter unit 212 applies a loop filter to the block reconstructed by the addition unit 208 and outputs the filtered reconstructed block to the frame memory 214 and a display device, etc.
[0322] When the information indicating the on / off of the ALF read from the encoded bitstream indicates that the ALF is on, one filter is selected from a plurality of filters based on the local gradient direction and activity, and the selected filter is applied to the reconstructed block.
[0323] [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 block filtered by the loop filter unit 212.
[0324] [Prediction processing unit (intra prediction unit, inter prediction unit, prediction control unit)] FIG. 43 is a diagram showing an example of the processing performed by the prediction processing unit of the decoding apparatus 200. Note that the prediction processing unit includes all or some of the components of the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0325] The prediction processing unit generates a predicted image of the current block (step Sq_1). This predicted image is also referred to as a prediction signal or a prediction block. Note that the prediction signal includes, for example, an intra prediction signal or an inter prediction signal. Specifically, the prediction processing unit generates a predicted image of the current block using the reconstructed image that has already been obtained by performing generation of a prediction block, generation of a difference block, generation of a coefficient block, restoration of the difference block, and generation of a decoded image block.
[0326] The reconstructed image may be, for example, an image of a reference picture, or may be an image of a decoded block in the current picture that is a picture including the current block. The decoded block in the current picture is, for example, an adjacent block of the current block.
[0327] FIG. 44 is a diagram showing another example of the processing performed by the prediction processing unit of the decoding apparatus 200.
[0328] The prediction processing unit determines a method or mode for generating a predicted image (step Sr_1). For example, this method or mode may be determined based on, for example, prediction parameters.
[0329] When the prediction processing unit determines the first method as the mode for generating the predicted image, the prediction processing unit generates the predicted image according to the first method (step Sr_2a). When the prediction processing unit determines the second method as the mode for generating the predicted image, the prediction processing unit generates the predicted image according to the second method (step Sr_2b). When the prediction processing unit determines the third method as the mode for generating the predicted image, the prediction processing unit generates the predicted image according to the third method (step Sr_2c).
[0330] The first method, the second method, and the third method are different methods for generating a predicted image, and may be, for example, an inter prediction method, an intra prediction method, and other prediction methods, respectively. In these prediction methods, the above-described reconstructed image may be used.
[0331] [Intra Prediction Unit] The intra prediction unit 216 generates a prediction signal (intra prediction signal) by performing intra prediction with reference to a block in the current picture stored in the block memory 210 based on the intra prediction mode decoded from the encoded bitstream. Specifically, the intra prediction unit 216 generates an intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance difference values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 220.
[0332] Note that when an intra prediction mode that refers to a luminance block in the 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.
[0333] Also, when the information decoded from the encoded bitstream indicates the application of PDPC, the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradient of the reference pixels in the horizontal / vertical direction.
[0334] [Inter Prediction Unit] The inter prediction unit 218 predicts the current block with reference to the reference picture stored in the frame memory 214. The prediction is performed in units of the current block or sub-blocks (e.g., 4x4 blocks) within the current block. For example, the inter prediction unit 218 generates an inter prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., motion vector) decoded from the encoded bitstream (e.g., prediction parameters output from the entropy decoding unit 202), and outputs the inter prediction signal to the prediction control unit 220.
[0335] When the information decoded from the coded bit stream indicates that the OBMC mode is to be applied, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion search but also the motion information of adjacent blocks.
[0336] Also, when the information decoded from the coded bit 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) decoded from the coded stream. Then, the inter prediction unit 218 performs motion compensation (prediction) using the derived motion information.
[0337] Also, when the BIO mode is applied, the inter prediction unit 218 derives a motion vector based on a model assuming uniform linear motion. Also, when the information decoded from the coded bit stream indicates that the affine motion compensation prediction mode is to be applied, the inter prediction unit 218 derives a motion vector in sub-block units based on the motion vectors of a plurality of adjacent blocks.
[0338] [MV Derivation > Normal Inter Mode] When the information decoded from the coded bit stream indicates that the normal inter mode is to be applied, the inter prediction unit 218 derives an MV based on the information decoded from the coded stream, and performs motion compensation (prediction) using the MV.
[0339] FIG. 45 is a flowchart showing an example of inter prediction in the normal inter mode in the decoding apparatus 200.
[0340] The inter prediction unit 218 of the decoding device 200 performs motion compensation for each block. At this time, the inter prediction unit 218 first obtains a plurality of candidate MVs for the current block based on information such as the MVs of a plurality of decoded blocks around the current block temporally or spatially (step Ss_1). That is, the inter prediction unit 218 creates a candidate MV list.
[0341] Next, the inter prediction unit 218 extracts each of N (N is an integer of 2 or more) candidate MVs from the plurality of candidate MVs obtained in step Ss_1 as a prediction motion vector candidate (also referred to as a prediction MV candidate) according to a predetermined priority order (step Ss_2). Note that the priority order is determined in advance for each of the N prediction MV candidates.
[0342] Next, the inter prediction unit 218 decodes prediction motion vector selection information from the input stream (that is, the encoded bit stream), and uses the decoded prediction motion vector selection information to select one prediction MV candidate from the N prediction MV candidates as the prediction motion vector (also referred to as a prediction MV) of the current block (step Ss_3).
[0343] 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, which is the decoded differential MV, to the selected prediction motion vector (step Ss_4).
[0344] Finally, the inter prediction unit 218 performs motion compensation on the current block using the derived MV and the decoded reference picture, thereby generating a predicted picture of the current block (step Ss_5).
[0345] [Prediction control unit] The prediction control unit 220 selects either the intra prediction signal or the inter prediction signal, and outputs the selected signal as the prediction signal to the addition unit 208. Overall, the configuration, functions, and processes of the prediction control unit 220, the intra prediction unit 216, and the inter prediction unit 218 on the decoder side may correspond to the configuration, functions, and processes of the prediction control unit 128, the intra prediction unit 124, and the inter prediction unit 126 on the encoder side.
[0346] [Implementation Example of Decoder] FIG. 46 is a block diagram showing an implementation example of the decoder 200. The decoder 200 includes a processor b1 and a memory b2. For example, a plurality of components of the decoder 200 shown in FIG. 41 are implemented by the processor b1 and the memory b2 shown in FIG. 46.
[0347] 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 an encoded moving image (i.e., an encoded bitstream). The processor b1 may be a processor such as a CPU. Also, the processor b1 may be an aggregate of a plurality of electronic circuits. Further, for example, the processor b1 may play the roles of a plurality of components of the decoder 200 shown in FIG. 41 etc., excluding the components for storing information.
[0348] The memory b2 is a dedicated or general-purpose memory in which information for the processor b1 to decode the encoded bitstream is stored. The memory b2 may be an electronic circuit and may be connected to the processor b1. Also, the memory b2 may be included in the processor b1. Further, the memory b2 may be an aggregate of a plurality of electronic circuits. Also, the memory b2 may be a magnetic disk or an optical disk etc., or may be expressed as a storage or a recording medium etc. Also, the memory b2 may be a non-volatile memory or a volatile memory.
[0349] For example, the memory b2 may store a moving image or a coded bit stream. Further, the memory b2 may store a program for the processor b1 to decode the coded bit stream.
[0350] Also, for example, the memory b2 may serve as a component for storing information among a plurality of components of the decoding device 200 shown in FIG. 41 and the like. Specifically, the memory b2 may serve as the block memory 210 and the frame memory 214 shown in FIG. 41. More specifically, the memory b2 may store reconstructed blocks, reconstructed pictures, and the like.
[0351] Note that in the decoding device 200, not all of the plurality of components shown in FIG. 41 and the like need to be implemented, and not all of the plurality of processes described above need to be performed. A part of the plurality of components shown in FIG. 41 and the like may be included in another device, and a part of the plurality of processes described above may be executed by another device.
[0352] [Definitions of Terms] Each term may be defined as follows as an example.
[0353] A picture is an array of a plurality of luminance samples in a monochrome format, or an array of a plurality of luminance samples and two corresponding arrays of a plurality of color difference samples in color formats of 4:2:0, 4:2:2, and 4:4:4. A picture may be a frame or a field.
[0354] A frame is a composition of a top field in which a plurality of sample lines 0, 2, 4,... occur and a bottom field in which a plurality of sample lines 1, 3, 5,... occur.
[0355] A slice is an integral number of coded tree units contained in one independent slice segment and, if any, all subsequent dependent slice segments that precede, if any, the next independent slice segment within the same access unit.
[0356] A tile is a rectangular region of a plurality of coded tree blocks within a particular tile column and a particular tile row in a picture. A tile may be a rectangular region of a frame that is intended to be independently decoded and coded, although a loop filter spanning the edges of the tile may still be applied.
[0357] A block is an MxN (N rows by M columns) array of a plurality of samples, or an MxN array of a plurality of transform coefficients. A block may be a square or rectangular region of a plurality of pixels consisting of a plurality of matrices of one luminance and two color differences.
[0358] A CTU (Coded Tree Unit) may be a coded tree block of a plurality of luminance samples of a picture having three sample arrays, or two corresponding coded tree blocks of a plurality of chroma samples. Alternatively, a CTU may be a coded tree block of a plurality of samples of either a monochrome picture or a picture coded using a syntax structure used for coding three separate color planes and a plurality of samples.
[0359] A superblock may be a square block of 64x64 pixels that constitutes one or two mode information blocks, or is recursively divided into four 32x32 blocks and may be further divided.
[0360] [First Mode of Inter Prediction Processing] Hereinafter, the symbolization device 100 and the decoding device 200 perform the inter prediction process by introducing a motion vector introduction process that introduces a motion vector obtained by expanding a reference motion vector. This technique is called UMVE (Ultimate Motion Vector Expression), but may also be called MMVD (Merge mode Motion Vector Difference).
[0361] Also, hereinafter, the motion vector introduction process is performed by introducing a selection process for selecting which index of which table among a plurality of tables to use. Hereinafter, the operation of the decoding device 200 will be described as a representative, but the operation of the symbolization device 100 is the same.
[0362] In the first aspect of the present embodiment, the selection process is performed using information on blocks that have already been decoded without using a flag.
[0363] FIG. 47 is an explanatory diagram of a delta motion vector used in the inter prediction process according to Embodiment 1.
[0364] In the example shown in FIG. 47, it is assumed that the reference motion vector is at the origin positions of the X-axis and the Y-axis. Also, in the example shown in FIG. 47, the first direction or the second direction is a direction obtained by tilting the XY-axis direction by 45 degrees (diagonal direction). Here, the first direction and the second direction are perpendicular to each other.
[0365] The delta motion vector is in either the positive or negative direction of the first direction or the second direction, and is expressed as a vector having the magnitude (distance) of the position indicated by a circle from the origin. Note that the reference motion vector is, for example, one predicted MV selected from a predicted MV list in the merge mode.
[0366] In this aspect, the inter prediction unit 218 assumes that the first direction is the +X axis direction, and obtains the magnitude (distance) of the delta motion vector from one of a plurality of tables. Here, the plurality of tables include a plurality of tables having a plurality of indexes, and each table has values with different intervals between the indexes. The inter prediction unit 218 can obtain the delta motion vector by selecting one index in one of the plurality of tables. Then, the inter prediction unit 218 performs inter prediction processing using the obtained delta motion vector and a reference motion vector. Note that since the delta motion vector can be obtained by performing selection processing such as selecting one table and selecting one index in the selected one table, hereinafter, this selection processing may be referred to as motion vector selection processing.
[0367] FIG. 48 is a flowchart showing the motion vector selection processing in the inter prediction processing performed by the inter prediction unit 218 of the decoding apparatus 200 according to the first aspect of the first embodiment. FIG. 49 is a diagram showing an example of Table 1 including a plurality of tables used in the motion vector selection processing according to the first aspect of the first embodiment.
[0368] First, as shown in FIG. 48, the inter prediction unit 218 in the decoding device 200 selects a first table to be used for a partition to be decoded from a plurality of tables (S1001). Here, the partition to be decoded is also referred to as the current partition. The current partition may be regarded as the current block. The plurality of tables are used to correct a reference motion vector with a correction value specified by an index in a predetermined direction to a delta motion vector, and have correction values with different intervals between the indexes. FIG. 49 shows an example of Table 1 including four tables distinguished by table indexes 0 to 3. The four tables included in Table 1 have different intervals (sizes) of their respective column values, that is, magnitude values. In the example shown in FIG. 49, the row indicated by any of table indexes 0 to 3 corresponds to the first table, and any column value in the first table corresponds to the correction value. Since this correction value is used to derive a delta motion vector from a reference motion vector, it can also be referred to as motion vector information.
[0369] Next, the inter prediction unit 218 analyzes a parameter indicating a first index that designates motion vector information to be selected from the motion vector information included in the first table selected in step S1001 (S1002). In the example shown in FIG. 49, although not shown, the first index is an index that designates the position of the column value (magnitude value) in the first table, and this index is indicated by a parameter such as the magnitude parameter shown in FIG. 47.
[0370] Next, the inter prediction unit 218 analyzes the parameters in step S1002, and uses at least the selected motion vector information to decode the partition to be decoded, that is, generate a prediction signal for the partition to be decoded (S1003). More specifically, the inter prediction unit 218 analyzes the parameters in step S1002, and uses the delta motion vector obtained from the selected motion vector information and the reference motion vector to decode the partition to be decoded. Note that the motion vector information selected in step S1001 may be, for example, a value indicating the magnitude of the delta motion vector as described above. Further, as the parameters analyzed in step S1002, there may be a magnitude parameter and a direction parameter indicating the delta motion vector with the reference motion vector shown in FIG. 47 as the origin.
[0371] Hereinafter, a specific example of the process of step S1001, that is, the process of selecting the first table from a plurality of tables, will be described. There are variations in this process.
[0372] Hereinafter, in the inter prediction process in merge mode, a plurality of specific examples of performing this process will be described. Note that the specific examples described below may be performed in inter prediction processes other than merge mode.
[0373] [First Example] In the first example, a process of selecting the first table from a plurality of tables based on a predicted motion vector selected from blocks around the block to be decoded will be described. The predicted motion vector is an example of a reference motion vector. When the value of the predicted motion vector is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among the plurality of tables. In the first example, the inter prediction unit 218 performs a process of selecting the first table for each partition (block).
[0374] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select any one of a plurality of tables based on a list of predetermined thresholds. In the example shown in FIG. 49, the inter prediction unit 218 determines four ranges used to select any one of four tables (table index 0 to 3).
[0375] Next, the inter prediction unit 218 performs a second step of selecting a first table from among the plurality of tables according to the value of the predicted motion vector, that is, the sum of the component values of the predicted motion vector, and the plurality of ranges determined in the first step. In the example shown in FIG. 48, since the components of the predicted motion vector, which is the reference motion vector, are the horizontal value mv_x and the vertical value mv_y, the sum of the component values of the predicted motion vector can be expressed as |mv_x| + |mv_y|.
[0376] Here, the predetermined thresholds used in the first step are three thresholds (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 32, T2 = 64, and T3 = 128. In this case, in the first step, the inter prediction unit 218 can determine four ranges (0, T1], (T1, T2], (T2, T3], and (T3, +∞) as the four ranges used to select any one of the four tables. Also, assuming that the predicted motion vector used in the second step is, for example, [-14, 41], the inter prediction unit 218 can calculate the value of the predicted motion vector, that is, the sum of the component values of the predicted motion vector, as |-14| + |41| = 55. In this case, in the second step, since the sum of the component values of the predicted motion vector is included in the range of (T1, T2], the inter prediction unit 218 can select table index 1 indicating the table corresponding to the range indicated by (T1, T2] as the first table.
[0377] [Second Example] In the second example, a process of selecting a first table from a plurality of tables based on the values of differential motion vectors assigned to blocks around a block to be decoded will be described. Hereinafter, the differential motion vectors assigned to the surrounding blocks will be referred to as surrounding differential motion vectors. When the value of the surrounding differential motion vector is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value at a small index among the plurality of tables. Also in the second example, the inter prediction unit 218 performs the process of selecting the first table for each partition (block).
[0378] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select any one of the plurality of tables based on a list of predetermined thresholds.
[0379] Next, the inter prediction unit 218 performs a second step of selecting a first table from among the plurality of tables according to the average value of the values of the surrounding differential motion vectors and the plurality of ranges determined in the first step.
[0380] Here, the predetermined thresholds used in the first step are three thresholds (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 32, T2 = 64, and T3 = 128. Also in this case, in the first step, the inter prediction unit 218 can determine (0, T1], (T1, T2], (T2, T3], and (T3, +∞) as the four ranges used to select any one of the four tables.
[0381] Also, assuming that the values of the surrounding differential motion vectors used in the second step are, for example, [-21, 14], [-3, 0], [102, 40], [120, 5], and [100, 18], the inter prediction unit 218 can calculate the average value of the values of the surrounding differential motion vectors as |-21| + |14| + |-3| + |0| + |102| + |40| + |120| + |5| + |100| + |18| = 42.
[0382] Therefore, in the second step, since the average value of the values of the surrounding differential motion vectors is included in the range of (T1, T2], the inter prediction unit 218 can select table index 1 indicating a table corresponding to the range indicated by (T1, T2] as the first table.
[0383] Note that in the second example, the inter prediction unit 218 has been described as selecting the first table from a plurality of tables based on the average value of the values of the surrounding differential motion vectors, but it is not limited to this. The inter prediction unit 218 may select the first table from a plurality of tables based on the variance value of the values of the surrounding differential motion vectors.
[0384] Also, in the second example, when the blocks around the block to be decoded are blocks that have performed prediction processing using the merge mode, the processing in the second step may be performed using 0 as the value of the surrounding differential motion vector.
[0385] [Third Example] In the third example, a process of selecting the first table from a plurality of tables based on the values of the motion vectors assigned to the blocks around the block to be decoded will be described.
[0386] Hereinafter, the motion vectors assigned to the surrounding blocks will be referred to as surrounding motion vectors. When the value of the surrounding motion vector is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among the plurality of tables. Also in the third example, the inter prediction unit 218 performs a process of selecting the first table for each partition (block).
[0387] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select any one of the plurality of tables based on a list of predetermined thresholds.
[0388] Next, the inter prediction unit 218 performs a second step of selecting a first table from among a plurality of tables according to the average value of the values of the surrounding motion vectors and the plurality of determined ranges.
[0389] Here, the predetermined threshold value used in the first step is three threshold values (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 32, T2 = 64, and T3 = 128. Also in this case, in the first step, the inter prediction unit 218 can determine (0, T1], (T1, T2], (T2, T3], and (T3, +∞) as the four ranges used for selecting any one of the four tables.
[0390] Also, assuming that the values of the surrounding motion vectors used in the second step are, for example, [-21, 14], [-3, 0], [102, 40], [120, 5], and [100, 18], the inter prediction unit 218 can calculate the average value of the values of the surrounding motion vectors as |-21| + |14| + |-3| + |0| + |102| + |40| + |120| + |5| + |100| + |18| = 42.
[0391] Therefore, in the second step, since the average value of the values of the surrounding motion vectors is included in the range of (T1, T2], the inter prediction unit 218 can select table index 1 indicating the table corresponding to the range indicated by (T1, T2] as the first table.
[0392] Note that in the second example, the inter prediction unit 218 has been described as selecting the first table from among a plurality of tables based on the average value of the values of the surrounding motion vectors, but it is not limited to this. The inter prediction unit 218 may select the first table from among a plurality of tables based on the variance value of the values of the surrounding motion vectors.
[0393] [Fourth Example] In the fourth example, a process of selecting a first table from a plurality of tables based on values in a list of predicted motion vector candidates derived from motion vectors of decoded blocks adjacent to a block to be decoded will be described. Hereinafter, the list of predicted motion vector candidates will be referred to as the predicted motion vector candidate list.
[0394] When the value in the list of predicted motion vector candidates is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value at a small index among the plurality of tables. Also in the fourth example, the inter prediction unit 218 performs the process of selecting the first table for each partition (block).
[0395] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select one of the plurality of tables based on a list of predetermined thresholds.
[0396] Next, the inter prediction unit 218 performs a second step of selecting the first table from among the plurality of tables according to the average value of the values in the predicted motion vector candidate list and the plurality of ranges determined in the first step.
[0397] Here, the predetermined thresholds used in the first step are three thresholds (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 32, T2 = 64, and T3 = 128. Also in this case, in the first step, the inter prediction unit 218 can determine, as four ranges used to select one of the four tables, (0, T1], (T1, T2], (T2, T3], and (T3, +∞).
[0398] Also, assuming that the values of the predicted motion vector candidate list used in the second step are, for example, [-21, 14], [-3, 0], [102, 40], [120, 5], [100, 18], the inter prediction unit 218 can calculate the average value of the values in the predicted motion vector candidate list as |-21| + |14| + |-3| + |0| + |102| + |40| + |120| + |5| + |100| + |18| = 42.
[0399] Therefore, in the second step, since the average value of the values in the predicted motion vector candidate list is included in the range of (T1, T2], the inter prediction unit 218 can select table index 1 indicating the table corresponding to the range indicated by (T1, T2] as the first table.
[0400] Note that in the fourth example, the inter prediction unit 218 has been described as selecting the first table from a plurality of tables based on the average value of the values in the predicted motion vector candidate list, but it is not limited to this. The inter prediction unit 218 may select the first table from a plurality of tables based on the variance value of the values in the predicted motion vector candidate list.
[0401] [Fifth Example] In the fifth example, a process of selecting the first table from a plurality of tables based on the size of the partition (block) to be decoded will be described. Hereinafter, the partition (block) to be decoded will be referred to as the current partition. When the size of the current partition is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among a plurality of tables. Also in the fifth example, the inter prediction unit 218 performs the process of selecting the first table for each partition (block).
[0402] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select any one of a plurality of tables based on a list of predetermined thresholds.
[0403] Next, the inter prediction unit 218 performs a second step of selecting a first table from among a plurality of tables according to the size of the current partition and the plurality of ranges determined in the first step.
[0404] Here, the predetermined threshold value used in the first step is three threshold values (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 3×3, T2 = 16×16, and T3 = 32×32. Also in this case, in the first step, the inter prediction unit 218 can determine, as four ranges used for selecting any one of the four tables, (0, T1], (T1, T2], (T2, T3], and (T3, +∞].
[0405] Also, assume that the size of the current partition used in the second step is, for example, 16×8. In this case, in the second step, since the size of the current partition is included in the range of (T1, T2), the inter prediction unit 218 can select table index 1 indicating the table corresponding to the range indicated by (T1, T2) as the first table.
[0406] [Sixth Example] In the sixth example, a process of selecting a first table from a plurality of tables based on the resolution of the picture to which the partition (block) to be decoded belongs will be described. The resolution of the picture can also be expressed as the number of pixels constituting the picture. Hereinafter, the picture to which the partition (block) to be decoded belongs is referred to as the picture to which the current block belongs. When the resolution of the picture to which the current block belongs is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value with a small index among the plurality of tables. In the sixth example, the inter prediction unit 218 performs a process of selecting the first table for each picture.
[0407] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select any one of a plurality of tables based on a list of predetermined thresholds.
[0408] Next, the inter prediction unit 218 performs a second step of selecting a first table from among the plurality of tables according to the resolution of the picture to which the current block belongs and the plurality of ranges determined in the first step.
[0409] Here, the predetermined thresholds used in the first step are three thresholds (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 832×580, T2 = 1920×1080, and T3 = 3840×2160. Also in this case, in the first step, the inter prediction unit 218 can determine four ranges (0, T1], (T1, T2], (T2, T3], (T3, +∞) as the four ranges used to select any one of the four tables.
[0410] Also, assume that the resolution of the picture to which the current block belongs is, for example, 416×240. In this case, in the second step, since the resolution of the picture to which the current block belongs is included in the range of (0, T1], the inter prediction unit 218 can select table index 0 indicating the table corresponding to the range indicated by (0, T1] as the first table.
[0411] Note that the resolution of the picture to which the current block belongs can be obtained by the syntax (expression rule of the data sequence) included in the encoded bit stream acquired by the decoding device 200.
[0412] [Example 7] In the seventh example, a process of selecting a first table from a plurality of tables based on the temporal ID of a slice or picture to which a partition (block) to be decoded belongs will be described. Here, the temporal ID is a number indicating the hierarchy of temporal layers used for spatially scalable coding. Spatially scalable coding is a technique for hierarchically (layer-by-layer) coding from coarse information to fine information. Spatially scalable coding is realized by performing coding by dividing into a plurality of layers as temporal layers. In the example shown in FIG. 57 or FIG. 58, pictures are coded layer by layer, and scalability is realized in enhancement layers above the base layer. In this case, the temporal ID can take values from 0 to 2. Note that slices may be coded layer by layer, and scalability may be realized in enhancement layers above the base layer. Hereinafter, a slice or picture to which a partition (block) to be decoded belongs is referred to as a current slice or a current picture.
[0413] When the value of the temporal ID of the current slice or current picture is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among the plurality of tables. In the seventh example, the inter prediction unit 218 performs a process of selecting the first table for each slice or picture.
[0414] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used for selecting one of the plurality of tables based on a list of predetermined thresholds.
[0415] Next, the inter prediction unit 218 performs a second step of selecting the first table from among the plurality of tables according to the value of the temporal ID of the current slice or current picture and the plurality of ranges determined in the first step.
[0416] Here, the predetermined threshold value used in the first step is three threshold values (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 1, T2 = 2, and T3 = 3. Also in this case, in the first step, the inter prediction unit 218 can determine, as four ranges used for selecting any one of the four tables, (0, T1], (T1, T2], (T2, T3], and (T3, +∞).
[0417] Also, assume that the value of the temporal ID of the current slice or the current picture used in the second step is, for example, 2. In this case, in the second step, since the value of the temporal ID of the current slice or the current picture is included in the range of (T1, T2], the inter prediction unit 218 can select table index 1 indicating the table corresponding to the range indicated by (T1, T2] as the first table.
[0418] [Eighth Example] In the eighth example, a process of selecting a first table from a plurality of tables based on the distance between the picture to which the partition (block) to be decoded belongs and the reference picture of the partition (block) to be decoded will be described. Hereinafter, the picture to which the partition (block) to be decoded belongs is referred to as the current picture, and the partition (block) to be decoded is referred to as the current partition. When the distance between the current picture and the reference picture of the current partition is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value with a small index among the plurality of tables. In the eighth example, the inter prediction unit 218 performs a process of selecting the first table for each partition (block).
[0419] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used for selecting any one of the plurality of tables based on a list of predetermined threshold values.
[0420] Next, the inter prediction unit 218 performs a second step of selecting a first table from among a plurality of tables according to the distance between the current picture and the reference picture of the current partition and the plurality of ranges determined in the first step.
[0421] Here, the predetermined threshold value used in the first step is three threshold values (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 1, T2 = 2, and T3 = 3. Also in this case, in the first step, the inter prediction unit 218 can determine (0, T1], (T1, T2], (T2, T3], and (T3, +∞) as the four ranges used for selecting any one of the four tables.
[0422] Also, assume that the POC (display order) of the current picture used in the second step is 16 and the POC of the reference picture of the current partition is 0. In this case, in the second step, since the distance between the current picture and the reference picture of the current partition is 16 and is included in the range of (T3, +∞), the inter prediction unit 218 can select table index 3 indicating the table corresponding to the range indicated by (T3, +∞) as the first table.
[0423] [Example 9] Note that the process of selecting the first table from a plurality of tables may be performed based on the combination of the methods described in the first example to the eighth example.
[0424] FIG. 50 is a diagram showing an example of Table 2 including a plurality of tables used in the motion vector selection process according to the first aspect of Embodiment 1. FIG. 50 shows an example of Table 2 including seven tables distinguished by table index 0 to 7. The seven tables included in Table 2 have different intervals (sizes) of their respective column values, that is, magnitude values. In the example shown in FIG. 50, the row indicated by any one of table index 0 to 7 corresponds to the first table, and any one of the column values in the first table corresponds to the correction value.
[0425] Next, as an example, based on the combination of the first example and the fifth example, the process of selecting the first table from a plurality of tables shown in FIG. 50 will be described. That is, in the ninth example, the process of selecting the first table from a plurality of tables based on both the predicted motion vector selected from the blocks around the current block and the size of the current partition will be described.
[0426] When the size of the current partition is large and the value of the predicted motion vector is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among a plurality of tables.
[0427] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of dividing a plurality of tables included in Table 2 into two sets each composed of a plurality of tables, that is, determining a set composed of a part of the plurality of tables included in Table 2 as the first set and a set composed of the other part as the second set. For example, the inter prediction unit 218 determines that table index 0 to 3 among table index 0 to 7 included in Table 2 shown in FIG. 50 is the first set and table index 4 to 7 is the second set.
[0428] Next, the inter prediction unit 218 performs a second step of determining a range used to select the first set or the second set based on the first list of predetermined thresholds.
[0429] Next, the inter prediction unit 218 performs a third step of selecting the first set or the second set according to the value of the predicted motion vector and the range determined in the second step.
[0430] Next, the inter prediction unit 218 performs a fourth step of determining a plurality of ranges used to select any one of a plurality of tables constituting the first set or the second set selected in the third step based on a second list of predetermined thresholds.
[0431] Next, the inter prediction unit 218 performs a fifth step of selecting a first table from among a plurality of tables constituting the first set or the second set selected in the third step according to the size of the current partition and the plurality of ranges determined in the fourth step.
[0432] Here, the predetermined threshold value included in the first list used in the second step is a threshold value (T 21 ) for distinguishing between a first set composed of table indices 0 to 3 shown in FIG. 50 and a second set composed of table indices 4 to 7, for example, T 21 = 32. In this case, in the second step, the inter prediction unit 218 determines two ranges (0, T 21 ) and (T 21 , +∞) as the two ranges used to select the first set or the second set.
[0433] Also, assuming that the predicted motion vector used in the third step is, for example, [-14, 41], the inter prediction unit 218 can calculate the sum of the values of the predicted motion vector, that is, the sum of the component values of the predicted motion vector, as |-14| + |41| = 55. In this case, in the third step, since the sum of the component values of the predicted motion vector is included in the range of (T 21 , +∞), the inter prediction unit 218 can select the second set corresponding to the range indicated by (T 21 , +∞).
[0434] Also, the predetermined threshold values included in the second list used in the fourth step are three threshold values (T 41 to T 43 ) for distinguishing four tables included in the second set indicated by table indices 4 to 7 shown in FIG. 50. For example, T 41 = 8×8, T42 = 16×16, T 43 = 32×32. In this case too, in the fourth step, the inter prediction unit 218 uses, as four ranges for selecting any one of the four tables, (0, T 41 , (T 41 , T 42 , (T 42 , T 43 , (T 43 , +∞) can be determined.
[0435] Also, assuming that the size of the current partition used in the fifth step is, for example, 16×8, the size of the current partition is within the range of (T 41 , T 42 . In this case, in the fifth step, the inter prediction unit 218 can select, as the first table, the second table among the second set of two tables indicating the table corresponding to the range indicated by (T 41 , T 42 , that is, table index 5.
[0436] [Example 10] In Example 10, the process of selecting the first table from a plurality of tables based on the average value of the differential motion vectors of the already decoded pictures will be described. When the average value of the differential motion vectors of the already decoded pictures is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among the plurality of tables. In Example 10, the inter prediction unit 218 performs the process of selecting the first table for each picture.
[0437] More specifically, in step S1001, first, the inter prediction unit 218 performs the first step of determining a plurality of ranges used for selecting any one of the plurality of tables based on a list of predetermined thresholds.
[0438] Next, the inter prediction unit 218 performs a second step of selecting a first table from among a plurality of tables according to the average value of the differential motion vectors of the already decoded pictures and the plurality of ranges determined in the first step.
[0439] Here, the predetermined threshold value used in the first step is three threshold values (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 32, T2 = 64, and T3 = 128. In this case, in the first step, the inter prediction unit 218 can determine (0, T1], (T1, T2], (T2, T3], and (T3, +∞) as the four ranges used for selecting any one of the four tables.
[0440] Also, assuming that the differential motion vector of the already decoded picture used in the second step is, for example, [100, 18], the inter prediction unit 218 can calculate the average value of the differential motion vectors of the already decoded pictures as |100| + |18| = 118.
[0441] Therefore, in the second step, since the average value of the differential motion vectors of the already decoded pictures is included in the range of (T2, T3], the inter prediction unit 218 can select table index 2 indicating the table corresponding to the range indicated by (T2, T3] as the first table.
[0442] Note that in the tenth example, the inter prediction unit 218 has been described as selecting the first table from among a plurality of tables based on the values of the differential motion vectors of the already decoded pictures, but it is not limited to this. The inter prediction unit 218 may select the first table from among a plurality of tables based on the values of the motion vectors of the already decoded pictures.
[0443] In the tenth example, the inter prediction unit 218 has been described as selecting the first table from a plurality of tables based on the average value of the differential motion vectors of already decoded pictures, but it is not limited to this. The inter prediction unit 218 may select the first table from a plurality of tables based on the variance value of the differential motion vectors of already decoded pictures.
[0444] Also, the already decoded picture may be a picture in a layer indicating the same temporal ID as the current picture, or may be the picture immediately before the current picture in the decoding order.
[0445] [Eleventh Example] In the eleventh example, the process of selecting the first table from a plurality of tables based on the average value of the block sizes of already decoded pictures will be described. When the average value of the block sizes of already decoded pictures is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among a plurality of tables. In the eleventh example, the inter prediction unit 218 performs the process of selecting the first table for each picture.
[0446] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select any one of a plurality of tables based on a list of predetermined thresholds.
[0447] Next, the inter prediction unit 218 performs a second step of selecting the first table from among a plurality of tables according to the average value of the block sizes of already decoded pictures and the plurality of ranges determined in the first step.
[0448] Here, the predetermined threshold values used in the first step are three threshold values (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 8×8, T2 = 16×16, and T3 = 32×32. Also in this case, in the first step, the inter prediction unit 218 can determine, as four ranges used for selecting any one of the four tables, (0, T1], (T1, T2], (T2, T3], and (T3, +∞).
[0449] Also, assuming that the average value obtained by multiplying the horizontal and vertical sizes of the block size of the already decoded picture used in the second step is, for example, 128, the average value of the block size of the already decoded picture is included in the range of (T1, T2). In this case, in the second step, the inter prediction unit 218 can select table index 1 indicating the table corresponding to the range indicated by (T1, T2) as the first table.
[0450] Note that the already decoded picture may be a picture of a layer indicating the same temporal ID as the current picture, or may be the picture immediately before the current picture in the decoding order.
[0451] [Example 12] In Example 12, the process of selecting the first table from a plurality of tables based on the average value of the QP (quantization parameter) of the already decoded picture will be described. When the average value of the QP of the already decoded picture is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among the plurality of tables. In Example 12, the inter prediction unit 218 performs the process of selecting the first table for each picture.
[0452] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used for selecting any one of the plurality of tables based on a list of predetermined threshold values.
[0453] Next, the inter prediction unit 218 performs a second step of selecting a first table from among a plurality of tables according to the average value of the QPs of the already decoded pictures and the plurality of ranges determined in the first step.
[0454] Here, the predetermined threshold value used in the first step is three threshold values (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 22, T2 = 27, and T3 = 32. In this case, in the first step, the inter prediction unit 218 can determine, as four ranges used for selecting any one of the four tables, (0, T1], (T1, T2], (T2, T3], and (T3, +∞).
[0455] Also, assume that the average value of the QPs of the already decoded pictures used in the second step is, for example, 40. In this case, in the second step, since the average value of the QPs of the already decoded pictures is included in the range of (T3, +∞), the inter prediction unit 218 can select table index 3 indicating the table corresponding to the range indicated by (T3, +∞) as the first table.
[0456] Note that the already decoded picture may be a picture of a layer indicating the same temporal ID as the current picture, or may be the picture immediately before the current picture in the decoding order.
[0457] [Example 13] In Example 13, the process of selecting a first table from a plurality of tables based on the slice QP of the already decoded picture will be described. When the slice QP of the already decoded picture is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value with a small index among the plurality of tables. In Example 13, the inter prediction unit 218 performs the process of selecting the first table for each picture or slice.
[0458] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select one of a plurality of tables based on a list of predetermined thresholds.
[0459] Next, the inter prediction unit 218 performs a second step of selecting a first table from among the plurality of tables according to the slice QP of the already decoded picture and the plurality of ranges determined in the first step.
[0460] Here, the predetermined thresholds used in the first step are three thresholds (T1 to T3) for dividing the four tables shown in FIG. 49. For example, T1 = 22, T2 = 27, and T3 = 32. In this case, in the first step, the inter prediction unit 218 can determine, as four ranges used to select one of the four tables, (0, T1], (T1, T2], (T2, T3], and (T3, +∞).
[0461] Also, assume that the slice QP of the already decoded picture used in the second step is, for example, 40. In this case, in the second step, since the slice QP of the already decoded picture is included in the range of (T3, +∞), the inter prediction unit 218 can select table index 3 indicating the table corresponding to the range indicated by (T3, +∞) as the first table.
[0462] Note that the already decoded picture may be a picture in a layer indicating the same temporal ID as the current picture, or may be the picture immediately before the current picture in the decoding order.
[0463] [Example 14] In the 14th example, a process of selecting a first table from a plurality of tables based on the slice QP of the picture to which the partition (block) to be decoded belongs will be described. Hereinafter, the picture to which the partition (block) to be decoded belongs is referred to as the current picture. When the slice QP of the current picture is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value with a small index among the plurality of tables. Also in the 14th example, the inter prediction unit 218 performs the process of selecting the first table for each picture or slice.
[0464] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of determining a plurality of ranges used to select any one of the plurality of tables based on a list of predetermined thresholds.
[0465] Next, the inter prediction unit 218 performs a second step of selecting the first table from among the plurality of tables according to the slice QP of the current picture and the plurality of ranges determined in the first step.
[0466] Here, the predetermined thresholds used in the first step are three thresholds (T1 to T3) for classifying the four tables shown in FIG. 49. For example, T1 = 22, T2 = 27, and T3 = 32. In this case, in the first step, the inter prediction unit 218 can determine, as four ranges used to select any one of the four tables, (0, T1], (T1, T2], (T2, T3], and (T3, +∞).
[0467] Also, assume that the slice QP of the current picture used in the second step is, for example, 40. In this case, in the second step, since the slice QP of the current picture is included in the range of (T3, +∞), the inter prediction unit 218 can select table index 3 indicating the table corresponding to the range indicated by (T3, +∞) as the first table.
[0468] [Example 15] Note that, based on the combination of the methods described in Examples 10 to 14, the process of selecting the first table from a plurality of tables may be performed.
[0469] Hereinafter, as an example, the process of selecting the first table from the plurality of tables shown in FIG. 50 based on the combination of Example 10 and Example 14 will be described. That is, in Example 15, the process of selecting the first table from a plurality of tables is described based on both the average value of the differential motion vectors of the already decoded pictures and the slice QP of the current picture.
[0470] When the slice QP of the current picture is large and the average value of the differential motion vectors of the already decoded pictures is large, the inter prediction unit 218 selects, as the first table, a table that can specify the position of a large column value (magnitude value) with a small index among a plurality of tables.
[0471] More specifically, in step S1001, first, the inter prediction unit 218 performs a first step of dividing the plurality of tables included in Table 2 into two sets each composed of a plurality of tables, that is, determining a set composed of a part of the plurality of tables included in Table 2 as the first set and a set composed of the other part as the second set. For example, the inter prediction unit 218 determines that, among table index 0 to 7 included in Table 2 shown in FIG. 50, table index 0 to 3 is the first set and table index 4 to 7 is the second set.
[0472] Next, the inter prediction unit 218 performs a second step of determining a range used to select the first set or the second set based on the first list of a predetermined threshold value.
[0473] Next, the inter prediction unit 218 performs a third step of selecting the first set or the second set according to the slice QP of the current picture and the range determined in the second step.
[0474] Next, the inter prediction unit 218 performs a fourth step of determining a plurality of ranges used to select any one of a plurality of tables constituting the first set or the second set selected in the third step based on a second list of predetermined thresholds.
[0475] Next, the inter prediction unit 218 performs a fifth step of selecting a first table from among a plurality of tables constituting the first set or the second set selected in the third step according to the average value of the differential motion vectors of the already decoded pictures and the plurality of ranges determined in the fourth step.
[0476] Here, the predetermined threshold value included in the first list used in the second step is a threshold value (T 21 ) for distinguishing between a first set composed of table indices 0 to 3 shown in FIG. 50 and a second set composed of table indices 4 to 7. For example, T 21 = 30. In this case, in the second step, the inter prediction unit 218 determines two ranges (0, T 21 , (T 21 , +∞) as the two ranges used to select the first set or the second set. Also, assume that the slice QP of the current picture used in the third step is, for example, 40. In this case, in the third step, since the sum of the component values of the predicted motion vector is included in the range of (T 21 , +∞), the inter prediction unit 218 can select the second set corresponding to the range indicated by (T 21 , +∞).
[0477] Also, the predetermined threshold values included in the second list used in the fourth step are three threshold values (T 41 to T 43 ) for distinguishing four tables included in the second set indicated by table indices 4 to 7 shown in FIG. 50. For example, T 41 = 32, T 42 = 64, T 43= 128. In this case, in the fourth step, the inter prediction unit 218 uses, as the four ranges for selecting any one of the four tables, (0, T 41 , (T 41 , T 42 , (T 42 , T 43 , (T 43 , +∞) can be determined.
[0478] Also, assuming that the average value of the differential motion vectors of the already decoded pictures used in the fifth step is, for example, [100, 18], the inter prediction unit 218 can calculate the average value of the differential motion vectors of the already decoded pictures as |100| + |18| = 118. Therefore, the average value of the differential motion vectors of the already decoded pictures is included in the range of (T 42 , T 43 . In this case, in the fifth step, the inter prediction unit 218 can select, as the first table, the third table of the second set of three tables corresponding to the range indicated by (T 42 , T 43 , that is, table index 6.
[0479] Note that the already decoded picture may be a picture of the layer indicating the same temporal ID as the current picture, or may be the picture immediately before the current picture in the decoding order.
[0480] Note that in the first aspect, an example having the four tables shown in FIG. 49 is used for explanation, but the present invention is not limited to this, and the same applies to a configuration having two or more tables. For example, a configuration having two tables indicated by table index 0 and table index 2 in FIG. 49 may be used. In this case, instead of dividing into four ranges using three threshold values in the first to fifteenth examples, a configuration may be used in which two ranges are divided using one threshold value.
[0481] [Effect of the First Aspect] According to the first aspect, by introducing motion vector derivation processing into the inter-prediction processing of the present disclosure, in the inter-prediction processing, motion compensation can be performed using a motion vector with higher accuracy than the reference motion vector. Thereby, the coding efficiency of the inter-prediction processing can be improved.
[0482] Furthermore, according to the first aspect, motion vector selection processing as shown in the above-described first example to fifteenth example is introduced into the motion vector derivation processing. Thereby, when using a motion vector with higher accuracy than the reference motion vector, the index of a smaller numerical value (less information) in the first table selected from a plurality of tables can be used to specify the motion vector with high accuracy. That is, according to the first aspect, by introducing motion vector selection processing into the motion vector derivation processing, there is a possibility that the coding performance of the inter-prediction processing can be improved.
[0483] Note that, in the first aspect, at least a part of the disclosed content can be combined with at least a part of one or more of the other aspects.
[0484] Also, a part of the process, a part of the device, the syntax, and / or other functions disclosed in the description of the flowchart according to FIG. 48 can be combined with other aspects.
[0485] Also, all processes / elements disclosed in the first aspect are not essential. The apparatus / method may include a part of the processes / elements. Also, the above-described processing may be executed by the same decoder as the encoder.
[0486] [Second Aspect of Inter-Prediction Processing] Even in the second aspect of the present embodiment, the encoding device 100 and the decoding device 200 perform the motion vector introduction process introduced when performing the inter prediction process by introducing a selection process for selecting which index of which table among a plurality of tables to use. Hereinafter, the operation of the decoding device 200 will be described as a representative, but the operation of the encoding device 100 is the same.
[0487] In the second aspect of the present embodiment, the selection process will be described as being performed using a flag (parameter). Hereinafter, the description will focus on the differences from the first aspect.
[0488] FIG. 51 is a flowchart showing the motion vector selection process in the inter prediction process performed by the inter prediction unit 218 of the decoding device 200 according to the second aspect of Embodiment 1.
[0489] First, as shown in FIG. 51, the inter prediction unit 218 in the decoding device 200 analyzes a first parameter indicating a first index for designating a table to be used for the partition to be decoded from a plurality of tables (S2001). That is, the inter prediction unit 218 selects the first table to be used for the current partition by analyzing the first parameter. The first parameter indicates the first index by which the first table can be specified. Note that the first index is not essential, and the first parameter may directly specify the first table to be used for the current partition.
[0490] For example, the inter prediction unit 218 selects the first table to be used for the current partition from the four tables included in Table 1 shown in FIG. 49 by analyzing the first parameter.
[0491] Next, the inter prediction unit 218 analyzes a second parameter indicating a second index for specifying motion vector information to be selected from a plurality of pieces of motion vector information (S2002). That is, by analyzing the second parameter, the inter prediction unit 218 can obtain a second index indicating the motion vector information to be selected from the first table.
[0492] For example, the inter prediction unit 218 obtains, by analyzing the second parameter, a second index indicating the position (specifying) of the column value (magnitude value) in the first table included in Table 1 shown in FIG. 49.
[0493] Next, the inter prediction unit 218 decodes the partition to be decoded, that is, generates a prediction signal for the partition to be decoded, using at least the motion vector information specified by the second index (S2003).
[0494] Note that the above motion vector information is information regarding a delta motion vector, and the motion vector information specified by the second index may be, for example, a value (magnitude value) indicating the magnitude of the delta motion vector.
[0495] Here, the first parameter analyzed in step S2001 is determined to specify a first table selected from a plurality of tables based on, for example, the resolution of the picture to which the current block belongs, as in the sixth example of the first aspect. That is, the first parameter analyzed in step S2001 describes contents such as a first index that specifies a first table selected from a plurality of tables based on the resolution of the picture to which the current block belongs. The first parameter analyzed in step S2001 may be determined to specify a first table selected from a plurality of tables based on, for example, the average value of the differential motion vectors of the already decoded pictures, as in the tenth example of the first aspect. Note that the method for determining the first parameter analyzed in step S2001 is not limited to the first example and the tenth example. That is, the first parameter analyzed in step S2001 may be determined to specify a first table selected from a plurality of tables based on the criteria shown in the first to fifteenth examples of the first aspect.
[0496] The first parameter analyzed in step S2001 and the second parameter analyzed in step S2002 may be described in the slice unit header. The first parameter and the second parameter are not limited to being described in the slice unit header, and may be described in the picture unit, sequence unit, or block unit header. Also, at least the first parameter of the first parameter and the second parameter may be a CTU level parameter or a partition level parameter.
[0497] Note that in the example in FIG. 49, the first parameter is a vertical value indicated by table index, and is shown as a value that increases by 1 from 0 in ascending order in the vertical direction of the figure. The second parameter is not shown in the figure, but is a value that increases by 1 from 0 in ascending order in the horizontal direction of the figure, similar to the first parameter.
[0498] In the second aspect, an example having four tables shown in FIG. 49 was used for the description, but the present invention is not limited to this, and the same applies to a configuration having two or more tables. For example, a configuration having two tables indicated by table index 0 and table index 2 in FIG. 49 may be used. In this case, instead of the first parameter having four values for designating one table from four tables, a configuration may be adopted in which the first parameter has two values for designating one table from two tables.
[0499] [Effect of the Second Aspect] According to the second aspect, by introducing a motion vector derivation process into the inter prediction process of the present disclosure, in the inter prediction process, motion compensation can be performed using a motion vector with higher accuracy than the reference motion vector. Thereby, the coding efficiency of the inter prediction process can be improved.
[0500] Furthermore, according to the second aspect, a motion vector selection process performed using a parameter determined based on the criteria shown in the above-described first example to fifteenth example is introduced into the motion vector derivation process. Thereby, when using a motion vector with higher accuracy than the reference motion vector, the index of a smaller numerical value (less information) in the first table selected from a plurality of tables can be used to specify the motion vector with high accuracy. That is, according to the second aspect, by introducing a motion vector selection process performed using a parameter into the motion vector derivation process, there is a possibility of improving the coding performance of the inter prediction process.
[0501] Note that in the second aspect, at least a part of the disclosed content can be combined with at least a part of one or more of the other aspects.
[0502] Also, a part of the process, a part of the device, the syntax, and / or other functions disclosed in the description of the flowchart according to FIG. 51 can be combined with other aspects.
[0503] Also, not all processes / elements disclosed in the second aspect are essential. The apparatus / method may include some of the processes / elements. Also, the above-described processing may be executed by the same decoder as the encoder.
[0504] [Implementation example of the encoding device] FIG. 52 is a block diagram showing an implementation example of the encoding device 100 according to Embodiment 1. The encoding device 100 includes a circuit 160 and a memory 162. For example, a plurality of components of the encoding device 100 shown in FIG. 1 are implemented by the circuit 160 and the memory 162 shown in FIG. 52.
[0505] The circuit 160 is a circuit that performs information processing and is a circuit that can access the memory 162. For example, the circuit 160 is a dedicated or general-purpose electronic circuit that encodes moving images. The circuit 160 may be a processor such as a CPU. Also, the circuit 160 may be an aggregate of a plurality of electronic circuits. Also, for example, the circuit 160 may play the roles of a plurality of components of the encoding device 100 shown in FIG. 1, excluding the components for storing information.
[0506] The memory 162 is a dedicated or general-purpose memory in which information for the circuit 160 to encode a moving image is stored. The memory 162 may be an electronic circuit and may be connected to the circuit 160. Also, the memory 162 may be included in the circuit 160. Also, the memory 162 may be an aggregate of a plurality of electronic circuits. Also, the memory 162 may be a magnetic disk or an optical disk, etc., or may be expressed as a storage or a recording medium, etc. Also, the memory 162 may be a non-volatile memory or a volatile memory.
[0507] For example, the memory 162 may store the moving image to be encoded, or may store the bit string corresponding to the encoded moving image. Also, the memory 162 may store a program for the circuit 160 to encode a moving image.
[0508] Also, for example, the memory 162 may serve as a component for storing information among the plurality of components of the encoding device 100 shown in FIG. 1 and the like. Specifically, the memory 162 may serve as the block memory 118 and the frame memory 122 shown in FIG. 1. More specifically, the memory 162 may store the reconstructed blocks, the reconstructed pictures, and the like.
[0509] In the encoding device 100, not all of the plurality of components shown in FIG. 1 and the like need to be implemented, and not all of the plurality of processes described above need to be performed. A part of the plurality of components shown in FIG. 1 and the like may be included in other devices, and a part of the plurality of processes described above may be executed by other devices. Then, in the encoding device 100, by implementing a part of the plurality of components shown in FIG. 1 and the like and performing a part of the plurality of processes described above, the prediction process in the inter prediction mode is efficiently performed.
[0510] An operation example of the encoding device 100 shown in FIG. 52 is shown below. In the following operation example, FIG. 53 is a flowchart showing the operation example of the encoding device 100 shown in FIG. 52. For example, when encoding a moving image, the encoding device 100 shown in FIG. 52 performs the operations shown in FIG. 53.
[0511] Specifically, the circuit 160 of the encoding device 100 performs the following processes in operation. That is, first, the circuit 160 is used to correct a reference motion vector with a correction value specified by an index in a predetermined direction, and selects a first table to be used for a partition of an image to be encoded in a moving image from a plurality of tables having different correction values at different intervals between the indexes (S311). Next, the circuit 160 writes a parameter indicating a first index to be selected among the indexes of the first table (S312). Next, the circuit 160 encodes the partition to be encoded using the reference motion vector corrected by the correction value specified by the first index (S313).
[0512] Accordingly, when the encoding device 100 introduces the motion vector derivation process into the inter prediction process, by introducing the motion vector selection process into the motion vector derivation process, the encoding performance of the inter prediction process can be improved. Therefore, the encoding device 100 can improve the encoding efficiency.
[0513] [Implementation Example of Decoding Device] FIG. 54 is a block diagram showing an implementation example of the decoding device 200 according to the first embodiment. The decoding device 200 includes a circuit 260 and a memory 262. For example, a plurality of components of the decoding device 200 shown in FIG. 41 are implemented by the circuit 260 and the memory 262 shown in FIG. 54.
[0514] The circuit 260 is a circuit that performs information processing and is a circuit that can access the memory 262. For example, the circuit 260 is a dedicated or general-purpose electronic circuit that decodes a moving image. The circuit 260 may be a processor such as a CPU. Further, the circuit 260 may be an aggregate of a plurality of electronic circuits. Also, for example, the circuit 260 may play the roles of a plurality of components among the plurality of components of the decoding device 200 shown in FIG. 41 etc., excluding the components for storing information.
[0515] The memory 262 is a dedicated or general-purpose memory in which information for the circuit 260 to decode a moving image is stored. The memory 262 may be an electronic circuit and may be connected to the circuit 260. Further, the memory 262 may be included in the circuit 260. Also, the memory 262 may be an aggregate of a plurality of electronic circuits. Also, the memory 262 may be a magnetic disk, an optical disk, etc., or may be expressed as a storage or a recording medium, etc. Further, the memory 262 may be a non-volatile memory or a volatile memory.
[0516] For example, the memory 262 may store a bit string corresponding to the encoded moving image, or may store a moving image corresponding to the decoded bit string. Further, the memory 262 may store a program for the circuit 260 to decode the moving image.
[0517] Also, for example, the memory 262 may serve as a component for storing information among a plurality of components of the decoding device 200 shown in FIG. 41 or the like. Specifically, the memory 262 may serve as the block memory 210 and the frame memory 214 shown in FIG. 41. More specifically, the memory 262 may store the reconstructed blocks, the reconstructed pictures, and the like.
[0518] Note that in the decoding device 200, not all of the plurality of components shown in FIG. 41 or the like need to be implemented, and not all of the plurality of processes described above need to be performed. A part of the plurality of components shown in FIG. 41 or the like may be included in another device, and a part of the plurality of processes described above may be executed by another device. Then, in the decoding device 200, by implementing a part of the plurality of components shown in FIG. 41 or the like and performing a part of the plurality of processes described above, motion compensation is efficiently performed.
[0519] An operation example of the decoding device 200 shown in FIG. 54 is shown below. FIG. 55 is a flowchart showing an operation example of the decoding device 200 shown in FIG. 54. For example, when decoding a moving image, the decoding device 200 shown in FIG. 54 performs the operations shown in FIG. 55.
[0520] Specifically, circuit 260 of the decoding apparatus 200 performs the following processing in operation. That is, first, circuit 260 is used to correct a reference motion vector with a correction value specified by an index in a predetermined direction, and selects a first table to be used for a partition of an image to be encoded in a moving image from a plurality of tables having different correction values at different intervals between indexes (S411). Next, circuit 260 analyzes a parameter indicating a first index to be selected among the indexes of the first table (S412). Next, circuit 260 decodes a partition to be decoded using the reference motion vector corrected by the correction value specified by the first index (S413).
[0521] Thereby, when the decoding apparatus 200 introduces a motion vector derivation process into the inter prediction process, by introducing a motion vector selection process into the motion vector derivation process, the encoding performance of the inter prediction process can be improved. Therefore, the decoding apparatus 200 can improve the encoding efficiency.
[0522] [Supplement] Also, the encoding apparatus 100 and the decoding apparatus 200 in the present embodiment may be used as an image encoding apparatus and an image decoding apparatus, respectively, or may be used as a moving image encoding apparatus and a moving image decoding apparatus. Alternatively, the encoding apparatus 100 and the decoding apparatus 200 may be used as an inter prediction apparatus (inter-frame prediction apparatus), respectively.
[0523] That is, the encoding apparatus 100 and the decoding apparatus 200 may each correspond only to the inter prediction unit (inter-frame prediction unit) 126 and the inter prediction unit (inter-frame prediction unit) 218. And other components such as the conversion unit 106 and the inverse conversion unit 206 may be included in other apparatuses.
[0524] In addition, in this embodiment, each component may be configured by dedicated hardware or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.
[0525] Specifically, each of the encoding device 100 and the decoding device 200 may include a processing circuit and a storage device electrically connected to the processing circuit and accessible from the processing circuit. For example, the processing circuit corresponds to circuit 160 or 260, and the storage device corresponds to memory 162 or 262.
[0526] The processing circuit includes at least one of dedicated hardware and a program execution unit, and executes processing using the storage device. Further, when the processing circuit includes a program execution unit, the storage device stores a software program executed by the program execution unit.
[0527] Here, the software that realizes the encoding device 100 or the decoding device 200 of this embodiment is the following program.
[0528] That is, this program causes a computer to execute an encoding method for encoding a moving image, which is used to correct a reference motion vector with a correction value specified by an index in a predetermined direction, and selects a first table to be used for a partition of an encoding target image in the moving image from a plurality of tables having different correction values between indexes, writes a parameter indicating a first index to be selected among the indexes of the first table, and encodes the partition using the reference motion vector corrected by the correction value specified by the first index.
[0529] Alternatively, this program may be a decoding method for decoding a moving image, which is used to correct a reference motion vector with a correction value specified by an index in a predetermined direction, and selects a first table to be used for a partition of an image to be decoded in the moving image from a plurality of tables having different correction values at different intervals between the indexes, analyzes a parameter indicating a first index to be selected among the indexes of the first table, and decodes the partition using the reference motion vector corrected by the correction value specified by the first index. The computer may be caused to execute this decoding method.
[0530] Also, as described above, each component may be a circuit. These circuits may form one circuit as a whole, or may be separate circuits respectively. Further, each component may be realized by a general-purpose processor or a dedicated processor.
[0531] Also, a process executed by a specific component may be executed by another component. Also, the order in which the processes are executed may be changed, or a plurality of processes may be executed in parallel. Further, the encoding / decoding device may include an encoding device 100 and a decoding device 200.
[0532] The ordinal numbers such as the first and second used in the description may be appropriately changed. Also, a new ordinal number may be given to or removed from a component or the like.
[0533] As described above, the aspects of the encoding device 100 and the decoding device 200 have been described based on the embodiments. However, the aspects of the encoding device 100 and the decoding device 200 are not limited to this embodiment. As long as the gist of the present disclosure is not deviated from, various modifications conceived by those skilled in the art applied to this embodiment or forms constructed by combining components in different embodiments may also be included within the scope of the aspects of the encoding device 100 and the decoding device 200.
[0534] This aspect may be implemented in combination with at least a part of other aspects in the present disclosure. Also, some processes described in the flowchart of this aspect, some configurations of the apparatus, some syntax, etc. may be implemented in combination with other aspects.
[0535] (Embodiment 2) [Implementation and Application] In each of the above embodiments, each of the functional or operative blocks can usually be realized by an MPU (micro processing unit), a memory, etc. Also, 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 (program) 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 a semiconductor memory. Note that it is also possible to realize each functional block by hardware (a dedicated circuit).
[0536] 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 a plurality of devices. Also, the processor that executes the above program may be singular or plural. That is, centralized processing may be performed, or distributed processing may be performed.
[0537] Aspects of the present disclosure are not limited to the above examples, and various modifications are possible, and these are also included within the scope of the aspects of the present disclosure.
[0538] Furthermore, here, application examples of the moving image encoding method (image encoding method) or the moving image decoding method (image decoding method) shown in each of the above embodiments, and various systems for implementing the application examples will be described. Such a system may be characterized by having an image encoding device using an image encoding method, an image decoding device using an image decoding method, or an image encoding / decoding device having both. Regarding other configurations of such a system, appropriate changes can be made as the case may be.
[0539] [Usage Example] FIG. 56 is a diagram showing the overall configuration of a suitable content supply system ex100 for realizing a content distribution service. The communication service providing area is divided into a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed radio stations in the illustrated example, are installed in each cell respectively.
[0540] In this content supply system ex100, devices such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 are connected to the Internet ex101 via an Internet service provider ex102 or a communication network ex104, and base stations ex106 to ex110. The content supply system ex100 may be connected by combining any of the above devices. In various implementations, the devices may be directly or indirectly connected to each other via a telephone network or short-range wireless etc. without passing through the base stations ex106 to ex110. Further, the streaming server ex103 may be connected to devices such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the Internet ex101 etc. Also, the streaming server ex103 may be connected to terminals etc. within a hot spot in an airplane ex117 via a satellite ex116.
[0541] Note that a wireless access point or a hot spot etc. may be used instead of the base stations ex106 to ex110. Also, the streaming server ex103 may be directly connected to the communication network ex104 without passing through the Internet ex101 or the Internet service provider ex102, or may be directly connected to the airplane ex117 without passing through the satellite ex116.
[0542] The camera ex113 is a device capable of still image shooting and video shooting such as a digital camera. Also, the smartphone ex115 is a smartphone device, a mobile phone, or a PHS (Personal Handyphone System) etc. corresponding to the mobile communication system methods called 2G, 3G, 3.9G, 4G, and in the future 5G.
[0543] The home appliance ex114 is a refrigerator or a device included in a household fuel cell cogeneration system etc.
[0544] In the content supply system ex100, a terminal having a shooting function is connected to the streaming server ex103 through the base station ex106 etc., enabling live distribution etc. In live distribution, the terminal (the computer ex111, the game machine ex112, the camera ex113, the home appliance ex114, the smartphone ex115, and the terminal etc. in the airplane ex117) may perform the encoding process described in each of the above embodiments on the still image or video content shot by the user using the terminal, may multiplex the video data obtained by encoding and the audio data obtained by encoding the sound corresponding to the video, and may transmit the obtained data to the streaming server ex103. That is, each terminal functions as an image encoding device according to one aspect of the present disclosure.
[0545] On the other hand, the streaming server ex103 stream-distributes the content data transmitted to the requested client. The client is the computer ex111, the game machine ex112, the camera ex113, the home appliance ex114, the smartphone ex115, or the terminal etc. in the airplane ex117 capable of decoding the encoded data. Each device that has received 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.
[0546] [Distributed processing] In addition, the streaming server ex103 may be a plurality of servers or a plurality of computers that distribute, process, record, and deliver data. For example, the streaming server ex103 may be realized by a CDN (Content Delivery Network), and content delivery may be realized by a network connecting a large number of edge servers distributed around the world and between edge servers. In a CDN, a physically closer edge server is dynamically assigned according to the client. Then, by caching and delivering the content to the edge server, the delay can be reduced. Also, when several types of errors occur or the communication state changes due to an increase in traffic, etc., the processing can be distributed among multiple edge servers, the delivery entity can be switched to another edge server, or the part of the network with a failure can be bypassed to continue the delivery, so high-speed and stable delivery can be realized.
[0547] In addition to just the distributed processing of the delivery itself, the encoding process of the captured data may be performed on each terminal, on the server side, or they may share the work. As an example, generally in the encoding process, the processing loop is performed twice. In the first loop, the complexity of the image in units of frames or scenes, or the amount of code is detected. Also, in the second loop, a process to improve the encoding efficiency while maintaining the image quality is performed. For example, by having the terminal perform the first encoding process and the server side that receives the content perform the second encoding process, it is possible to reduce the processing load on each terminal while improving the quality and efficiency of the content. In this case, if there is a request to receive and decode in almost real time, since the data encoded by the terminal in the first time can also be received and played back by other terminals, more flexible real-time delivery becomes possible.
[0548] As another example, cameras such as ex113 perform feature extraction from images, compress data related to the features as metadata, and transmit it to the server. The server performs compression according to the meaning of the image (or the importance of the content), such as judging the importance of an object from the features and switching the quantization accuracy. The feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction during re-compression on the server. Also, simple encoding such as VLC (Variable Length Coding) may be performed on the terminal, and encoding with a large processing load such as CABAC (Context Adaptive Binary Arithmetic Coding) may be performed on the server.
[0549] As yet another example, in a stadium, shopping mall, factory, etc., there may be a plurality of video data in which substantially the same scene is captured by a plurality of terminals. In this case, using the plurality of terminals that have performed shooting, and other terminals and servers that have not performed shooting as necessary, encoding processes are respectively assigned and distributed, for example, in units of GOP (Group of Picture), picture units, or tile units obtained by dividing a picture. This can reduce the delay and achieve more real-time performance.
[0550] Since the plurality of video data are of substantially the same scene, the server may manage and / or give instructions so that the video data captured by each terminal can refer to each other. Also, the encoded data from each terminal may be received by the server, and the reference relationship may be changed among the plurality of data, or the picture itself may be corrected or replaced and re-encoded. This can generate a stream with improved quality and efficiency for each piece of data.
[0551] Furthermore, the server may perform transcoding to change the encoding method of the video data and then distribute the video data. For example, the server may convert an MPEG-based encoding method to a VP-based (e.g., VP9) method, or convert H.264 to H.265.
[0552] In this way, the encoding process can be performed by the terminal or one or more servers. Therefore, hereinafter, descriptions such as "server" or "terminal" will be used as the entity performing the process. However, part or all of the processes performed by the server may be performed by the terminal, or part or all of the processes performed by the terminal may be performed by the server. Also, regarding these, the same applies to the decoding process.
[0553] [3D, Multi-angle] There is an increasing trend to integrate and utilize different scenes captured by a plurality of cameras ex113 and / or terminals such as smartphones ex115 that are substantially synchronized with each other, or images or videos of the same scene captured from different angles. The videos captured by each terminal are integrated based on the relative positional relationship between the terminals obtained separately or the regions where the feature points included in the videos match.
[0554] The server may not only encode a two-dimensional moving image, but also automatically encode a still image based on scene analysis of the moving image or at a time specified by the user, and transmit it to the receiving terminal. If the server can obtain the relative positional relationship between the shooting terminals, it can generate the three-dimensional shape of the scene based not only on the two-dimensional moving image, but also on the videos of the same scene captured from different angles. The server may separately encode the three-dimensional data generated by a point cloud or the like, or may select or reconstruct the video to be transmitted to the receiving terminal from the videos captured by a plurality of terminals based on the results of recognizing or tracking a person or an object using the three-dimensional data.
[0555] In this way, the user can arbitrarily select each video corresponding to each shooting terminal to enjoy the scene, or can enjoy the content obtained by cutting out the video from the selected viewpoint from the three-dimensional data reconstructed using a plurality of images or videos. Further, sounds are also collected from a plurality of different angles together with the video, and the server may multiplex the sound from a specific angle or space with the corresponding video and transmit the multiplexed video and sound.
[0556] In recent years, content that associates the real world with the virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become widespread. In the case of VR images, the server may create viewpoint images for the right eye and the left eye respectively, and perform encoding that allows reference between each viewpoint video by means of Multi-View Coding (MVC) or the like, or may perform encoding as separate streams without referring to each other. At the time of decoding the separate streams, they may be played back in synchronization with each other so that a virtual three-dimensional space is reproduced according to the user's viewpoint.
[0557] In the case of AR images, the server superimposes virtual object information in the virtual space on the camera information of the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device may acquire or hold virtual object information and three-dimensional data, generate a two-dimensional image according to the movement of the user's viewpoint, and create superimposed data by smoothly connecting them. Alternatively, the decoding device may transmit the movement of the user's viewpoint to the server in addition to the request for virtual object information. The server may create superimposed data in accordance with the movement of the viewpoint received from the three-dimensional data held by the server, encode the superimposed data, and distribute it to the decoding device. Note that the superimposed data has an α value indicating transparency in addition to RGB, and the server may encode it with the α value of the portion other than the object created from the three-dimensional data set to 0 or the like so that the portion is in a transparent state. Or, the server may set an RGB value of a predetermined value as the background like chroma key and generate data with the portion other than the object being the background color.
[0558] The decoding process of the data delivered in the same way may be performed on each client terminal, on the server side, or may be shared between them. As an example, a certain terminal may once send a reception request to the server, receive the content corresponding to the request on another terminal, perform the decoding process, and the decoded signal may be transmitted to a device having a display. By dispersing the processing and selecting appropriate content regardless of the performance of the communicable terminals themselves, it is possible to reproduce high-quality data. As another example, while receiving large-size image data on a TV or the like, only a part of the area such as tiles in which the picture is divided may be decoded and displayed on the personal terminal of the viewer. Thereby, while sharing the overall image, it is possible to check at hand the area of one's own field of responsibility or the area to be confirmed in more detail.
[0559] Under a situation where multiple short-range, medium-range, or long-range wireless communications inside and outside the house can be used, it may be possible to receive content seamlessly using a delivery system standard such as MPEG-DASH. The user may freely select a decoding device or display device such as the user's terminal and a display arranged inside and outside the house and switch them in real time. Also, decoding can be performed while switching the terminal to be decoded and the terminal to be displayed using the user's position information or the like. Thereby, while the user is moving to the destination, it becomes possible to map and display information on a part of the wall surface or the ground of the adjacent building in which the displayable device is embedded. Also, based on the ease of access to the encoded data on the network, such as the encoded data being cached in a server that can be accessed from the receiving terminal in a short time, or being copied to an edge server in a content delivery service, it is also possible to switch the bit rate of the received data.
[0560] [Scalable Encoding] Regarding content switching, an explanation will be given using a scalable stream compressed and encoded by applying the moving image encoding method shown in each of the above embodiments and shown in FIG. 57. The server may have a plurality of streams with the same content but different qualities as individual streams, but it may also be configured to switch content by taking advantage of the characteristics of a temporally / spatially scalable stream realized by encoding in layers as shown in the figure. That is, by determining which layer to decode according to internal factors such as performance and external factors such as the state of the communication bandwidth on the decoding side, the decoding side can freely switch between low-resolution content and high-resolution content for decoding. For example, when a user wants to watch the continuation of a video that was being viewed on smartphone ex115 while moving, on a device such as an Internet TV after returning home, for example, the device only needs to decode the same stream to a different layer, so the burden on the server side can be reduced.
[0561] Furthermore, as described above, pictures are encoded for each layer. In addition to the configuration where scalability is realized in the enhancement layer above the base layer, the enhancement layer may include meta information based on statistical information of the image, etc. The decoding side may generate high-quality content by super-resolving the pictures of the base layer based on the meta information. Super-resolution may improve the signal-to-noise ratio while maintaining and / or expanding the resolution. The meta information includes information for specifying linear or non-linear filter coefficients for use in super-resolution processing, or information for specifying parameter values in filter processing, machine learning, or least-squares operation used in super-resolution processing.
[0562] Alternatively, a configuration may be provided in which a picture is divided into tiles or the like according to the meaning of an object or the like in the image. The decoding side decodes only a part of the area by selecting the tile to be decoded. Further, by storing the attributes of the object (such as a person, a car, a ball, etc.) and the position in the video (such as the coordinate position in the same image) as meta information, the decoding side can specify the position of the desired object based on the meta information and determine the tile including the object. For example, as shown in FIG. 58, the meta information may be stored using a data storage structure different from the pixel 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.
[0563] The meta information may be stored in a unit composed of a plurality of pictures, such as a stream, a sequence, or a random access unit. The decoding side can obtain the time when a specific person appears in the video, and by combining the picture unit information and the time information, can specify the picture in which the object exists and determine the position of the object in the picture.
[0564] [Optimization of Web Page] FIG. 59 is a diagram showing an example of a display screen of a web page on a computer ex111 or the like. FIG. 60 is a diagram showing an example of a display screen of a web page on a smartphone ex115 or the like. As shown in FIGS. 59 and 60, a web page may include a plurality of link images that are links to image contents, and the appearance thereof may vary depending on the device for viewing. When a plurality of link images are visible on the screen, until the user explicitly selects a link image, or until the link image approaches the vicinity of the center of the screen or the entire link image enters the screen, the display device (decoding device) may display a still image or an I picture that each content has as a link image, or may display a video like a gif animation using a plurality of still images or I pictures, etc., or may receive only the base layer, decode and display the video.
[0565] When a user selects a linked image, the display device performs decoding with the base layer having the highest priority. If there is information indicating that the HTML constituting the web page is scalable content, the display device may decode up to the enhancement layer. Further, in order to ensure real-time performance, before the selection or when the communication bandwidth is very strict, the display device can reduce the delay (delay from the start of content decoding to the start of display) between the decoding time and the display time of the leading picture by decoding and displaying only forward-reference pictures (I pictures, P pictures, B pictures with only forward reference). Furthermore, the display device may deliberately ignore the reference relationship of pictures, roughly decode all B pictures and P pictures with forward reference, and perform normal decoding as the received pictures increase over time.
[0566] [Autonomous driving] Also, when transmitting and receiving still image or video data such as two-dimensional or three-dimensional map information for the autonomous driving or driving support of a vehicle, in addition to the image data belonging to one or more layers, the receiving terminal may also receive weather or construction information, etc. as meta information, and decode them in association with each other. Note that the meta information may belong to a layer or may simply be multiplexed with the image data.
[0567] In this case, since vehicles, drones, airplanes, etc. including the receiving terminal move, the receiving terminal can realize seamless reception and decoding by transmitting the position information of the receiving terminal while switching between base stations ex106 to ex110. Also, the receiving terminal can dynamically switch how much meta information to receive or how much to update the map information according to the user's selection, the user's situation, and / or the state of the communication bandwidth.
[0568] In the content supply system ex100, the client can receive, decode, and play back the encoded information transmitted by the user in real time.
[0569] [Delivery of personal content] In addition, in the content supply system ex100, not only high-quality and long-duration content by video distributors but also unicast or multicast distribution of low-quality and short-duration content by individuals is possible. It is considered that such individual content will increase in the future. In order to make individual content better, the server may perform encoding processing after performing editing processing. This can be realized, for example, using the following configuration.
[0570] At the time of shooting in real time or accumulating and after shooting, the server performs recognition processing such as shooting error, scene search, semantic analysis, and object detection from the original image data or encoded data. Then, based on the recognition result, 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 the edges of objects, or changes the color tone. The server encodes the edited data based on the editing result. It is also known that if the shooting time is too long, the viewing rate will decrease. The server may automatically clip not only less important scenes but also scenes with little movement within a specific time range according to the shooting time so that the content is within that range, based on the image processing result. Or, the server may generate a digest based on the result of semantic analysis of the scene and encode it.
[0571] Personal content may contain elements that, as they are, would infringe copyright, moral rights, or portrait rights, etc., and there may be inconvenient situations for individuals, such as the sharing scope exceeding the intended scope. Therefore, for example, the server may deliberately change the image to make the face of a person in the peripheral part of the screen or the inside of a house out of focus and then encode it. Furthermore, the server may recognize whether a face of a person different from the pre-registered person is reflected in the image to be encoded, and if so, perform processing such as applying a mosaic to the face part. Or, as pre-processing or post-processing of encoding, the user may specify a person or background area that the user wants to process the image from the perspective of copyright, etc. The server may perform processing such as replacing the specified area with another video or blurring the focus. In the case of a person, the person can be tracked in the moving image, and the video of the face part of the person can be replaced.
[0572] Since the viewing of personal content with a small data volume has a strong requirement for real-time performance, depending on the bandwidth, the decoding device first receives the base layer with the highest priority and decodes and plays it. During this time, the decoding device may receive the enhancement layer and, when the playback is looped or played more than twice, play a high-quality video including the enhancement layer. For a stream with scalable encoding like this, it is a rough video when not selected or at the beginning of viewing, but it can provide an experience where the stream gradually becomes smarter and the image quality improves. In addition to scalable encoding, a similar experience can be provided even if a rough stream played for the first time and a second stream encoded with reference to the first video are configured as one stream.
[0573] [Other implementation and application examples] Also, these encoding or decoding processes are generally processed in the LSIex500 possessed by each terminal. The LSI (large scale integration circuitry)ex500 (see FIG. 56) may be a one-chip configuration or a configuration consisting of multiple chips. Note that software for video encoding or decoding may be incorporated into some recording medium (such as a CD-ROM, flexible disk, or hard disk) readable by a computer ex111 or the like, and encoding or decoding processing may be performed using that software. Further, when the smartphone ex115 has a camera, video data acquired by the camera may be transmitted. The video data at this time is data encoded by the LSIex500 possessed by the smartphone ex115.
[0574] Note that the LSIex500 may be configured to download and activate application software. In this case, the terminal first determines whether the terminal supports the encoding method of the content or has the ability to execute a specific service. If the terminal does not support the encoding method of the content or does not have the ability to execute a specific service, the terminal downloads a codec or application software and then acquires and plays the content.
[0575] Also, not limited to the content supply system ex100 via the Internet ex101, at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) of the above embodiments can be incorporated into a digital broadcast system. Since multiplexed data in which video and audio are multiplexed is carried on a broadcast radio wave using a satellite or the like for transmission and reception, there is a difference in that it is more suitable for multicast compared to the unicast-friendly configuration of the content supply system ex100, but similar applications are possible for encoding and decoding processes.
[0576] [Hardware Configuration] FIG. 61 is a diagram showing further details of the smartphone ex115 shown in FIG. 56. Further, FIG. 62 is a diagram showing a configuration example 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 data obtained by decoding the video captured by the camera unit ex465 and the video received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting audio or sound, an audio input unit ex456 such as a microphone for inputting audio, a memory unit ex467 capable of storing the captured video or still images, recorded audio, received video or still images, encoded data such as emails, or decoded data, and a slot unit ex464 which is an interface unit between the SIM ex468 for identifying the user and authenticating access to various data including the network. Note that an external memory may be used instead of the memory unit ex467.
[0577] A main control unit ex460 that comprehensively controls the display unit ex458, the operation unit ex466, etc., a power supply circuit unit ex461, an operation input control unit ex462, a video signal processing unit ex455, a camera interface unit ex463, a display control unit ex459, a modulation / demodulation unit ex452, a multiplexing / demultiplexing unit ex453, an audio signal processing unit ex454, a slot unit ex464, and a memory unit ex467 are connected via a synchronization bus ex470.
[0578] When the power key is turned on by the user's operation, the power supply circuit unit ex461 activates the smartphone ex115 to an operable state and supplies power to each unit from the battery pack.
[0579] The smartphone ex115 performs processes such as calls and data communication based on the control of the main control unit ex460 having a CPU, ROM, RAM, etc. During a call, the voice signal picked up by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454, subjected to spread spectrum processing by the modulation / demodulation unit ex452, and subjected to digital-to-analog conversion processing and frequency conversion processing by the transmission / reception unit ex451, and the resulting signal is transmitted via the antenna ex450. Also, received data is amplified and subjected to frequency conversion processing and analog-to-digital conversion processing, subjected to inverse spread spectrum processing by the modulation / demodulation unit ex452, converted into an analog voice signal by the voice signal processing unit ex454, and then output from the voice output unit ex457. In the data communication mode, text, still images, or video data is sent to the main control unit ex460 via the operation input control unit ex462 based on operations such as those of the operation unit ex466 of the main body unit. Similar transmission and reception processes are performed. When transmitting video, still images, or video and audio in the data communication mode, the video signal processing unit ex455 compresses and encodes the video signal stored in the memory unit ex467 or input from the camera unit ex465 by the moving image encoding method shown in each of the above embodiments, and sends the encoded video data to the multiplexing / demultiplexing unit ex453. The voice signal processing unit ex454 encodes the voice signal picked up by the voice input unit ex456 while the camera unit ex465 is capturing video or still images, and sends the encoded voice data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and the encoded voice data in a predetermined manner, performs modulation processing and conversion processing by the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, and transmits it via the antenna ex450.
[0580] When receiving video attached to an email or chat, or video linked to a web page, etc., in order to decode the multiplexed data received via the antenna ex450, the multiplexing / demultiplexing unit ex453 separates the multiplexed data into a bit stream of video data and a bit stream of audio data by separating the multiplexed data, supplies the video data encoded via the synchronization bus ex470 to the video signal processing unit ex455, and supplies the encoded audio data to the audio signal processing unit ex454. The video signal processing unit ex455 decodes the video signal by a video decoding method corresponding to the moving image encoding method shown in each of the above embodiments, and the video or still image included in the linked moving image file is displayed from the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal, and the audio is output from the audio output unit ex457. Since real-time streaming is becoming increasingly popular, depending on the user's situation, it may not be socially appropriate to play the audio. Therefore, as an initial value, it is desirable to have a configuration that plays only the video data without playing the audio signal, and the audio may be played synchronously only when the user performs an operation such as clicking on the video data.
[0581] Also, although the smartphone ex115 has been described as an example here, as the terminal, in addition to the transceiver type terminal having both an encoder and a decoder, there are three other implementation forms: a transmitting terminal having only an encoder, and a receiving terminal having only a decoder. In the digital broadcast system, it has been described that multiplexed data in which audio data is multiplexed with video data is received or transmitted. However, in the multiplexed data, in addition to the audio data, character data related to the video, etc. may be multiplexed. Also, instead of the multiplexed data, the video data itself may be received or transmitted.
[0582] Although the main control unit ex460 including the CPU has been described as controlling the encoding or decoding process, many types of terminals are often equipped with a GPU. Therefore, a configuration in which a wide area is processed collectively by taking advantage of the performance of the GPU using a memory shared by the CPU and the GPU or a memory whose address is managed so as to be commonly used may be adopted. Thereby, the encoding time can be shortened, real-time performance can be ensured, and low latency can be realized. In particular, it is efficient to perform the processes of motion search, deblocking filter, SAO (Sample Adaptive Offset), and transform / quantization in units such as pictures using the GPU instead of the CPU.
Industrial Applicability
[0583] The present disclosure can be used, for example, in a television receiver, a digital video recorder, a car navigation system, a mobile phone, a digital camera, a digital video camera, a video conferencing system, or an electronic mirror.
Explanation of Signs
[0584] 100 Encoding device 102 Division unit 104 Subtraction unit 106 Transformation unit 108 Quantization unit 110 Entropy encoding unit 112, 204 Inverse quantization unit 114, 206 Inverse transformation unit 116, 208 Addition unit 118, 210 Block memory 120, 212 Loop filter unit 122, 214 Frame memory 124, 216 Intra prediction unit (intra-frame prediction unit) 126, 218 Inter prediction unit (inter-frame prediction unit) 128, 220 Prediction control unit 160, 260 Circuit 162, 262 Memory 200 Decoding device 202 Entropy decoding unit
Claims
1. Memory, and a circuit coupled to the memory, The circuit comprises: selecting a first table from a plurality of tables each used for correcting a motion vector of a block to be coded included in an image and in which an index is associated with a correction value; writing a parameter indicating a first index of a plurality of indexes in the first table into a bitstream; Identifying a first correction value associated with the first index; correcting the motion vector in a predetermined direction by the identified first correction value; encoding the block to be encoded based on the corrected motion vector; the plurality of tables each have a correction value with a different interval between indexes; In each of the plurality of tables, a correction value having a smaller value among the correction values is assigned to an index having a smaller value among the plurality of indexes. Encoding device.
2. Memory, and a circuit coupled to the memory, The circuit comprises: selecting a first table from a plurality of tables each used for correcting a motion vector of a block to be decoded included in an image and in which an index is associated with a correction value; analyzing a parameter indicative of a first index of a plurality of indexes in the first table; Identifying a first correction value associated with the first index; correcting the motion vector in a predetermined direction by the identified first correction value; Decoding the block to be decoded based on the corrected motion vector; the plurality of tables each have a correction value with a different interval between indexes; In each of the plurality of tables, a correction value having a smaller value among the correction values is assigned to an index having a smaller value among the plurality of indexes. Decryption device.
Citation Information
Patent Citations
Video encoding device and video decoding device using high precision skip encoding, and method thereof
JP2017537529A
JPP6950095B
JPP7187640B
JPP7506729B