ENCODER, DECODER, ENCODING METHOD AND DECODING METHOD
Patent Information
- Authority / Receiving Office
- MX · MX
- Patent Type
- Patents
- Current Assignee / Owner
- PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
- Filing Date
- 2020-10-28
- Publication Date
- 2026-05-19
AI Technical Summary
Conventional video encoding devices face increased processing complexity due to secondary transform processing applied to transform coefficients obtained after linear transform processing on prediction residual signals, particularly with multiple block sizes, leading to inefficient processing.
An encoding device that applies a quadratic transform of a common block size to transform coefficients, selecting an appropriate transformation base from candidates based on block size, reducing processing complexity by optimizing secondary transform processing.
The solution significantly reduces processing requirements compared to conventional methods by selecting a more appropriate transformation base and applying it uniformly across blocks, thereby minimizing processing overhead.
Smart Images

Figure MX434341B0
Abstract
Description
Encoding device, decoding device, encoding method, and decoding method
[0001] The present disclosure relates to an encoding device or the like that encodes a moving image including a plurality of pictures.
[0002] Conventionally, H.265, also known as HEVC (High Efficiency Video Coding), exists as a standard for encoding moving images (Non-Patent Document 1).
[0003] H. 265 (ISO / IEC 23008-2 HEVC) / HEVC (High Efficiency Video Coding)
[0004] However, there is a problem that the amount of processing required increases in the secondary transform process that an encoding device or the like applies to transform coefficients obtained by applying the primary transform process to a prediction residual signal.
[0005] Therefore, the present disclosure provides an encoding device, etc. that can reduce the amount of processing compared to conventional methods in a secondary transformation process that the encoding device, etc. further applies to transformation coefficients that have been subjected to a primary transformation process on a prediction residual signal.
[0006] An encoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform a transformation process on a transform coefficient obtained by applying a linear transform to a prediction residual signal in a target block among a plurality of blocks of a plurality of block sizes, and then applies a secondary transform of a block size common to the plurality of blocks, wherein the secondary transform of the common block size is composed of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
[0007] These comprehensive or specific aspects may be realized as a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be realized as any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
[0008] An encoding device or the like according to an aspect of the present disclosure can reduce the amount of processing compared to conventional methods in a secondary transform that is further applied to transform coefficients obtained by applying a primary transform to a prediction residual signal.
[0009] FIG. 1 is a block diagram showing a functional configuration of an encoding device according to an embodiment. FIG. 2 is a flowchart showing an example of an overall encoding process performed by the encoding device. FIG. 3 is a diagram showing an example of block division. FIG. 4A is a diagram showing an example of a slice configuration. FIG. 4B is a diagram showing an example of a tile configuration. FIG. 5A is a table showing transform basis functions corresponding to each transform type. FIG. 5B is a diagram showing a Spatially Varying Transform (SVT). FIG. 6A is a diagram showing an example of a filter shape used in an adaptive loop filter (ALF). FIG. 6B is a diagram showing another example of a filter shape used in the ALF. FIG. 6C is a diagram showing another example of a filter shape used in the ALF. FIG. 7 is a block diagram showing an example of the detailed configuration of a loop filter unit functioning as a DBF. FIG. 8 is a diagram showing an example of a deblocking filter having filter characteristics symmetrical with respect to block boundaries. FIG. 9 is a diagram for explaining block boundaries where deblocking filtering is performed. FIG. 10 is a diagram showing an example of a Bs value. FIG. 11 is a diagram showing an example of processing performed in a prediction processing unit of an encoding device. FIG. 12 is a diagram showing another example of processing performed in a prediction processing unit of an encoding device. FIG. 13 is a diagram showing another example of processing performed in a prediction processing unit of an encoding device. FIG. 14 is a diagram showing an example of 67 intra prediction modes in intra prediction. FIG. 15 is a flowchart showing the basic processing flow of inter prediction. FIG. 16 is a flowchart showing an example of motion vector derivation. FIG. 17 is a flowchart showing another example of motion vector derivation. FIG. 18 is a flowchart showing another example of motion vector derivation. FIG. 19 is a flowchart showing an example of inter prediction in normal inter mode. FIG. 20 is a flowchart showing an example of inter prediction in merge mode. FIG. 21 is a diagram explaining an example of motion vector derivation processing in merge mode. FIG. 22 is a flowchart showing an example of frame rate up conversion (FRUC). FIG. 23 is a diagram explaining an example of pattern matching (bilateral matching) between two blocks along a motion trajectory.FIG. 24 is a diagram illustrating an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. FIG. 25A is a diagram illustrating an example of derivation of a motion vector for each sub-block based on motion vectors of multiple neighboring blocks. FIG. 25B is a diagram illustrating an example of derivation of a motion vector for each sub-block in an affine mode having three control points. FIG. 26A is a conceptual diagram illustrating an affine merge mode. FIG. 26B is a conceptual diagram illustrating an affine merge mode having two control points. FIG. 26C is a conceptual diagram illustrating an affine merge mode having three control points. FIG. 27 is a flowchart illustrating an example of processing in the affine merge mode. FIG. 28A is a diagram illustrating an affine inter mode having two control points. FIG. 28B is a diagram illustrating an affine inter mode having three control points. FIG. 29 is a flowchart illustrating an example of processing in the affine inter mode. FIG. 30A is a diagram illustrating an affine inter mode in which a current block has three control points and a neighboring block has two control points.
[0033] Fig. 30B is a diagram illustrating an affine inter mode in which a current block has two control points and an adjacent block has three control points. Fig. 31A is a diagram illustrating the relationship between merge mode and DMVR (dynamic motion vector refreshing). Fig. 31B is a conceptual diagram illustrating an example of DMVR processing. Fig. 32 is a flowchart illustrating an example of predicted image generation. Fig. 33 is a flowchart illustrating another example of predicted image generation. Fig. 34 is a flowchart illustrating yet another example of predicted image generation. Fig. 35 is a flowchart illustrating an example of predicted image correction processing using OBMC (overlapped block motion compensation) processing. Fig. 36 is a conceptual diagram illustrating an example of predicted image correction processing using OBMC processing. Fig. 37 is a diagram illustrating generation of predicted images of two triangles. Fig. 38 is a diagram illustrating a model assuming uniform linear motion.FIG. 39 is a diagram illustrating an example of a predicted image generation method using luminance correction processing by LIC (local illumination compensation) processing. FIG. 40 is a block diagram illustrating an implementation example of an encoding device. FIG. 41 is a block diagram illustrating the functional configuration of a decoding device according to an embodiment. FIG. 42 is a flowchart illustrating an example of overall decoding processing by a decoding device. FIG. 43 is a diagram illustrating an example of processing performed in a prediction processing unit of a decoding device. FIG. 44 is a diagram illustrating another example of processing performed in a prediction processing unit of a decoding device. FIG. 45 is a flowchart illustrating an example of inter prediction in normal inter mode in a decoding device. FIG. 46 is a block diagram illustrating an implementation example of a decoding device. FIG. 47 is a diagram illustrating secondary conversion processing according to an embodiment. FIG. 48 is a flowchart illustrating a processing procedure in a conversion unit of an encoding device according to an embodiment. FIG. 49A is a table illustrating an example of the amount of processing required for primary conversion processing of an entire CTU according to an embodiment. FIG. 49B is a table illustrating an example of the amount of processing required for secondary conversion processing of an entire CTU according to an embodiment. FIG. 50 is a table illustrating a first example according to an embodiment. FIG. 51 is a table showing a second example in the embodiment. FIG. 52 is a table showing a third example in the embodiment. FIG. 53 is a table showing a fourth example in the embodiment. FIG. 54 is a flowchart showing an example of operation of an encoding device in the embodiment. FIG. 55 is a flowchart showing an example of operation of a decoding device in the embodiment. FIG. 56 is a diagram showing the overall configuration of a content supply system that realizes a content distribution service. FIG. 57 is a diagram showing an example of an encoding structure for scalable encoding. FIG. 58 is a diagram showing an example of an encoding structure for scalable encoding. FIG. 59 is a diagram showing an example of a display screen of a web page. FIG. 60 is a diagram showing an example of a display screen of a web page. FIG. 61 is a diagram showing an example of a smartphone. FIG. 62 is a block diagram showing an example of the configuration of a smartphone.
[0010] (Findings forming the basis of the present disclosure) For example, an encoding device or the like may perform a secondary transform, such as an orthogonal transform, on transform coefficients obtained by applying a primary transform to a prediction residual signal. In this case, the encoding device or the like may apply a secondary transform of a plurality of block sizes to the transform coefficients obtained by applying the primary transform to the prediction residual signal.
[0011] Therefore, for example, an encoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform a transformation process in which a transform coefficient obtained by applying a linear transform to a prediction residual signal in a target block among a plurality of blocks of a plurality of block sizes is further transformed by applying a secondary transform of a block size common to the plurality of blocks, and the secondary transform of the common block size is composed of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
[0012] This allows the encoding device to select more appropriate candidate transform bases than before when applying secondary transform of a common block size to a target block, and to apply the selected candidate transform bases to the target block. As a result, the encoding device can reduce the amount of code in the secondary transform process more than before.
[0013] Also, for example, in the encoding device according to one aspect of the present disclosure, the transform base of the quadratic transform of the common block size is a 4x4 square.
[0014] This allows the encoding device to select a transform base of the smallest size when applying a secondary transform of a common block size to a current block.
[0015] Also, for example, in the encoding device according to one aspect of the present disclosure, the transform base of the quadratic transform of the common block size is an 8x8 square.
[0016] This allows the decoding device to select a transform base of an appropriate size when applying a secondary transform of a common block size to a current block.
[0017] Also, for example, an encoding device according to one aspect of the present disclosure assigns a common candidate for the transformation base to the candidate group in the secondary transformation for the processing target blocks of some of the multiple block sizes.
[0018] This allows the encoding device to reduce the amount of processing compared to conventional methods. For example, the encoding device can reduce the amount of processing by assigning a common base to a 16x16 block to be processed and a 32x32 block to be processed and performing secondary transformation.
[0019] Also, for example, an encoding device according to one aspect of the present disclosure determines not to apply the secondary transformation to the transform coefficients when the block size of the block to be processed is equal to or smaller than a predetermined block size, and determines to apply the secondary transformation to the transform coefficients when the block size of the block to be processed is larger than the predetermined block size.
[0020] As a result, the encoding device can reduce the amount of processing in the transform process compared to conventional methods by not performing secondary transform when the block to be processed has a block size that requires a large amount of processing in secondary transform.
[0021] Also, for example, in the encoding device according to one aspect of the present disclosure, the predetermined block size is a 4x4 square.
[0022] As a result, the encoding device can reduce the amount of processing in the transformation process compared to conventional methods by not performing secondary transformation when the block to be transformed has a block size of 4x4, which requires a large amount of processing in secondary transformation.
[0023] Also, for example, in the encoding device according to one aspect of the present disclosure, the predetermined block size is a 4x8 or 8x4 rectangle.
[0024] As a result, the encoding device can reduce the amount of processing in the transformation process compared to conventional methods by not performing secondary transformation when the block to be transformed has a block size of 4x8 or 8x4, which requires a large amount of processing in the secondary transformation.
[0025] Also, for example, in an encoding device according to one aspect of the present disclosure, the predetermined block size is equal to the smallest block size among one or more block sizes selectable in the secondary transform.
[0026] As a result, the encoding device can reduce the amount of processing in the conversion process compared to conventional methods by not performing secondary conversion when the block to be processed on which the conversion process is performed is the block size that requires the greatest amount of processing in the secondary conversion among the sizes selectable by the encoding device.
[0027] Also, for example, a decoding device according to one aspect of the present disclosure includes a circuit and a memory, and the circuit uses the memory to perform an inverse transform process in which a linear transform is applied to transform coefficients obtained by applying a secondary transform of a block size common to a transform coefficient signal to a target block among a plurality of blocks of a plurality of block sizes, and the secondary transform of the common block size is composed of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
[0028] This allows the decoding device to select more appropriate candidate transform bases than before when applying secondary transform of a common block size to a target block, and to apply the selected candidate transform bases to the target block. As a result, the decoding device can reduce the amount of code in the secondary transform process more than before.
[0029] Also, for example, in a decoding device according to one aspect of the present disclosure, the transform base of the quadratic transform of the common block size is a 4x4 square.
[0030] This allows the decoding device to select a transform base of the smallest size when applying a secondary transform of a common block size to a current block.
[0031] Also, for example, in a decoding device according to one aspect of the present disclosure, the transform base of the quadratic transform of the common block size is an 8x8 square.
[0032] This allows the decoding device to select a transform base of an appropriate size when applying a secondary transform of a common block size to a current block.
[0033] Also, for example, a decoding device according to one aspect of the present disclosure assigns a common candidate for the transformation base to the candidate group in the secondary transformation for the processing target blocks of some of the multiple block sizes.
[0034] This allows the decoding device to reduce the amount of processing compared to conventional methods. For example, the decoding device can reduce the amount of processing by assigning a common base to a 16×16 block to be processed and a 32×32 block to be processed and performing secondary transformation.
[0035] Also, for example, a decoding device according to one aspect of the present disclosure determines not to apply the secondary transformation to the transform coefficients when the block size of the block to be processed is equal to or smaller than a predetermined block size, and determines to apply the secondary transformation to the transform coefficients when the block size of the block to be processed is larger than the predetermined block size.
[0036] As a result, the decoding device can reduce the amount of processing in the conversion process compared to conventional methods by not performing secondary conversion when the block to be processed on which the conversion process is performed is of a block size that requires a large amount of processing in the secondary conversion.
[0037] Also, for example, in a decoding device according to one aspect of the present disclosure, the predetermined block size is a 4x4 square.
[0038] As a result, the decoding device can reduce the amount of processing in the transformation process compared to conventional methods by not performing secondary transformation when the block to be transformed has a block size of 4x4, which requires a large amount of processing in secondary transformation.
[0039] Also, for example, in a decoding device according to one aspect of the present disclosure, the predetermined block size is a 4x8 or 8x4 rectangle.
[0040] As a result, the decoding device can reduce the amount of processing in the transformation process compared to conventional methods by not performing secondary transformation when the block to be processed on which the transformation process is performed has a block size of 4x8 or 8x4, which requires a large amount of processing in the secondary transformation.
[0041] Also, for example, in a decoding device according to one aspect of the present disclosure, the predetermined block size is equal to the smallest block size among one or more block sizes selectable in the secondary transform.
[0042] This allows the decoding device to reduce the amount of processing in the conversion process compared to conventional methods by not performing secondary conversion when the block size that requires the most processing in secondary conversion is one of the sizes that the decoding device can select.
[0043] Furthermore, for example, an encoding method according to one aspect of the present disclosure performs a transform process on a transform coefficient obtained by applying a linear transform to a prediction residual signal in a target block among multiple blocks of multiple block sizes, and then applies a secondary transform of a block size common to the multiple blocks, wherein the secondary transform of the common block size is composed of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
[0044] As a result, the encoding method can achieve the same effects as the encoding device.
[0045] Furthermore, for example, a decoding method according to one aspect of the present disclosure performs an inverse transform process in which a transform coefficient signal obtained by applying a secondary transform of a block size common to the plurality of blocks to a target block of a plurality of blocks of a plurality of block sizes is subjected to a linear transform, and the secondary transform of the common block size is composed of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
[0046] As a result, the decoding method can achieve the same effects as the above-described decoding device.
[0047] Also, for example, an encoding device according to one aspect of the present disclosure may include a division unit, an intra prediction unit, an inter prediction unit, a loop filter unit, a transform unit, a quantization unit, and an entropy encoding unit.
[0048] The division unit may divide a picture into a plurality of blocks. The intra prediction unit may perform intra prediction on a block included in the plurality of blocks. The inter prediction unit may perform inter prediction on the block. The transformation unit may generate transformation coefficients by transforming a prediction error between a predicted image obtained by the intra prediction or the inter prediction and an original image. The quantization unit may quantize the transformation coefficients to generate quantized coefficients. The entropy coding unit may code the quantized coefficients to generate a coded bitstream. The loop filter unit may apply a filter to a reconstructed image of the block.
[0049] Furthermore, for example, the encoding device may be an encoding device that encodes a moving image including a plurality of pictures.
[0050] The transform unit then performs a transform process on the transform coefficients obtained by applying a linear transform to the prediction residual signal in a target block among multiple blocks of multiple block sizes, in which the transform unit further applies a secondary transform of a block size common to the multiple blocks, and the secondary transform of the common block size may be composed of one or more candidates for a transform base, and one of the transform bases may be selected from a group of candidates that differ depending on the block size of the target block.
[0051] Furthermore, for example, a decoding device according to one aspect of the present disclosure may include an entropy decoding unit, an inverse quantization unit, an inverse transform unit, an intra prediction unit, an inter prediction unit, and a loop filter unit.
[0052] The entropy decoding unit may decode quantized coefficients of blocks in a picture from the coded bitstream. The inverse quantization unit may inverse quantize the quantized coefficients to obtain transform coefficients. The inverse transform unit may inverse transform the transform coefficients to obtain prediction errors. The intra prediction unit may perform intra prediction on the blocks. The inter prediction unit may perform inter prediction on the blocks. The filter unit may apply a filter to a reconstructed image generated using a predicted image obtained by the intra prediction or the inter prediction and the prediction error.
[0053] Furthermore, for example, the decoding device may be a decoding device that decodes a video including a plurality of pictures.
[0054] The inverse transform unit then performs an inverse transform process in which a primary transform is applied to the transform coefficients of a target block among a plurality of blocks of a plurality of block sizes, the transform coefficient signals of which are subjected to a secondary transform of a block size common to the plurality of blocks, and the secondary transform of the common block size may be composed of one or more candidates for a transform base, and one of the transform bases may be selected from a group of candidates that differ depending on the block size of the target block.
[0055] Furthermore, these comprehensive or specific aspects may be realized as a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be realized as any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
[0056] Hereinafter, embodiments will be described in detail with reference to the drawings. Note that the embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, the arrangement and connection of the components, steps, and the relationship and order of the steps shown in the following embodiments are merely examples and are not intended to limit the scope of the claims.
[0057] Below, embodiments of an encoding device and a decoding device will be described. The embodiments are examples of encoding devices and decoding devices to which the processes and / or configurations described in each aspect of the present disclosure can be applied. The processes and / or configurations can also be implemented in encoding devices and decoding devices different from the embodiments. For example, with regard to the processes and / or configurations applied to the embodiments, any of the following may be implemented.
[0058] (1) Any of the multiple components of the encoding device or decoding device of the embodiments described in each aspect of the present disclosure may be replaced or combined with other components described in any of the aspects of the present disclosure.
[0059] (2) In the encoding device or decoding device according to the embodiment, the functions or processes performed by some of the components of the encoding device or decoding device may be changed in any way, such as by adding, replacing, or deleting a function or process. For example, any function or process may be replaced with or combined with another function or process described in any of the aspects of the present disclosure.
[0060] (3) In the method implemented by the encoding device or decoding device according to the embodiment, some of the processes included in the method may be arbitrarily modified, such as by addition, replacement, deletion, etc. For example, any process in the method may be replaced with or combined with another process described in any of the aspects of the present disclosure.
[0061] (4) Some of the components constituting the encoding device or decoding device of the embodiment may be combined with components described in any of the aspects of the present disclosure, or may be combined with components having some of the functions described in any of the aspects of the present disclosure, or may be combined with components that perform some of the processing performed by the components described in each aspect of the present disclosure.
[0062] (5) A component having part of the functionality of the encoding device or decoding device of an embodiment, or a component that performs part of the processing of the encoding device or decoding device of an embodiment, may be combined or replaced with a component described in any of the aspects of the present disclosure, a component having part of the functionality described in any of the aspects of the present disclosure, or a component that performs part of the processing described in any of the aspects of the present disclosure.
[0063] (6) In the method implemented by the encoding device or decoding device of the embodiment, any of the multiple processes included in the method may be replaced or combined with the process described in any of the aspects of the present disclosure or any similar process.
[0064] (7) Some of the processes included in the method implemented by the encoding device or decoding device of the embodiment may be combined with the processes described in any of the aspects of the present disclosure.
[0065] (8) The implementation of the processes and / or configurations described in each aspect of the present disclosure is not limited to the encoding device or decoding device of the embodiments. For example, the processes and / or configurations may be implemented in a device used for a purpose other than video encoding or video decoding disclosed in the embodiments.
[0066] (Embodiment 1) [Encoding Device] First, a coding device according to this embodiment will be described. Fig. 1 is a block diagram showing the functional configuration of a coding device 100 according to this embodiment. The coding device 100 is a moving image coding device that codes moving images on a block-by-block basis.
[0067] As shown in FIG. 1, the encoding device 100 is a device that encodes an image in units of blocks, and includes a division unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.
[0068] The encoding device 100 is realized by, for example, a general-purpose processor and memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the division unit 102, subtraction unit 104, transformation unit 106, quantization unit 108, entropy coding unit 110, inverse quantization unit 112, inverse transformation unit 114, addition unit 116, loop filter unit 120, intra prediction unit 124, inter prediction unit 126, and prediction control unit 128. Alternatively, the encoding device 100 may be realized as one or more dedicated electronic circuits corresponding to the division unit 102, subtraction unit 104, transformation unit 106, quantization unit 108, entropy coding unit 110, inverse quantization unit 112, inverse transformation unit 114, addition unit 116, loop filter unit 120, intra prediction unit 124, inter prediction unit 126, and prediction control unit 128.
[0069] Below, the overall processing flow of the encoding device 100 will be explained, and then each component included in the encoding device 100 will be explained.
[0070] [Overall Flow of Encoding Process] FIG. 2 is a flowchart showing an example of the overall encoding process performed by the encoding device 100.
[0071] First, the division unit 102 of the encoding device 100 divides each picture included in an input image, which is a moving image, into a plurality of fixed-size blocks (128 x 128 pixels) (step Sa_1). Then, the division unit 102 selects a division pattern (also called a block shape) for the fixed-size blocks (step Sa_2). That is, the division unit 102 further divides the fixed-size block into a plurality of blocks that constitute the selected division pattern. Then, the encoding device 100 performs the processes of steps Sa_3 to Sa_9 on each of the plurality of blocks (i.e., the block to be encoded).
[0072] That is, the prediction processing unit consisting 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 called a prediction block) of the block to be coded (also called a current block) (step Sa_3).
[0073] Next, the subtraction unit 104 generates a difference between the current block to be coded and the predicted block as a prediction residual (also called a difference block) (step Sa_4).
[0074] Next, the transform unit 106 and the quantization unit 108 perform transform and quantization on the difference block to generate a plurality of quantized coefficients (step Sa_5). Note that a block made up of a plurality of quantized coefficients is also called a coefficient block.
[0075] Next, the entropy coding unit 110 performs entropy coding on the coefficient block and prediction parameters related to generation of the prediction signal to generate a coded signal (step Sa_6). The coded signal is also called a coded bitstream, a compressed bitstream, or a stream.
[0076] Next, the inverse quantization unit 112 and the inverse transform unit 114 perform inverse quantization and inverse transform on the coefficient block to reconstruct a plurality of prediction residuals (i.e., difference blocks) (step Sa_7).
[0077] Next, the adder 116 reconstructs the current block into a reconstructed image (also called a reconstructed block or a decoded image block) by adding the predicted block to the restored differential block (step Sa_8), thereby generating a reconstructed image.
[0078] Once this reconstructed image is generated, the loop filter unit 120 performs filtering on the reconstructed image as needed (step Sa_9).
[0079] Then, the encoding device 100 determines whether encoding of the entire picture is complete (step Sa_10), and if it determines that encoding is not complete (No in step Sa_10), it repeats the process from step Sa_2.
[0080] In the above example, the encoding device 100 selects one division pattern for fixed-size blocks and encodes each block according to that division pattern, but it may also encode each block according to each of a plurality of division patterns. In this case, the encoding device 100 may evaluate the cost for each of the plurality of division patterns and select, for example, the coded signal obtained by coding according to the division pattern with the smallest cost as the coded signal to be finally output.
[0081] Furthermore, the processing of steps Sa_1 to Sa_10 may be performed sequentially by the encoding device 100, or some of the processing may be performed in parallel, or the order of the processing may be changed.
[0082] [Divider] The divider 102 divides each picture included in the input video into multiple blocks and outputs each block to the subtractor 104. For example, the divider 102 first divides the picture into blocks of a fixed size (e.g., 128x128). These fixed-size blocks are sometimes called coding tree units (CTUs). The divider 102 then divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 or less) based on, for example, recursive quadtree and / or binary tree block division. That is, the divider 102 selects a division pattern. These variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transform units (TUs). Note that in various implementation examples, CUs, PUs, and TUs do not need to be distinguished from one another, and some or all of the blocks in a picture may serve as processing units for CUs, PUs, and TUs.
[0083] 3 is a diagram showing an example of block division in this embodiment, in which solid lines represent block boundaries based on quadtree block division, and dashed lines represent block boundaries based on binary tree block division.
[0084] Here, the block 10 is a square block of 128x128 pixels (128x128 block). This 128x128 block 10 is first divided into four square 64x64 blocks (quadtree block division).
[0085] The top-left 64x64 block is further divided vertically into two rectangular 32x64 blocks, and the left 32x64 block is further divided vertically into two rectangular 16x64 blocks (binary tree block division). As a result, the top-left 64x64 block is divided into two 16x64 blocks 11 and 12 and a 32x64 block 13.
[0086] The top right 64x64 block is divided horizontally into two rectangular 64x32 blocks 14, 15 (binary tree block division).
[0087] The lower-left 64x64 block is divided into four square 32x32 blocks (quadtree block division). Of the four 32x32 blocks, the upper-left and lower-right blocks are further divided. The upper-left 32x32 block is divided vertically into two rectangular 16x32 blocks, and the right 16x32 block is further divided horizontally into two 16x16 blocks (binary tree block division). The lower-right 32x32 block is divided horizontally into two 32x16 blocks (binary tree block division). As a result, the lower-left 64x64 block is divided into a 16x32 block 16, two 16x16 blocks 17 and 18, two 32x32 blocks 19 and 20, and two 32x16 blocks 21 and 22.
[0088] The bottom right 64x64 block 23 is not divided.
[0089] 3, the block 10 is divided into 13 variable-sized blocks 11 to 23 based on recursive quad-tree and binary tree block division. This type of division is sometimes called QTBT (quad-tree plus binary tree) division.
[0090] 3, one block is divided into four or two blocks (quadtree or binary tree block division), but the division is not limited to this. For example, one block may be divided into three blocks (ternary tree block division). Division including such ternary tree block division is sometimes called MBT (multi type tree) division.
[0091] [Picture Configuration: Slices / Tiles] In order to decode pictures in parallel, the pictures may be configured in slice units or tiles. Pictures configured in slice units or tiles may be configured by the dividing unit 102.
[0092] A slice is a basic coding unit that constitutes a picture. A picture is made up of, for example, one or more slices. A slice is made up of one or more consecutive coding tree units (CTUs).
[0093] FIG. 4A illustrates an example of a slice configuration. For example, a picture includes 11×8 CTUs and is divided into four slices (slices 1-4). Slice 1 consists of 16 CTUs, slice 2 consists of 21 CTUs, slice 3 consists of 29 CTUs, and slice 4 consists of 22 CTUs. Each CTU in a picture belongs to one of the slices. The shape of a slice is determined by dividing the picture horizontally. The slice boundaries do not necessarily have to be at the edges of the screen, but may be anywhere within the boundaries of the CTUs within the screen. The processing order (encoding order or decoding order) of the CTUs in a slice is, for example, raster scan order. Each slice also includes header information and coded data. The header information may describe the characteristics of the slice, such as the address of the first CTU in the slice and the slice type.
[0094] A tile is a unit of rectangular area that makes up a picture. A number called TileId may be assigned to each tile in raster scan order.
[0095] FIG. 4B is a diagram illustrating an example of a tile configuration. For example, a picture includes 11×8 CTUs and is divided into four rectangular tiles (tiles 1-4). When tiles are used, the processing order of the CTUs is changed compared to when tiles are not used. When tiles are not used, multiple CTUs in a picture are processed in raster scan order. When tiles are used, at least one CTU in each of multiple tiles is processed in raster scan order. For example, as shown in FIG. 4B , the processing order of 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.
[0096] It should be noted that one tile may include one or more slices, and one slice may include one or more tiles.
[0097] [Subtraction Unit] The subtraction unit 104 subtracts a prediction signal (prediction samples input from a prediction control unit 128 described below) from the original signal (original samples) input from the division unit 102, for each block divided by the division unit 102. That is, the subtraction unit 104 calculates a prediction error (also referred to as a residual) of the block to be coded (hereinafter referred to as a current block). The subtraction unit 104 then outputs the calculated prediction error (residual) to the conversion unit 106.
[0098] The original signal is an input signal to the encoding device 100 and is a signal representing an image of each picture constituting a moving image (e.g., a luma signal and two chroma signals). Hereinafter, the signal representing an image may also be referred to as a sample.
[0099] [Transformation Unit] The transformation unit 106 transforms the spatial domain prediction errors into frequency domain transformation coefficients and outputs the transformation coefficients to the quantization unit 108. Specifically, the transformation unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the spatial domain prediction errors.
[0100] The transform unit 106 may adaptively select a transform type from among a plurality of transform types and convert the prediction errors into transform coefficients using a transform basis function corresponding to the selected transform type. Such a transform is sometimes called an explicit multiple core transform (EMT) or an adaptive multiple transform (AMT).
[0101] The multiple transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Fig. 5A is a table showing transform basis functions corresponding to each transform type. In Fig. 5A, N indicates the number of input pixels. Selection of a transform type from among these multiple transform types may depend, for example, on the type of prediction (intra prediction or inter prediction) or on the intra prediction mode.
[0102] Information indicating whether EMT or AMT is applied (e.g., referred to as an EMT flag or an AMT flag) and information indicating the selected transform type are typically signaled at the CU level, although the signaling of this information does not need to be limited to the CU level and may be at other levels (e.g., bit sequence level, picture level, slice level, tile level, or CTU level).
[0103] Furthermore, the transform unit 106 may retransform the transform coefficients (transformation results). Such retransformation may be referred to as adaptive secondary transform (AST) or non-separable secondary transform (NSST). For example, the transform unit 106 performs retransformation for each sub-block (e.g., 4x4 sub-block) included in a block of transform coefficients corresponding to intra-prediction errors. Information indicating whether or not to apply NSST and information regarding the transform matrix used for NSST are typically signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0104] Separable transformation and non-separable transformation may be applied to the transformation unit 106. Separable transformation is a method of separating the input into directions for the number of dimensions and performing transformation multiple times, and non-separable transformation is a method of treating two or more dimensions of a multidimensional input as one dimension and performing transformation all at once.
[0105] For example, an example of a non-separable transformation is one in which, if the input is a 4x4 block, it is treated as a single array with 16 elements, and transformation processing is performed on that array using a 16x16 transformation matrix.
[0106] In addition, in a further example of a non-separable transform, a 4x4 input block is treated as a single array having 16 elements, and then a transform (Hypercube Givens Transform) is performed in which Givens rotation is performed multiple times on the array.
[0107] In the transformation performed by the transform unit 106, the type of basis used for transformation into the frequency domain can be switched depending on the region within the CU. One example is SVT (Spatially Varying Transform). In SVT, as shown in FIG. 5B, a CU is divided into two equal parts in the horizontal or vertical direction, and only one of the regions is transformed into the frequency domain. The type of transform basis can be set for each region, and 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, but both regions may also be transformed. In addition, the division method can be more flexible, such as not only dividing into two equal parts, but also into four equal parts, or by separately encoding information indicating the division and signaling it in the same way as CU division. SVT is also sometimes called SBT (Sub-block Transform).
[0108] [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 quantization parameters (QP) corresponding to the scanned transform coefficients. The quantization unit 108 then outputs the quantized transform coefficients of the current block (hereinafter referred to as quantized coefficients) to the entropy coding unit 110 and the inverse quantization unit 112.
[0109] The predetermined scanning order is an order for quantizing / dequantizing the transform coefficients, for example, the predetermined scanning order is defined as an ascending order (low to high frequencies) or a descending order (high to low frequencies).
[0110] The quantization parameter (QP) is a parameter that defines the quantization step (quantization width). For example, as the value of the quantization parameter increases, the quantization step also increases. In other words, as the value of the quantization parameter increases, the quantization error increases.
[0111] In addition, a quantization matrix may be used for quantization. For example, several types of quantization matrices may be used corresponding to frequency transform sizes such as 4x4 and 8x8, prediction modes such as intra prediction and inter prediction, and pixel components such as luminance and chrominance. Note that quantization refers to digitizing values sampled at predetermined intervals by associating them with predetermined levels, and in this technical field, expressions such as rounding, scaling, etc. may also be used.
[0112] There are two methods for using a quantization matrix: one is to use a quantization matrix that is set directly on the encoding device side, and the other is to use a default quantization matrix (default matrix). By directly setting a quantization matrix on the encoding device side, it is possible to set a quantization matrix that corresponds to the characteristics of the image. However, this has the disadvantage that the amount of code increases when encoding the quantization matrix.
[0113] On the other hand, there is also a method that does not use a quantization matrix and quantizes the coefficients of both high-frequency components and low-frequency components in the same way. Note that this method is equivalent to using a quantization matrix in which all coefficients have the same value (a flat matrix).
[0114] Quantization matrices may be specified, for example, in an SPS (Sequence Parameter Set) or a PPS (Picture Parameter Set). The SPS contains parameters used for a sequence, and the PPS contains parameters used for a picture. The SPS and PPS are sometimes simply referred to as parameter sets.
[0115] [Entropy Encoding Unit] The entropy encoding unit 110 generates an encoded signal (encoded bitstream) based on the quantized coefficients input from the quantization unit 108. Specifically, the entropy encoding unit 110, for example, binarizes the quantized coefficients, arithmetically encodes the binary signal, and outputs a compressed bitstream or sequence.
[0116] [Inverse Quantization Unit] The inverse quantization unit 112 inverse quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse quantizes the quantized coefficients of the current block in a predetermined scanning order. The inverse quantization unit 112 then outputs the inverse quantized transform coefficients of the current block to the inverse transform unit 114.
[0117] [Inverse Transform Unit] The inverse transform unit 114 restores prediction errors (residuals) by inverse transforming the transform coefficients input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores prediction errors of the current block by performing an inverse transform on the transform coefficients that corresponds to the transform performed by the transform unit 106. The inverse transform unit 114 then outputs the restored prediction errors to the adder unit 116.
[0118] Note that the restored prediction error usually loses information due to quantization, and therefore does not match the prediction error calculated by the subtraction unit 104. In other words, the restored prediction error usually contains a quantization error.
[0119] [Adder] The adder 116 reconstructs a current block by adding the prediction error input from the inverse transformer 114 and the prediction sample input from the prediction control unit 128. The adder 116 then outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block is sometimes called a local decoded block.
[0120] [Block Memory] The block memory 118 is a storage unit for storing, for example, blocks referenced in intra prediction and in a picture to be coded (referred to as a current picture). Specifically, the block memory 118 stores the reconstructed blocks output from the adder 116.
[0121] [Frame Memory] The frame memory 122 is a storage unit for storing, for example, reference pictures used in inter prediction, and is also called a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120.
[0122] [Loop Filter Unit] The loop filter unit 120 applies a loop filter to the block reconstructed by the adder 116 and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (in-loop filter) used in the encoding loop, and includes, for example, a deblocking filter (DF or DBF), a sample adaptive offset (SAO), and an adaptive loop filter (ALF).
[0123] In ALF, a least squared error filter is applied to remove coding artifacts, for example, for each 2x2 sub-block in the current block, one filter selected from among multiple filters based on local gradient direction and activity is applied.
[0124] Specifically, first, sub-blocks (e.g., 2x2 sub-blocks) are classified into a plurality of classes (e.g., 15 or 25 classes). The sub-blocks are classified based on the gradient direction and activity. For example, a classification value C (e.g., C=5D+A) is calculated using a gradient direction value D (e.g., 0 to 2 or 0 to 4) and a gradient activity value A (e.g., 0 to 4). Then, the sub-blocks are classified into a plurality of classes based on the classification value C.
[0125] The gradient direction value D is derived, for example, by comparing gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions), and the gradient activity value A is derived, for example, by adding gradients in multiple directions and quantizing the sum.
[0126] Based on the result of such classification, a filter for the sub-block is determined from among a plurality of filters.
[0127] The shape of the filter used in ALF is, for example, a circularly symmetric shape. Figures 6A to 6C are diagrams showing several examples of filter shapes used in ALF. Figure 6A shows a 5x5 diamond-shaped filter, Figure 6B shows a 7x7 diamond-shaped filter, and Figure 6C shows a 9x9 diamond-shaped filter. Information indicating the filter shape is usually signaled at the picture level. Note that signaling of information indicating the filter shape does not need to be limited to the picture level, and may be at other levels (e.g., sequence level, slice level, tile level, CTU level, or CU level).
[0128] Whether ALF is on or off may be determined, for example, at the picture level or the CU level. For example, whether ALF is applied to luminance may be determined at the CU level, and whether ALF is applied to chrominance may be determined at the picture level. Information indicating whether ALF is on or off is usually signaled at the picture level or the CU level. Note that signaling of information indicating whether ALF is on or off does not need to be limited to the picture level or the CU level, and may be at other levels (for example, the sequence level, the slice level, the tile level, or the CTU level).
[0129] The coefficient sets of multiple selectable filters (e.g., up to 15 or 25 filters) are typically signaled at the picture level, although signaling of the coefficient sets need not be limited to the picture level and may be at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
[0130] [Loop Filter Unit>Deblocking Filter] In the deblocking filter, the loop filter unit 120 reduces distortion occurring at block boundaries of the reconstructed image by filtering the block boundaries.
[0131] FIG. 7 is a block diagram showing an example of a detailed configuration of the loop filter unit 120 that functions as a deblocking filter.
[0132] The loop filter unit 120 includes a boundary determination unit 1201 , a filter determination unit 1203 , a filter processing unit 1205 , a processing determination unit 1208 , a filter characteristics determination unit 1207 , and switches 1202 , 1204 and 1206 .
[0133] The boundary determination unit 1201 determines whether a pixel to be deblocking filtered (i.e., a target pixel) is located near a block boundary, and outputs the determination result to the switch 1202 and the processing determination unit 1208.
[0134] If the boundary determination unit 1201 determines that the target pixel is located near a block boundary, the switch 1202 outputs the image before filtering to the switch 1204. Conversely, if the boundary determination unit 1201 determines that the target pixel is not located near a block boundary, the switch 1202 outputs the image before filtering to the switch 1206.
[0135] The filter determination unit 1203 determines whether or not to perform deblocking filtering on the target pixel based on the pixel value of at least one surrounding pixel around the target pixel, and outputs the determination result to the switch 1204 and the processing determination unit 1208.
[0136] When the filter determination unit 1203 determines that deblocking filtering is to be performed on the target pixel, the switch 1204 outputs the pre-filtering image acquired via the switch 1202 to the filter processing unit 1205. Conversely, when the filter determination unit 1203 determines that deblocking filtering is not to be performed on the target pixel, the switch 1204 outputs the pre-filtering image acquired via the switch 1202 to the switch 1206.
[0137] When the filtering unit 1205 acquires the pre-filtering image via the switches 1202 and 1204, it performs deblocking filtering on the target pixel using the filter characteristics determined by the filter characteristics determination unit 1207. Then, the filtering unit 1205 outputs the filtered pixel to the switch 1206.
[0138] The switch 1206 selectively outputs pixels that have not been subjected to deblocking filtering and pixels that have been subjected to deblocking filtering by the filtering processing unit 1205 under the control of the processing determining unit 1208 .
[0139] The processing determination unit 1208 controls the switch 1206 based on the respective determination results of the boundary determination unit 1201 and the filter determination unit 1203. That is, when the boundary determination unit 1201 determines that the target pixel is located near a block boundary and the filter determination unit 1203 determines that deblocking filtering is to be performed on the target pixel, the processing determination unit 1208 causes the switch 1206 to output a pixel that has been subjected to deblocking filtering. In addition, in cases other than those described above, the processing determination unit 1208 causes the switch 1206 to output a pixel that has not been subjected to deblocking filtering. By repeatedly outputting pixels in this manner, a filtered image is output from the switch 1206.
[0140] FIG. 8 is a diagram showing an example of a deblocking filter having filter characteristics that are symmetric with respect to block boundaries.
[0141] In the deblocking filter process, for example, one of two deblocking filters with different characteristics, that is, a strong filter and a weak filter, is selected using pixel values and a quantization parameter. In the strong filter, as shown in Figure 8, when pixels p0 to p2 and pixels q0 to q2 exist on either side of a block boundary, the pixel values of the pixels q0 to q2 are changed to pixel values q'0 to q'2 by performing the calculation shown in the following equation.
[0142] 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
[0143] In the above equations, p0 to p2 and q0 to q2 are the pixel values of pixels p0 to p2 and pixels q0 to q2, respectively. q3 is the pixel value of pixel q3, which is adjacent to pixel q2 on the opposite side of the block boundary. On the right side of each equation, the coefficients by which the pixel values of each pixel used in the deblocking filter process are multiplied are filter coefficients.
[0144] Furthermore, in the deblocking filter process, clipping may be performed to prevent the pixel value after the operation from changing beyond a threshold. In this clipping process, the pixel value after the operation according to the above formula is clipped to "the pixel value before the operation ±2 × the threshold" using a threshold determined from the quantization parameter. This makes it possible to prevent excessive smoothing.
[0145] Fig. 9 is a diagram for explaining block boundaries on which deblocking filtering is performed, and Fig. 10 is a diagram showing an example of a Bs value.
[0146] The block boundaries on which deblocking filtering is performed are, for example, boundaries of PUs (Prediction Units) or TUs (Transform Units) of 8×8 pixel blocks as shown in Fig. 9. The deblocking filtering is performed in units of four rows or four columns. First, a Bs (Boundary Strength) value is determined for block P and block Q shown in Fig. 9 as shown in Fig. 10.
[0147] Whether or not to perform deblocking filter processing of different strengths on block boundaries belonging to the same image is determined according to the Bs value in Fig. 10. Deblocking filter processing on the color difference signal is performed when the Bs value is 2. Deblocking filter processing on the luminance signal is performed when the Bs value is 1 or greater and predetermined conditions are satisfied. Note that the conditions for determining the Bs value are not limited to those shown in Fig. 10 and may be determined based on other parameters.
[0148] 11 is a diagram showing an example of processing performed in the prediction processing unit of the encoding device 100. The prediction processing unit is made up of all or some of the components of the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.
[0149] The prediction processing unit generates a predicted image of the current block (step Sb_1). This predicted image is also called a predicted signal or a predicted block. The predicted signal may be, for example, an intra-prediction signal or an inter-prediction signal. Specifically, the prediction processing unit generates the predicted image of the current block using a reconstructed image already obtained by generating a predicted block, generating a difference block, generating a coefficient block, restoring the difference block, and generating a decoded image block.
[0150] The reconstructed image may be, for example, an image of a reference picture or an image of an encoded block in a current picture, which is a picture that includes the current block. The encoded block in the current picture may be, for example, a neighboring block of the current block.
[0151] FIG. 12 is a diagram showing another example of the processing performed by the prediction processing unit of the encoding device 100.
[0152] The prediction processing unit generates a predicted image using a first method (step Sc_1a), a second method (step Sc_1b), and a third method (step Sc_1c). The first method, the second method, and the third method are different methods for generating predicted images, and may be, for example, an inter-prediction method, an intra-prediction method, or another prediction method. These prediction methods may use the reconstructed image described above.
[0153] Next, the prediction processing unit selects one of the multiple predicted images generated in steps Sc_1a, Sc_1b, and Sc_1c (step Sc_2). This selection of the predicted image, i.e., the selection of a method or mode for obtaining the final predicted image, may be performed by calculating a cost for each generated predicted image and then selecting the method or mode based on the calculated cost. Alternatively, the selection of the predicted image may be performed based on parameters used in the encoding process. The encoding device 100 may signal information for identifying the selected predicted image, method, or mode in an encoding signal (also referred to as an encoded bitstream). This information may be, for example, a flag. This allows the decoding device to generate a predicted image according to the method or mode selected by the encoding device 100 based on the information. Note that in the example shown in FIG. 12, the prediction processing unit generates predicted images using each method and then selects one of the predicted images. However, the prediction processing unit may select a method or mode based on parameters used in the encoding process described above before generating the predicted images, and then generate predicted images according to the selected method or mode.
[0154] For example, the first method and the second method may be intra prediction and inter prediction, respectively, and the prediction processing unit may select a final predicted image for the current block from predicted images generated according to these prediction methods.
[0155] FIG. 13 is a diagram showing another example of the processing performed by the prediction processing unit of the encoding device 100.
[0156] First, the prediction processing unit generates a predicted image by intra prediction (step Sd_1a), and then generates a predicted image by inter prediction (step Sd_1b). Note that the predicted image generated by intra prediction is also called an intra predicted image, and the predicted image generated by inter prediction is also called an inter predicted image.
[0157] 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 a cost C for each of the intra-predicted image and the inter-predicted image. This cost C is calculated using an RD optimization model formula, for example, C = D + λ × R. In this formula, D is the coding distortion of the predicted image, and is expressed, for example, by the sum of absolute differences between pixel values of the current block and pixel values of the predicted image. Furthermore, R is the generated code amount of the predicted image, and specifically, the code amount required for encoding motion information, etc., for generating the predicted image. Furthermore, λ is, for example, Lagrange's undetermined multiplier.
[0158] The prediction processing unit then selects the predicted image with the smallest calculated cost C from the intra-predicted image and the inter-predicted image as the final predicted image of the current block (step Sd_3), i.e., a prediction method or mode for generating a predicted image of the current block is selected.
[0159] [Intra Prediction Unit] The intra prediction unit 124 generates a prediction signal (intra prediction signal) by performing intra prediction (also referred to as intra-screen prediction) of a current block with reference to blocks in the current picture stored in the block memory 118. Specifically, the intra prediction unit 124 generates the intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 128.
[0160] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predefined intra prediction modes. The plurality of intra prediction modes typically includes one or more non-directional prediction modes and a plurality of directional prediction modes.
[0161] The one or more non-directional prediction modes include, for example, a planar prediction mode and a DC prediction mode defined in the H.265 / HEVC standard.
[0162] The multiple directional prediction modes include, for example, the 33 prediction modes defined in the H.265 / HEVC standard. The multiple directional prediction modes may also include 32 prediction modes in addition to the 33 directions (a total of 65 directional prediction modes). Figure 14 is a diagram showing all 67 intra prediction modes (two non-directional prediction modes and 65 directional prediction modes) in intra prediction. Solid arrows represent the 33 directions defined in the H.265 / HEVC standard, and dashed arrows represent the additional 32 directions. (The two non-directional prediction modes are not shown in Figure 14.)
[0163] In various implementation examples, a luma block may be referenced in intra prediction of a chroma block. That is, the chroma component of the current block may be predicted based on the luma component of the current block. Such intra prediction is sometimes referred to as CCLM (cross-component linear model) prediction. An intra prediction mode of a chroma block that references such a luma block (e.g., referred to as a CCLM mode) may be added as one of the intra prediction modes of the chroma block.
[0164] The intra prediction unit 124 may correct pixel values after intra prediction based on gradients of reference pixels in the horizontal / vertical directions. Intra prediction involving such correction is sometimes called position dependent intra prediction combination (PDPC). Information indicating whether PDPC is applied (e.g., called a PDPC flag) is usually signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0165] [Inter Prediction Unit] The inter prediction unit 126 generates a prediction signal (inter prediction signal) by performing inter prediction (also referred to as inter prediction) on the current block with reference to a reference picture stored in the frame memory 122 that is different from the current picture. Inter prediction is performed in units of the current block or a current sub-block (e.g., a 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 to find a reference block or sub-block that best matches the current block or current sub-block. The inter prediction unit 126 then obtains motion information (e.g., a motion vector) that compensates for the movement or change from the reference block or sub-block to the current block or sub-block. The inter prediction unit 126 performs motion compensation (or motion prediction) based on the motion information to generate an inter prediction 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.
[0166] 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, a difference between a motion vector and a motion vector predictor may be signaled.
[0167] [Basic Flow of Inter Prediction] FIG. 15 is a flowchart showing the basic flow of inter prediction.
[0168] The inter prediction unit 126 first generates a predicted image (steps Se_1 to Se_3). Next, the subtraction unit 104 generates a difference between the current block and the predicted image as a prediction residual (step Se_4).
[0169] Here, in generating a predicted image, the inter prediction unit 126 determines a motion vector (MV) of the current block (steps Se_1 and Se_2) and performs motion compensation (step Se_3) to generate the predicted image. In determining an MV, the inter prediction unit 126 selects a candidate motion vector (candidate MV) (step Se_1) and derives an MV (step Se_2) to determine the MV. The candidate MV may be selected, for example, by selecting at least one candidate MV from a candidate MV list. In deriving an MV, the inter prediction unit 126 may further select at least one candidate MV from the at least one candidate MV and determine the selected at least one candidate MV as the MV of the current block. Alternatively, the inter prediction unit 126 may determine the MV of the current block by searching, for each of the selected at least one candidate MV, an area of a reference picture indicated by the candidate MV. Note that searching the area of the reference picture may be called motion estimation.
[0170] In addition, in the above example, steps Se_1 to Se_3 are performed by the inter prediction unit 126, but the processing of step Se_1 or step Se_2, for example, may be performed by other components included in the encoding device 100.
[0171] [Motion Vector Deriving Flow] FIG. 16 is a flowchart showing an example of motion vector derivation.
[0172] The inter prediction unit 126 derives the motion vectors (e.g., motion vectors) of the current block in a motion information encoding mode. In this case, 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).
[0173] Alternatively, the inter prediction unit 126 derives MVs in a mode that does not encode motion information, in which case motion information is not included in the encoded signal.
[0174] Here, MV derivation modes include normal inter mode, merge mode, FRUC mode, and affine mode, which will be described later. Among these modes, modes that encode motion information include normal inter mode, merge mode, and affine mode (specifically, affine inter mode and affine merge mode). Note that the motion information may include not only MVs but also predicted motion vector selection information, which will be described later. Furthermore, modes that do not encode motion information include FRUC mode. The inter prediction unit 126 selects a mode for deriving the MV of the current block from these multiple modes, and derives the MV of the current block using the selected mode.
[0175] FIG. 17 is a flowchart showing another example of motion vector derivation.
[0176] The inter prediction unit 126 derives the MV of the current block in a differential MV coding mode. In this case, for example, the differential MV is coded as a prediction parameter and signaled. That is, the coded differential MV is included in the coded signal. This differential MV is the difference between the MV of the current block and its predicted MV.
[0177] Alternatively, the inter prediction unit 126 derives the MV in a mode in which the differential MV is not coded. In this case, the coded differential MV is not included in the coded signal.
[0178] As described above, MV derivation modes include normal inter, merge mode, FRUC mode, and affine mode, which will be described later. Among these modes, modes that encode differential MVs include normal inter mode and affine mode (specifically, affine inter mode). Modes that do not encode differential MVs include FRUC mode, merge mode, and affine mode (specifically, affine merge mode). The inter prediction unit 126 selects a mode for deriving MVs for the current block from these multiple modes and derives the MVs for the current block using the selected mode.
[0179] [Motion Vector Derivation Flow] Figure 18 is a flowchart showing another example of motion vector derivation. There are multiple MV derivation modes, i.e., inter prediction modes, which can be broadly divided into modes in which a differential MV is coded and modes in which a differential motion vector is not coded. Modes in which a differential MV is not coded include merge mode, FRUC mode, and affine mode (specifically, affine merge mode). Details of these modes will be described later. Briefly, merge mode is a mode in which the MV of the current block is derived by selecting a motion vector from a neighboring coded block, and FRUC mode is a mode in which the MV of the current block is derived by searching between coded regions. Furthermore, affine mode is a mode in which, assuming affine transformation, the motion vectors of each of the multiple sub-blocks constituting the current block are derived as the MV of the current block.
[0180] Specifically, when the inter prediction mode information indicates 0 (0 in Sf_1), the inter prediction unit 126 derives a motion vector using merge mode (Sf_2). Furthermore, when the inter prediction mode information indicates 1 (1 in Sf_1), the inter prediction unit 126 derives a motion vector using FRUC mode (Sf_3). Furthermore, when the inter prediction mode information indicates 2 (2 in Sf_1), the inter prediction unit 126 derives a motion vector using affine mode (specifically, affine merge mode) (Sf_4). Furthermore, when the inter prediction mode information indicates 3 (3 in Sf_1), the inter prediction unit 126 derives a motion vector using a mode for encoding differential MV (e.g., normal inter mode) (Sf_5).
[0181] [MV Derivation > Normal Inter Mode] Normal inter mode is an inter prediction mode in which the MV of the current block is derived by finding a block similar to the image of the current block from the region of the reference picture indicated by the candidate MV. In this normal inter mode, the differential MV is coded.
[0182] FIG. 19 is a flowchart showing an example of inter prediction in normal inter mode.
[0183] The inter prediction unit 126 first obtains multiple candidate MVs for the current block based on information such as MVs of multiple coded blocks temporally or spatially surrounding the current block (Step Sg_1). That is, the inter prediction unit 126 creates a candidate MV list.
[0184] Next, the inter prediction unit 126 extracts N candidate MVs (N is an integer equal to or greater than 2) from the plurality of candidate MVs obtained in step Sg_1 as candidate motion vector predictors (also referred to as candidate predictor MVs) according to a predetermined priority order (step Sg_2). Note that the priority order is predetermined for each of the N candidate MVs.
[0185] Next, the inter prediction unit 126 selects one motion vector predictor candidate from the N motion vector predictor candidate as a motion vector predictor (also referred to as a predicted MV) for the current block (step Sg_3). At this time, the inter prediction unit 126 encodes motion vector predictor selection information for identifying the selected motion vector predictor into a stream. Note that the stream is the above-mentioned encoded signal or encoded bitstream.
[0186] Next, the inter prediction unit 126 derives the motion vector of the current block by referring to the coded reference picture (step Sg_4). At this time, the inter prediction unit 126 further encodes the difference between the derived motion vector and the predicted motion vector as a differential motion vector into a stream. Note that the coded reference picture is a picture consisting of multiple blocks reconstructed after coding.
[0187] Finally, the inter prediction unit 126 performs motion compensation on the current block using the derived motion vectors and the coded reference picture to generate a predicted image of the current block (step Sg_5). Note that the predicted image is the inter prediction signal described above.
[0188] Furthermore, information indicating the inter prediction mode (normal inter mode in the above example) used to generate the predicted image, which is included in the coded signal, is coded as, for example, a prediction parameter.
[0189] The candidate MV list may be shared with lists used in other modes. Furthermore, processing related to the candidate MV list may be applied to processing related to lists used in other modes. Examples of processing related to the candidate MV list include extracting or selecting candidate MVs from the candidate MV list, sorting candidate MVs, or deleting candidate MVs.
[0190] [MV Derivation>Merge Mode] Merge mode is an inter prediction mode in which a candidate MV is selected from a candidate MV list as the MV for the current block, thereby deriving the MV.
[0191] FIG. 20 is a flowchart showing an example of inter prediction in merge mode.
[0192] The inter prediction unit 126 first obtains multiple candidate MVs for the current block based on information such as MVs of multiple coded blocks temporally or spatially surrounding the current block (step Sh_1). That is, the inter prediction unit 126 creates a candidate MV list.
[0193] Next, the inter prediction unit 126 derives the MV of the current block by selecting one candidate MV from the multiple candidate MVs obtained in step Sh_1 (step Sh_2). At this time, the inter prediction unit 126 encodes MV selection information for identifying the selected candidate MV into the stream.
[0194] Finally, the inter prediction unit 126 performs motion compensation on the current block using the derived MV and the coded reference picture to generate a predicted image of the current block (step Sh_3).
[0195] Furthermore, information indicating the inter prediction mode (merge mode in the above example) used to generate the predicted image, which is included in the coded signal, is coded as, for example, a prediction parameter.
[0196] FIG. 21 is a diagram illustrating an example of a motion vector derivation process for a current picture in merge mode.
[0197] First, a prediction MV list is generated in which prediction MV candidates are registered. The prediction MV candidates include spatially adjacent prediction MVs, which are MVs held by multiple coded blocks spatially located around the current block, temporally adjacent prediction MVs, which are MVs held by blocks near the current block projected onto the current block's position in a coded reference picture, combined prediction MVs, which are MVs generated by combining the MV values of the spatially adjacent prediction MVs and the temporally adjacent prediction MVs, and zero prediction MVs, which are MVs with a value of zero.
[0198] Next, one prediction MV is selected from the plurality of prediction MVs registered in the prediction MV list and is determined as the MV for the current block.
[0199] Furthermore, the variable length coding unit encodes merge_idx, which is a signal indicating which predicted MV has been selected, into the stream.
[0200] Note that the predicted MVs registered in the predicted MV list described in Figure 21 are just an example, and the number may be different from the number shown in the figure, the configuration may not include some of the types of predicted MVs shown in the figure, or the configuration may include predicted MVs other than the types of predicted MVs shown in the figure.
[0201] The final MV may be determined by performing dynamic motion vector refreshing (DMVR) processing, which will be described later, using the MV of the current block derived in the merge mode.
[0202] The candidates for the prediction MV are the candidate MVs described above, and the prediction MV list is the candidate MV list described above. The candidate MV list may also be called a candidate list. The merge_idx is MV selection information.
[0203] [MV Derivation > FRUC Mode] Motion information may be derived on the decoding device side without being signaled from the encoding device side. As described above, the merge mode defined in the H.265 / HEVC standard may be used. Alternatively, for example, motion information may be derived by performing motion estimation on the decoding device side. In this case, the motion estimation is performed on the decoding device side without using pixel values of the current block.
[0204] Here, a mode in which motion estimation is performed on the decoding device side will be described. This mode in which motion estimation is performed on the decoding device side is sometimes called a pattern matched motion vector derivation (PMMVD) mode or a frame rate up-conversion (FRUC) mode.
[0205] An example of the FRUC process is shown in FIG. 22 . First, a list of multiple candidates (i.e., a candidate MV list, which may be common to the merge list) each having a predicted motion vector (MV) is generated by referencing the motion vectors of coded blocks spatially or temporally adjacent to the current block (step Si_1). Next, a best candidate MV is selected from the multiple candidate MVs registered in the candidate MV list (step Si_2). For example, an evaluation value of each candidate MV included in the candidate MV list is calculated, and one candidate MV is selected based on the evaluation value. Then, a motion vector for the current block is derived based on the motion vector of the selected candidate (step Si_4). Specifically, for example, the motion vector of the selected candidate (best candidate MV) is derived as the motion vector for the current block. Alternatively, for example, the motion vector for the current block may be derived by performing pattern matching in a peripheral area of a position in a reference picture corresponding to the motion vector of the selected candidate. That is, a search is performed on the area around the best candidate MV using pattern matching and evaluation values in the reference picture, and if a MV with a better evaluation value is found, the best candidate MV is updated to that MV and used as the final MV for the current block. It is also possible to configure the system without updating to a MV with a better evaluation value.
[0206] Finally, the inter prediction unit 126 performs motion compensation on the current block using the derived MV and the coded reference picture to generate a predicted image of the current block (step Si_5).
[0207] The same processing may be performed when processing is performed in units of sub-blocks.
[0208] The evaluation value may be calculated by various methods. For example, a reconstructed image of an area in a reference picture corresponding to the motion vector is compared with a reconstructed image of a predetermined area (which may be, for example, an area in another reference picture or an area of an adjacent block in 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 the evaluation value may be calculated using other information in addition to the difference value.
[0209] Next, pattern matching will be described in detail. First, one candidate MV included in a candidate MV list (e.g., a merge list) is selected as a starting point for a search using pattern matching. As the pattern matching, a first pattern matching or a second pattern matching is used. The first pattern matching and the second pattern matching are sometimes called bilateral matching and template matching, respectively.
[0210] [MV Derivation > FRUC > Bilateral Matching] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures that are along the motion trajectory of the current block. Therefore, in the first pattern matching, an area in another reference picture that is along the motion trajectory of the current block is used as a predetermined area for calculating the evaluation value of the candidate.
[0211] FIG. 23 is a diagram illustrating an example of first pattern matching (bilateral matching) between two blocks in two reference pictures along a motion trajectory. As shown in FIG. 23 , in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the most closely matched pair of two blocks in two different reference pictures (Ref0, Ref1) along the motion trajectory of a current block (Cur block). Specifically, for the current block, a difference is derived between a reconstructed image at a specified position in a first coded reference picture (Ref0) specified by a candidate MV and a reconstructed image at a specified position in a second coded reference picture (Ref1) specified by a symmetric MV obtained by scaling the candidate MV by the display time interval, and an evaluation value is calculated using the obtained difference value. It is preferable to select the candidate MV with the best evaluation value from multiple candidate MVs as the final MV.
[0212] Under the assumption of continuous motion trajectories, motion vectors (MV0, MV1) pointing to two reference blocks are proportional to the temporal distances (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, if the current picture is located temporally between two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, the first pattern matching derives bidirectional motion vectors that are mirror-symmetric.
[0213] [MV Derivation > FRUC > Template Matching] In the second pattern matching (template matching), pattern matching is performed between a template in the current picture (a block adjacent to the current block in the current picture (e.g., an upper and / or left adjacent block)) and a block in a reference picture. Therefore, in the second pattern matching, the block adjacent to the current block in the current picture is used as a predetermined area for calculating the evaluation value of the above-mentioned candidate.
[0214] 24 is a diagram illustrating an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. As shown in FIG. 24 , in the second pattern matching, a motion vector of a current block is derived by searching a reference picture (Ref0) for a block that best matches a block adjacent to a current block (Cur block) in the current picture (Cur Pic). Specifically, a difference is derived between a reconstructed image of an encoded area adjacent to the left or above the current block, or both, and a reconstructed image at the same position in the encoded reference picture (Ref0) specified by a candidate MV. Evaluation values are calculated using the obtained difference values, and the candidate MV with the best evaluation value among multiple candidate MVs is selected as the best candidate MV.
[0215] Information indicating whether such a FRUC mode is applied (e.g., referred to as a FRUC flag) may be signaled at the CU level. Also, if the FRUC mode is applied (e.g., if the FRUC flag is true), information indicating an applicable pattern matching method (first pattern matching or second pattern matching) may be signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., the sequence level, the picture level, the slice level, the tile level, the CTU level, or the sub-block level).
[0216] [MV Derivation>Affine Mode] Next, we will explain the affine mode, which derives a motion vector for each sub-block based on the motion vectors of multiple neighboring blocks. This mode is sometimes called affine motion compensation prediction mode.
[0217] 25A is a diagram illustrating an example of deriving a motion vector for each sub-block based on the motion vectors of multiple adjacent blocks. In FIG. 25A, the current block includes 16 4x4 sub-blocks. Here, the motion vector v of the upper left corner control point of the current block is calculated based on the motion vectors of the adjacent blocks. 0 Similarly, the motion vector v of the upper right corner control point of the current block is derived based on the motion vectors of the neighboring sub-blocks. 1 Then, the two motion vectors v are calculated by the following equation (1A): 0 and v 1 , and project the motion vectors (v x , v y ) is derived.
[0218]
[0219] Here, x and y respectively indicate the horizontal and vertical positions of the sub-block, and w indicates a predetermined weighting factor.
[0220] Such information indicating the affine mode (e.g., called an affine flag) may be signaled at the CU level, but the signaling of the information indicating the affine mode does not need to be limited to the CU level and may be at other levels (e.g., the sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0221] Such affine modes may include several modes that differ in the method of deriving the motion vectors of the top-left and top-right corner control points. For example, the affine modes include two modes: affine inter (also called affine normal inter) mode and affine merge mode.
[0222] [MV Derivation > Affine Mode] Figure 25B is a diagram illustrating an example of derivation of a motion vector for each sub-block in affine mode with three control points. In Figure 25B, the current block includes 16 4x4 sub-blocks. Here, the motion vector v of the upper left corner control point of the current block is derived based on the motion vectors of the neighboring blocks. 0 Similarly, the motion vector v of the upper right corner control point of the current block is derived based on the motion vectors of the neighboring blocks. 1 , the motion vector v of the bottom left corner control point of the current block based on the motion vector of the neighboring block. 2 Then, the three motion vectors v are calculated by the following equation (1B): 0 , v 1 and v 2 , and project the motion vectors (v x , v y ) is derived.
[0223]
[0224] Here, x and y respectively indicate the horizontal and vertical positions of the center of the sub-block, w indicates the width of the current block, and h indicates the height of the current block.
[0225] Affine modes with different numbers of control points (e.g., two and three) may be switched and signaled at the CU level, and information indicating the number of control points of the affine mode used at the CU level may also be signaled at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0226] In addition, the affine mode having such three control points may include several modes that differ in the method of deriving the motion vectors of the upper-left, upper-right, and lower-left corner control points. For example, the affine mode includes two modes: affine inter (also called affine normal inter) mode and affine merge mode.
[0227] [MV Derivation>Affine Merge Mode] FIGS. 26A, 26B, and 26C are conceptual diagrams for explaining the affine merge mode.
[0228] In affine merge mode, as shown in Figure 26A, for example, among the coded blocks A (left), B (top), C (top right), D (bottom left) and E (top left) adjacent to the current block, the predicted motion vectors of the control points of the current block are calculated based on a plurality of motion vectors corresponding to the blocks coded in affine mode.Specifically, these blocks are examined in the order of coded block A (left), B (top), C (top right), D (bottom left) and E (top left), and the first valid block coded in affine mode is identified.Based on a plurality of motion vectors corresponding to this identified block, the predicted motion vector of the control point of the current block is calculated.
[0229] For example, as shown in FIG. 26B, if block A adjacent to the left of the current block is coded in an affine mode with two control points, the motion vector v projected onto the positions of the upper left and upper right corners of the coded block including block A is 3 and v 4 Then, the derived motion vector v 3 and v 4 , the predicted motion vector v of the control point in the upper left corner of the current block. 0 and the predicted motion vector v of the control point in the upper right corner. 1 is calculated.
[0230] For example, as shown in FIG. 26C, if block A adjacent to the left of the current block is coded in an affine mode with three control points, the motion vector v projected onto the positions of the upper left corner, upper right corner, and lower left corner of the coded block including block A is 3 , v 4 and v 5 Then, the derived motion vector v 3 , v 4 and v 5, the predicted motion vector v of the control point in the upper left corner of the current block. 0 and the predicted motion vector v of the control point in the upper right corner. 1 and the predicted motion vector v of the control point in the bottom left corner. 2 is calculated.
[0231] Note that this predicted motion vector derivation method may be used to derive predicted motion vectors for each control point of the current block in step Sj_1 of FIG. 29, which will be described later.
[0232] FIG. 27 is a flowchart showing an example of the affine merge mode.
[0233] In the affine merge mode, the inter predictor 126 first derives predicted motion vectors for each of the control points of the current block (step Sk_1). The control points are the upper left and upper right corners of the current block as shown in Fig. 25A, or the upper left, upper right, and lower left corners of the current block as shown in Fig. 25B.
[0234] That is, the inter prediction unit 126 examines the coded blocks in the order of block A (left), block B (top), block C (top right), block D (bottom left) and block E (top left), as shown in Figure 26A, and identifies the first valid block coded in affine mode.
[0235] Then, 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 vectors v 3 and v 4 From the motion vector v of the control point in the upper left corner of the current block, 0 and the motion vector v of the control point in the upper right corner 1 For example, the inter prediction unit 126 calculates the motion vectors v 3 and v 4 By projecting the current block, the predicted motion vector v 0and the predicted motion vector v of the control point in the upper right corner. 1 and calculate.
[0236] 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 v 3 , v 4 and v 5 From the motion vector v of the control point in the upper left corner of the current block, 0 and the motion vector v of the control point in the upper right corner 1 , the motion vector v of the control point in the lower left corner 2 For example, the inter prediction unit 126 calculates the motion vectors v 3 , v 4 and v 5 By projecting the current block, the predicted motion vector v 0 and the predicted motion vector v of the control point in the upper right corner. 1 , the motion vector v of the control point in the lower left corner 2 and calculate.
[0237] Next, the inter prediction unit 126 performs motion compensation for each of the sub-blocks included in the current block. That is, the inter prediction unit 126 calculates two predicted motion vectors v 0 and v 1 and the above equation (1A), or three predicted motion vectors v 0 , v 1 and v 2 and the above-mentioned equation (1B), the motion vector of the sub-block is calculated as an affine MV (step Sk_2). Then, the inter prediction unit 126 performs motion compensation on the sub-block using the affine MV and the coded reference picture (step Sk_3). As a result, motion compensation is performed on the current block, and a predicted image of the current block is generated.
[0238] [MV Derivation>Affine Inter Mode] FIG. 28A is a diagram for explaining an affine inter mode having two control points.
[0239] In this affine inter mode, as shown in FIG. 28A, a motion vector selected from the motion vectors of coded blocks A, B, and C adjacent to the current block is used as a predicted motion vector v of the control point in the upper left corner of the current block. 0 Similarly, a motion vector selected from the motion vectors of coded blocks D and E adjacent to the current block is used as the predicted motion vector v of the control point in the upper right corner of the current block. 1 It is used as.
[0240] FIG. 28B is a diagram illustrating an affine inter mode having three control points.
[0241] In this affine inter mode, as shown in FIG. 28B, a motion vector selected from the motion vectors of coded blocks A, B, and C adjacent to the current block is used as a predicted motion vector v 0 Similarly, a motion vector selected from the motion vectors of coded blocks D and E adjacent to the current block is used as the predicted motion vector v of the control point in the upper right corner of the current block. 1 Furthermore, a motion vector selected from the motion vectors of the coded blocks F and G adjacent to the current block is used as the predicted motion vector v of the control point at the bottom left corner of the current block. 2 It is used as.
[0242] FIG. 29 is a flowchart showing an example of the affine inter mode.
[0243] In the affine inter mode, the inter prediction unit 126 first calculates the predicted MVs (v 0 , v 1 ) or (v 0 , v1 , v 2 ) is derived (step Sj_1). The control point is the upper left corner, upper right corner, or lower left corner of the current block, as shown in FIG. 25A or FIG. 25B.
[0244] That is, the inter prediction unit 126 selects the motion vector of any of the coded blocks near each control point of the current block shown in FIG. 28A or 28B to obtain the predicted motion vector (v 0 , v 1 ) or (v 0 , v 1 , v 2 At this time, the inter prediction unit 126 encodes, into the stream, predicted motion vector selection information for identifying the two selected motion vectors.
[0245] For example, the inter prediction unit 126 may use cost evaluation or the like to determine which motion vector of an encoded block adjacent to the current block to select as the predicted motion vector for the control point, and may write a flag indicating which predicted motion vector has been selected in the bitstream.
[0246] Next, the inter prediction unit 126 performs motion search (steps Sj_3 and Sj_4) while updating each predicted motion vector selected or derived in step Sj_1 (step Sj_2). That is, the inter prediction unit 126 calculates the motion vector of each sub-block corresponding to the updated predicted motion vector as an affine motion vector using the above-described formula (1A) or (1B) (step Sj_3). Then, the inter prediction unit 126 performs motion compensation for each sub-block using the affine motion vectors and coded reference pictures (step Sj_4). As a result, the inter prediction unit 126 determines, for example, the predicted motion vector that results in the smallest cost in the motion search loop as the motion vector of the control point (step Sj_5). At this time, the inter prediction unit 126 further encodes the difference values between the determined motion vectors and the predicted motion vectors into a stream as differential motion vectors.
[0247] Finally, the inter prediction unit 126 performs motion compensation on the current block using the determined MV and the coded reference picture, thereby generating a predicted image of the current block (step Sj_6).
[0248] [MV derivation>Affine inter mode] When affine modes with different numbers of control points (for example, two and three) are switched and signaled at the CU level, the number of control points may differ between the coded block and the current block. Figures 30A and 30B are conceptual diagrams for explaining a method of deriving a predicted vector of a control point when the number of control points differs between the coded block and the current block.
[0249] For example, as shown in FIG. 30A, if the current block has three control points at the upper left, upper right, and lower left corners, and block A adjacent to the left of the current block is coded in an affine mode with two control points, then the motion vector v projected onto the positions of the upper left and upper right corners of the coded block containing block A is 3 and v 4 Then, the derived motion vector v 3 and v 4 , the predicted motion vector v of the control point in the upper left corner of the current block. 0 and the predicted motion vector v of the control point in the upper right corner. 1 Furthermore, the derived motion vector v 0 and v 1 , the predicted motion vector v of the control point in the lower left corner 2 is calculated.
[0250] For example, as shown in FIG. 30B, if the current block has two control points at the upper left and upper right corners, and block A adjacent to the left of the current block is coded in an affine mode with three control points, then the motion vector v projected onto the positions of the upper left, upper right, and lower left corners of the coded block including block A is 3 , v 4 and v 5Then, the derived motion vector v 3 , v 4 and v 5 , the predicted motion vector v of the control point in the upper left corner of the current block. 0 and the predicted motion vector v of the control point in the upper right corner. 1 is calculated.
[0251] This motion vector predictor derivation method may be used to derive the motion vector predictor for each control point of the current block in step Sj_1 of FIG.
[0252] [MV Derivation>DMVR] FIG. 31A is a diagram showing the relationship between merge mode and DMVR.
[0253] The inter prediction unit 126 derives a motion vector for the current block in merge mode (step S1_1). Next, the inter prediction unit 126 determines whether to search for a motion vector, i.e., whether to perform motion estimation (step S1_2). Here, if the inter prediction unit 126 determines not to perform motion estimation (No in step S1_2), it determines the motion vector derived in step S1_1 as the final motion vector for the current block (step S1_4). That is, in this case, the motion vector for the current block is determined in merge mode.
[0254] On the other hand, if it is determined in step S1_1 that a motion search is to be performed (Yes in step S1_2), the inter predictor 126 derives a final motion vector for the current block by searching a peripheral area of the reference picture indicated by the motion vector derived in step S1_1 (step S1_3). That is, in this case, the motion vector of the current block is determined by DMVR.
[0255] FIG. 31B is a conceptual diagram illustrating an example of DMVR processing for determining an MV.
[0256] First, the optimal MVP set for the current block (e.g., in merge mode) is set as the candidate MV. Then, reference pixels are identified from the first reference picture (L0), which is an encoded picture in the L0 direction, according to the candidate MV (L0). Similarly, reference pixels are identified from the second reference picture (L1), which is an encoded picture in the L1 direction, according to the candidate MV (L1). A template is generated by averaging these reference pixels.
[0257] Next, the template is used to search the surrounding areas of the candidate MVs in the first reference picture (L0) and the second reference picture (L1), and the MV with the smallest cost is determined as the final MV. Note that the cost value may be calculated using, for example, the difference between each pixel value of the template and each pixel value of the search area, the candidate MV value, etc.
[0258] The encoding device and the decoding device described below basically share the same processing configuration and operations.
[0259] Any process may be used, not limited to the process described here, as long as it is capable of searching the vicinity of the candidate MV and deriving the final MV.
[0260] [Motion Compensation>BIO / OBMC] Motion compensation includes modes in which a predicted image is generated and then corrected, such as BIO and OBMC, which will be described later.
[0261] FIG. 32 is a flowchart showing an example of generating a predicted image.
[0262] The inter prediction unit 126 generates a predicted image (step Sm_1) and corrects the predicted image using one of the above modes (step Sm_2).
[0263] FIG. 33 is a flowchart showing another example of generation of a predicted image.
[0264] The inter prediction unit 126 determines a motion vector for the current block (step Sn_1). Next, the inter prediction unit 126 generates a predicted image (step Sn_2) and determines whether or not to perform correction processing (step Sn_3). Here, if the inter prediction unit 126 determines to perform correction processing (Yes in step Sn_3), it corrects the predicted image to generate a final predicted image (step Sn_4). On the other hand, if 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).
[0265] Furthermore, motion compensation has a mode in which luminance is corrected when generating a predicted image, such as LIC, which will be described later.
[0266] FIG. 34 is a flowchart showing yet another example of generation of a predicted image.
[0267] The inter prediction unit 126 derives a motion vector for the current block (step So_1). Next, the inter prediction unit 126 determines whether or not to perform luminance correction processing (step So_2). Here, if 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). In other words, the predicted image is generated by LIC. On the other hand, if 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).
[0268] [Motion Compensation > OBMC] An inter-prediction signal may be generated using not only the motion information of the current block obtained by motion estimation, but also the motion information of adjacent blocks. Specifically, an inter-prediction signal may be generated for each sub-block in the current block by weighting and adding a prediction signal based on the motion information obtained by motion estimation (in the reference picture) and a prediction signal based on the motion information of adjacent blocks (in the current picture). Such inter-prediction (motion compensation) may be called OBMC (overlapped block motion compensation).
[0269] In the OBMC mode, information indicating the size of a sub-block for OBMC (e.g., referred to as an OBMC block size) may be signaled at the sequence level. Furthermore, information indicating whether the OBMC mode is applied (e.g., referred to as an OBMC flag) may be signaled at the CU level. Note that the signaling level of this information does not need to be limited to the sequence level and the CU level, and may be at other levels (e.g., the picture level, slice level, tile level, CTU level, or sub-block level).
[0270] The OBMC mode will now be described in more detail. Figures 35 and 36 are a flowchart and a conceptual diagram for explaining an outline of the predictive image correction process using the OBMC process.
[0271] First, a predicted image (Pred) is obtained by normal motion compensation using a motion vector (MV) assigned to a current block to be processed, as shown in Fig. 36. In Fig. 36, the arrow "MV" indicates a reference picture, indicating what the current block of the current picture is referring to in order to obtain the predicted image.
[0272] Next, a motion vector (MV_L) already derived for the coded left adjacent block is applied (reused) to the current block 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. The first correction of the predicted image is then performed by superimposing the two predicted images Pred and Pred_L. This has the effect of blending the boundaries between the adjacent blocks.
[0273] Similarly, a motion vector (MV_U) already derived for the coded upper adjacent block is applied (reused) to the current block 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. The predicted image Pred_U is then superimposed on the predicted image (e.g., Pred and Pred_L) that has undergone the first correction, thereby performing a second correction of the predicted image. This has the effect of blending the boundaries between adjacent blocks. The predicted image obtained by the second correction is the final predicted image of the current block, in which the boundaries with the adjacent blocks have been blended (smoothed).
[0274] Although the above example is a two-pass correction method using the left-adjacent and above-adjacent blocks, the correction method may also be a three-pass or more-pass correction method using the right-adjacent and / or below-adjacent blocks.
[0275] The area to be superimposed does not have to be the pixel area of the entire block, but may be only a part of the area near the block boundary.
[0276] Here, the OBMC predicted image correction process has been described, in which a single predicted image Pred is obtained by superimposing additional predicted images Pred_L and Pred_U from a single reference picture. However, when a predicted image is corrected based on multiple reference images, a similar process may be applied to each of the multiple reference pictures. In such a case, OBMC image correction based on multiple reference pictures is performed to obtain a corrected predicted image from each reference picture, and then the obtained multiple corrected predicted images are further superimposed to obtain a final predicted image.
[0277] In OBMC, the unit of the current block may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.
[0278] 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 current block belongs to a region with complex motion. If the current block belongs to a region with complex motion, the encoding device sets a value of 1 as obmc_flag and applies OBMC processing to perform encoding. If the current block does not belong to a region with complex motion, the encoding device sets a value of 0 as obmc_flag and performs encoding of the block without applying OBMC processing. Meanwhile, the decoding device decodes obmc_flag described in a stream (e.g., a compressed sequence) and switches whether to apply OBMC processing depending on the value, and performs decoding.
[0279] In the above example, the inter prediction unit 126 generates one rectangular predicted image for the rectangular current block. However, the inter prediction unit 126 may generate multiple predicted images of shapes other than a rectangle for the rectangular current block and combine these multiple predicted images to generate a final rectangular predicted image. The shape other than a rectangle may be, for example, a triangle.
[0280] FIG. 37 is a diagram for explaining the generation of predicted images of two triangles.
[0281] The inter prediction unit 126 generates a predicted image of a triangle by performing motion compensation on a first partition of a triangle in the current block using a first MV of the first partition. Similarly, the inter prediction unit 126 generates a predicted image of a triangle by performing motion compensation on a second partition of a triangle in the current block using a second MV of the second partition. The inter prediction unit 126 then combines these predicted images to generate a predicted image of the same rectangle as the current block.
[0282] In the example shown in Fig. 37, the first partition and the second partition are each triangular, but they may be trapezoidal or may have different shapes. Furthermore, in the example shown in Fig. 37, the current block is made up of two partitions, but it may also be made up of three or more partitions.
[0283] The first and second partitions may overlap, i.e., the first and second partitions may include the same pixel area, in which case a predicted image for the current block may be generated using a predicted image for the first partition and a predicted image for the second partition.
[0284] Furthermore, although this example shows an example in which predicted images are generated by inter prediction for both of the two partitions, predicted images may be generated by intra prediction for at least one partition.
[0285] [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 BIO (bi-directional optical flow) mode.
[0286] Figure 38 is a diagram illustrating a model assuming uniform linear motion. In Figure 38, (vx, vy) indicate a velocity vector, and τ0 and τ1 indicate the temporal distances between the current picture (Cur Pic) and two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) indicate the motion vector corresponding to reference picture Ref0, and (MVx1, MVy1) indicate the motion vector corresponding to reference picture Ref1.
[0287] In this case, under the assumption of uniform linear motion of the velocity vector (vx, vy), (MVx0, MVy0) and (MVx1, MVy1) are expressed as (vxτ0, vyτ0) and (-vxτ1, -vyτ1), respectively, and the following optical flow equation (2) holds.
[0288]
[0289] Here, I(k) denotes the luminance value of reference image k (k=0, 1) after motion compensation. This optical flow equation indicates that the sum of (i) the time derivative of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference image, and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference image is equal to zero. Based on a combination of this optical flow equation and Hermite interpolation, block-based motion vectors obtained from a merge list or the like may be corrected pixel by pixel.
[0290] Note that the decoding device may derive motion vectors using a method other than that based on a model assuming constant-velocity linear motion. For example, a motion vector may be derived for each sub-block based on the motion vectors of multiple adjacent blocks.
[0291] [Motion Compensation>LIC] Next, an example of a mode in which a predicted image (prediction) is generated using LIC (local illumination compensation) processing will be described.
[0292] FIG. 39 is a diagram illustrating an example of a method for generating a predicted image using luminance correction processing by LIC processing.
[0293] First, the MV is derived from the coded reference picture to obtain the reference image corresponding to the current block.
[0294] Next, information indicating how the luminance values of the current block have changed between the reference picture and the current picture is extracted. This extraction is performed based on the luminance pixel values of the coded left-adjacent reference area (peripheral reference area) and the coded upper-adjacent reference area (peripheral reference area) in the current picture, and the luminance pixel values at the equivalent positions in the reference picture specified by the derived MV. Then, a luminance correction parameter is calculated using the information indicating how the luminance values have changed.
[0295] A predicted image for the current block is generated by performing luminance correction processing that applies the luminance correction parameters to a reference image in a reference picture specified by MV.
[0296] The shape of the peripheral reference area in FIG. 39 is an example, and other shapes may be used.
[0297] Although the process of generating a predicted image from one reference picture has been described here, the same applies when generating a predicted image from multiple reference pictures, and a brightness correction process may be performed on the reference images obtained from each reference picture in the same manner as described above before generating a predicted image.
[0298] As a method for determining whether to apply LIC processing, for example, there is a method using lic_flag, which is a signal indicating whether to apply LIC processing. As a specific example, in an encoding device, it determines whether the current block belongs to an area where a luminance change occurs, and if the current block belongs to an area where a luminance change occurs, it sets the value of lic_flag to 1 and performs encoding by applying LIC processing, and if the current block does not belong to an area where a luminance change occurs, it sets the value of lic_flag to 0 and performs encoding without applying LIC processing. On the other hand, a decoding device may decode lic_flag described in the stream, and switch whether to apply LIC processing depending on the value, and perform decoding.
[0299] Another method for determining whether to apply LIC processing is, for example, a method for determining whether to apply LIC processing to neighboring blocks. As a specific example, when the current block is in merge mode, it is determined whether the neighboring coded blocks selected when deriving MV in merge mode processing have been coded using LIC processing. Depending on the result, whether to apply LIC processing is switched and coding is performed. Note that even in this example, the same processing is applied to the processing on the decoding device side.
[0300] The LIC process (brightness correction process) has been described with reference to FIG. 39, and will be described in detail below.
[0301] First, the inter prediction unit 126 derives a motion vector for obtaining a reference image corresponding to the current block from a reference picture that is an already-encoded picture.
[0302] Next, the inter prediction unit 126 uses the luminance pixel values of the coded surrounding reference areas adjacent to the left and above the current block to extract information indicating how the luminance values have changed between the reference picture and the current picture to calculate a luminance correction parameter, using the luminance pixel values of the coded surrounding reference areas adjacent to the left and above, and the luminance pixel values at the equivalent positions in the reference picture specified by the motion vector. For example, the luminance pixel value of a pixel in the surrounding reference area in the current picture to be coded is set to p0, and the luminance pixel value of a pixel in the surrounding reference area in the reference picture at the equivalent position to the pixel is set to p1. The inter prediction unit 126 calculates coefficients A and B that optimize A×p1+B=p0 as the luminance correction parameter for multiple pixels in the surrounding reference areas.
[0303] Next, the inter prediction unit 126 generates a predicted image for the current block by performing luminance correction processing on a reference image in a reference picture specified by the motion vector using the luminance correction parameter. For example, the luminance pixel value in the reference image is set to p2, and the luminance pixel value of the predicted image after the luminance correction processing is set to p3. The inter prediction unit 126 generates a predicted image after the luminance correction processing by calculating A×p2+B=p3 for each pixel in the reference image.
[0304] Note that the shape of the surrounding reference area in FIG. 39 is an example, and other shapes may be used. Also, a portion of the surrounding reference area shown in FIG. 39 may be used. For example, an area including a predetermined number of pixels thinned out from each of the upper adjacent pixels and the left adjacent pixels may be used as the surrounding reference area. Furthermore, the surrounding reference area is not limited to an area adjacent to the current block to be coded, and may also be an area not adjacent to the current block to be coded. Furthermore, in the example shown in FIG. 39 , the surrounding reference area in the reference picture is an area specified by a motion vector of the current picture to be coded from the surrounding reference area in the current picture to be coded, but may also be an area specified by another motion vector. For example, the other motion vector may be the motion vector of the surrounding reference area in the current picture to be coded.
[0305] Although the operation of the encoding device 100 has been described above, the operation of the decoding device 200 is similar.
[0306] The LIC process may be applied to color differences as well as luminance. In this case, correction parameters may be derived individually for each of Y, Cb, and Cr, or a common correction parameter may be used for any of them.
[0307] Alternatively, the LIC process may be applied on a sub-block basis. For example, correction parameters may be derived using a surrounding reference region of the current sub-block and a surrounding reference region of a reference sub-block in a reference picture specified by the MV of the current sub-block.
[0308] [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.
[0309] As shown in FIG. 1 , in various implementations, the prediction control unit 128 may output prediction parameters that are input to the entropy coding unit 110. The entropy coding unit 110 may generate an encoded bitstream (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 bitstream and perform the same prediction process as that performed by the intra predictor 124, the inter predictor 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 by the intra predictor 124 or the inter predictor 126), or any index, flag, or value based on or indicating the prediction process performed by the intra predictor 124, the inter predictor 126, and the prediction control unit 128.
[0310] [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, several components of the encoding device 100 shown in Fig. 1 are implemented by the processor a1 and memory a2 shown in Fig. 40.
[0311] 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 moving images. The processor a1 may be a processor such as a CPU. The processor a1 may also be a collection of multiple electronic circuits. For example, the processor a1 may fulfill the roles of multiple components of the encoding device 100 shown in FIG. 1 and the like, excluding the components for storing information.
[0312] The memory a2 is a dedicated or general-purpose memory that stores information used by the processor a1 to encode moving images. The memory a2 may be an electronic circuit and may be connected to the processor a1. The memory a2 may also be included in the processor a1. The memory a2 may also be a collection of multiple electronic circuits. The memory a2 may also be a magnetic disk, an optical disk, or the like, and may also be expressed as storage, a recording medium, or the like. The memory a2 may also be a non-volatile memory or a volatile memory.
[0313] For example, the memory a2 may store a video to be encoded, or a bit string corresponding to the encoded video, or may store a program for the processor a1 to encode the video.
[0314] Furthermore, for example, the memory a2 may serve as a component for storing information among the multiple components of the encoding device 100 shown in Fig. 1 etc. 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 reconstructed blocks, reconstructed pictures, etc.
[0315] It should be noted that not all of the components shown in Figure 1 etc. may be implemented, and not all of the processes described above may be performed, in the encoding device 100. Some of the components shown in Figure 1 etc. may be included in another device, and some of the processes described above may be performed by another device.
[0316] [Decoding Device] Next, a description will be given of a decoding device capable of decoding the coded signal (coded bit stream) output from the coding device 100. Fig. 41 is a block diagram showing the functional configuration of a decoding device 200 according to this embodiment. The decoding device 200 is a video decoding device that decodes video on a block-by-block basis.
[0317] As shown in FIG. 41, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.
[0318] The decoding device 200 is realized by, for example, a general-purpose processor and memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. Alternatively, the decoding device 200 may be realized as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0319] Below, the overall processing flow of the decoding device 200 will be explained, and then each component included in the decoding device 200 will be explained.
[0320] [Overall Flow of Decoding Process] FIG. 42 is a flowchart showing an example of the overall decoding process by the decoding device 200.
[0321] First, the entropy decoding unit 202 of the decoding device 200 identifies a division pattern for fixed-size blocks (128×128 pixels) (step Sp_1). This division pattern is the division pattern selected by the encoding device 100. The decoding device 200 then performs the processes of steps Sp_2 to Sp_6 on each of the multiple blocks that make up the division pattern.
[0322] That is, the entropy decoding unit 202 decodes (specifically, entropy decodes) the coded quantized coefficients and prediction parameters of the block to be decoded (also referred to as the current block) (step Sp_2).
[0323] Next, the inverse quantization unit 204 and the inverse transform unit 206 perform inverse quantization and inverse transform on the quantized coefficients to reconstruct a plurality of prediction residuals (i.e., difference blocks) (step Sp_3).
[0324] Next, the prediction processing unit, which is made up 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 called a prediction block) of the current block (step Sp_4).
[0325] Next, the adder 208 reconstructs the current block into a reconstructed image (also called a decoded image block) by adding the predicted block to the difference block (step Sp_5).
[0326] Then, when this reconstructed image is generated, the loop filter unit 212 performs filtering on the reconstructed image (step Sp_6).
[0327] Then, the decoding device 200 determines whether or not the decoding of the entire picture is completed (step Sp_7), and if it determines that the decoding is not completed (No in step Sp_7), it repeats the process from step Sp_1.
[0328] The processes of steps Sp_1 to Sp_7 may be performed sequentially by the decoding device 200, or some of the processes may be performed in parallel, or the order of the processes may be changed.
[0329] [Entropy Decoding Unit] The entropy decoding unit 202 entropy decodes the coded bitstream. Specifically, for example, the entropy decoding unit 202 arithmetically decodes the coded bitstream into a binary signal. The entropy decoding unit 202 then debinarizes the binary signal. The entropy decoding unit 202 outputs quantized coefficients to the inverse quantization unit 204 on a block-by-block basis. The entropy decoding unit 202 may output prediction parameters included in the coded bitstream (see FIG. 1 ) to the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. The intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220 can perform the same prediction processing as the processing performed by the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128 on the coding device side.
[0330] [Inverse Quantization Unit] The inverse quantization unit 204 inverse quantizes the quantized coefficients of the block to be decoded (hereinafter referred to as the current block) that is input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inverse quantizes each quantized coefficient of the current block based on a quantization parameter corresponding to the quantized coefficient. The inverse quantization unit 204 then outputs the inverse quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.
[0331] [Inverse Transform Unit] The inverse transform unit 206 restores prediction errors by inversely transforming the transform coefficients input from the inverse quantization unit 204 .
[0332] For example, if the information interpreted from the encoded bitstream indicates that EMT or AMT is to be applied (e.g., the AMT flag is true), the inverse transform unit 206 inverse transforms the transform coefficients of the current block based on the interpreted information indicating the transform type.
[0333] Also, for example, if the information interpreted from the coded bitstream indicates that an NSST is to be applied, then inverse transform unit 206 applies an inverse re-transform to the transform coefficients.
[0334] The adder 208 reconstructs the current block by adding the prediction error input from the inverse transformer 206 and the prediction sample input from the prediction control unit 220. The adder 208 then outputs the reconstructed block to the block memory 210 and the loop filter unit 212.
[0335] [Block Memory] The block memory 210 is a storage unit for storing blocks that are referenced in intra prediction and are in a picture to be decoded (hereinafter referred to as a current picture). Specifically, the block memory 210 stores the reconstructed blocks output from the adder 208.
[0336] [Loop Filter Unit] The loop filter unit 212 applies a loop filter to the block reconstructed by the adder unit 208, and outputs the filtered reconstructed block to the frame memory 214, a display device, or the like.
[0337] If the information indicating ALF on / off read from the encoded bitstream indicates ALF on, one filter is selected from multiple filters based on the local gradient direction and activity, and the selected filter is applied to the reconstructed block.
[0338] [Frame Memory] The frame memory 214 is a storage unit for storing reference pictures used in inter prediction, and is also called a frame buffer. Specifically, the frame memory 214 stores the reconstructed blocks filtered by the loop filter unit 212.
[0339] [Prediction Processing Unit (Intra Prediction Unit, Inter Prediction Unit, Prediction Control Unit)] Fig. 43 is a diagram showing an example of processing performed in the prediction processing unit of the decoding device 200. Note that the prediction processing unit is made up of all or some of the components of the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0340] The prediction processing unit generates a predicted image of the current block (step Sq_1). This predicted image is also called a predicted signal or a predicted block. The predicted signal may be, for example, an intra-prediction signal or an inter-prediction signal. Specifically, the prediction processing unit generates the predicted image of the current block using a reconstructed image already obtained by generating a predicted block, generating a difference block, generating a coefficient block, restoring the difference block, and generating a decoded image block.
[0341] The reconstructed image may be, for example, an image of a reference picture or an image of a decoded block in a current picture, which is a picture that includes the current block. The decoded block in the current picture may be, for example, a neighboring block of the current block.
[0342] FIG. 44 is a diagram showing another example of the processing performed by the prediction processing unit of the decoding device 200.
[0343] 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 prediction parameters, etc.
[0344] When the prediction processing unit determines that the first method is the mode for generating the predicted image, it generates the predicted image according to the first method (step Sr_2a). When the prediction processing unit determines that the second method is the mode for generating the predicted image, it generates the predicted image according to the second method (step Sr_2b). When the prediction processing unit determines that the third method is the mode for generating the predicted image, it generates the predicted image according to the third method (step Sr_2c).
[0345] The first, second, and third schemes are different schemes for generating a predicted image, and may be, for example, an inter-prediction scheme, an intra-prediction scheme, or other prediction schemes, respectively. These prediction schemes may use the reconstructed image described above.
[0346] [Intra Prediction Unit] The intra prediction unit 216 generates a prediction signal (intra prediction signal) by performing intra prediction based on the intra prediction mode interpreted from the encoded bitstream, by referring to blocks in the current picture stored in the block memory 210. Specifically, the intra prediction unit 216 generates the intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 220.
[0347] Note that when an intra prediction mode that references a luminance block is selected for intra prediction of a chrominance block, the intra prediction unit 216 may predict the chrominance component of the current block based on the luminance component of the current block.
[0348] Furthermore, when information interpreted from the coded bitstream indicates the application of PDPC, the intra prediction unit 216 corrects pixel values after intra prediction based on the gradients of reference pixels in the horizontal and vertical directions.
[0349] [Inter Prediction Unit] The inter prediction unit 218 predicts the current block by referring to a reference picture stored in the frame memory 214. Prediction is performed in units of the current block or sub-blocks (e.g., 4x4 blocks) within the current block. For example, the inter prediction unit 218 generates an inter prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., motion vectors) interpreted from the coded bitstream (e.g., prediction parameters output from the entropy decoding unit 202), and outputs the inter prediction signal to the prediction control unit 220.
[0350] If the information interpreted from the encoded bitstream indicates that the OBMC mode is to be applied, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion estimation, but also the motion information of adjacent blocks.
[0351] Furthermore, if the information interpreted from the coded bitstream indicates that the FRUC mode is to be applied, the inter prediction unit 218 derives motion information by performing motion search according to the pattern matching method (bilateral matching or template matching) interpreted from the coded bitstream. Then, the inter prediction unit 218 performs motion compensation (prediction) using the derived motion information.
[0352] Furthermore, when the BIO mode is applied, the inter prediction unit 218 derives a motion vector based on a model assuming constant-velocity linear motion. Furthermore, when information interpreted from the coded bitstream indicates that the affine motion compensation prediction mode is to be applied, the inter prediction unit 218 derives a motion vector for each sub-block based on the motion vectors of multiple adjacent blocks.
[0353] [MV derivation > Normal inter mode] If the information interpreted from the encoded bitstream indicates that normal inter mode should be applied, the inter prediction unit 218 derives an MV based on the information interpreted from the encoded bitstream and performs motion compensation (prediction) using that MV.
[0354] FIG. 45 is a flowchart showing an example of inter prediction in normal inter mode in the decoding device 200.
[0355] The inter prediction unit 218 of the decoding device 200 performs motion compensation on each block. To do this, the inter prediction unit 218 first obtains multiple candidate MVs for the current block based on information such as the MVs of multiple decoded blocks temporally or spatially surrounding the current block (step Ss_1). In other words, the inter prediction unit 218 creates a candidate MV list.
[0356] Next, the inter prediction unit 218 extracts N candidate MVs (N is an integer equal to or greater than 2) from the plurality of candidate MVs acquired in step Ss_1 as motion vector predictor candidates (also referred to as prediction MV candidates) according to a predetermined priority order (step Ss_2). Note that the priority order is predetermined for each of the N prediction MV candidates.
[0357] Next, the inter prediction unit 218 decodes the predicted motion vector selection information from the input stream (i.e., the encoded bitstream), and uses the decoded predicted motion vector selection information to select one predicted MV candidate from the N predicted MV candidates as the predicted motion vector (also called predicted MV) for the current block (step Ss_3).
[0358] Next, the inter prediction unit 218 decodes the differential MV from the input stream and derives the MV of the current block by adding the differential value of the decoded differential MV to the selected predicted motion vector (step Ss_4).
[0359] Finally, the inter prediction unit 218 performs motion compensation on the current block using the derived MV and the decoded reference picture to generate a predicted image of the current block (step Ss_5).
[0360] [Prediction Control Unit] The prediction control unit 220 selects either an intra-prediction signal or an inter-prediction signal, and outputs the selected signal as a prediction signal to the adder 208. Overall, the configurations, functions, and processing of the prediction control unit 220, intra-prediction unit 216, and inter-prediction unit 218 on the decoding device side may correspond to the configurations, functions, and processing of the prediction control unit 128, intra-prediction unit 124, and inter-prediction unit 126 on the encoding device side.
[0361] [Implementation Example of Decoding Device] Fig. 46 is a block diagram showing an implementation example of the decoding device 200. The decoding device 200 includes a processor b1 and a memory b2. For example, multiple components of the decoding device 200 shown in Fig. 41 are implemented by the processor b1 and memory b2 shown in Fig. 46.
[0362] 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 encoded video (i.e., an encoded bitstream). The processor b1 may be a processor such as a CPU. Alternatively, the processor b1 may be a collection of multiple electronic circuits. Furthermore, for example, the processor b1 may fulfill the roles of multiple components of the decoding device 200 shown in FIG. 41 and the like, excluding the components for storing information.
[0363] The memory b2 is a dedicated or general-purpose memory that stores information for the processor b1 to decode the coded bitstream. The memory b2 may be an electronic circuit and may be connected to the processor b1. The memory b2 may also be included in the processor b1. The memory b2 may also be a collection of multiple electronic circuits. The memory b2 may also be a magnetic disk, an optical disk, or the like, and may also be expressed as a storage or a recording medium. The memory b2 may also be a non-volatile memory or a volatile memory.
[0364] For example, the memory b2 may store a video or an encoded bitstream, or may store a program for the processor b1 to decode the encoded bitstream.
[0365] Furthermore, for example, memory b2 may play the role of a component for storing information among the multiple components of decoding device 200 shown in Fig. 41 etc. Specifically, memory b2 may play the role of block memory 210 and frame memory 214 shown in Fig. 41. More specifically, memory b2 may store reconstructed blocks, reconstructed pictures, etc.
[0366] Note that not all of the components shown in Figure 41 etc. may be implemented, and not all of the above-described processes may be performed, in the decoding device 200. Some of the components shown in Figure 41 etc. may be included in another device, and some of the above-described processes may be executed by another device.
[0367] [Definition of Each Term] As an example, each term may be defined as follows.
[0368] A picture is an array of luma samples in monochrome format, or two corresponding arrays of luma samples and chroma samples in 4:2:0, 4:2:2 and 4:4:4 color formats. A picture may be a frame or a field.
[0369] A frame is a composition of a top field from which a number of sample rows 0, 2, 4, . . . occur, and a bottom field from which a number of sample rows 1, 3, 5, .
[0370] A slice is an integer number of coding tree units contained in one independent slice segment and all subsequent dependent slice segments (if any) that precede the next independent slice segment (if any) within the same access unit.
[0371] A tile is a rectangular region of multiple coding tree blocks within a particular tile column and a particular tile row in a picture. A tile may also be a rectangular region of a frame that is intended to be independently decoded and coded, although loop filters across tile edges may still be applied.
[0372] A block is an MxN (N rows and M columns) array of samples or an MxN array of transform coefficients. A block may also be a square or rectangular region of pixels consisting of one luma and two chroma matrices.
[0373] A CTU (coding tree unit) may be a coding tree block of luma samples for a picture with a three-sample arrangement, or two corresponding coding tree blocks of chroma samples, or a coding tree block of samples for either a monochrome picture or a picture coded using a syntax structure used to code three separate color planes and samples.
[0374] A superblock may comprise one or two mode information blocks, or may be a square block of 64x64 pixels that can be recursively divided into four 32x32 blocks and further divided.
[0375] [Explanation of Secondary Transformation Processing] FIG. 47 is a diagram illustrating secondary transformation processing in an embodiment. The secondary transformation processing is a transformation processing that the encoding device 100 or the decoding device 200 performs on the prediction residual signal after performing a primary transformation on the prediction residual signal. In the secondary transformation processing, an orthogonal transform or the like is performed as a transformation processing. The region where the secondary transformation processing is performed may be different from the region where the primary transformation processing is performed. For example, even if the primary transformation processing is performed on the entire target block, as shown in FIG. 47, the secondary transformation processing may be performed on a portion of the target block. Here, the portion of the target block may be, for example, a sub-block on the low frequency side.
[0376] Furthermore, the size of the sub-block on which the secondary transform process is performed does not have to be a fixed size. For example, the encoding device 100 may change the size of the sub-block on which the secondary transform process is performed depending on the block size of the target block.
[0377] Furthermore, the primary conversion process and the secondary conversion process may be separable or non-separable.
[0378] There may be multiple candidate bases used in the secondary transform process. For example, the encoding device 100 may store a total of six candidate bases: 4×4 basis A, 4×4 basis B, 4×4 basis C, 8×8 basis D, 8×8 basis E, and 8×8 basis F. The encoding device 100 may select a candidate to be used in the secondary transform process from among the multiple candidates, and write information about the selected candidate to the bitstream.
[0379] When selecting a basis candidate to be used for the secondary transformation process from a plurality of basis candidates, the number of basis candidates to be used may be limited based on any parameter. For example, when selecting a basis candidate to be used for the secondary transformation process from a plurality of basis candidates, if the length of the short side of the target block is 8 or more, an 8x8 basis may be used. Furthermore, when selecting a basis candidate to be used for the secondary transformation process from a plurality of basis candidates, if the length of the short side of the target block is 4, a 4x4 basis may be used.
[0380] [Internal Configuration of the Conversion Unit of the Encoding Device] FIG. 48 is a flowchart showing the processing procedure in the conversion unit of the encoding device according to this embodiment.
[0381] First, the encoding device 100 determines whether the current block is equal to or smaller than a predetermined block size (step S1000). Here, for example, the predetermined block size may be a 4x4 square block size. Alternatively, the predetermined block size may be a 4x8 or 8x4 rectangular block size. Alternatively, the predetermined block size may be the smallest block size among the candidate block sizes that the encoding device 100 can select from among the candidate bases used in the secondary transform process.
[0382] If the encoding device 100 determines that the current block is equal to or smaller than the predetermined block size (Yes in step S1000), the encoding device 100 terminates its operation without performing secondary transform processing on the current block. In this case, the encoding device 100 does not need to write signals related to the secondary transform processing into the bitstream. In other words, the encoding device 100 does not need to encode signals related to the secondary transform processing in the bitstream.
[0383] If the encoding device 100 determines that the current block is larger than the predetermined block size (No in step S1000), the encoding device 100 determines whether to apply secondary transformation processing to the current block (step S1001).
[0384] If the encoding device 100 determines that a secondary transform process is to be applied to the current block (Yes in step S1001), the encoding device 100 selects one candidate basis from one or more candidate bases for the secondary transform process (step S1002). The determination in step S1001 and the selection in step S1002 may be made based on information such as the coding mode of the current block. Alternatively, the determination in step S1001 and the selection in step S1002 may be made by evaluating costs by performing a virtual transform process using each of the candidate bases for the one or more secondary transform processes in step S1002. Furthermore, signals indicating the results of the determinations and selections made in steps S1001 and S1002 may be written into the bitstream by the encoding device 100. That is, the signals indicating the results of the determinations and selections made in steps S1001 and S1002 may be coded into the bitstream by the encoding device 100.
[0385] In step S1002, one or more candidate bases for the secondary transform process may be changed depending on the size of the target block. For example, when the length of the short side of the target block is less than 16, the encoding device 100 may select a 4x4 square base as a candidate base for the secondary transform process. When the length of the short side of the target block is 16 or greater, the encoding device 100 may select an 8x8 square base as a candidate base for the secondary transform process.
[0386] Next, the encoding device 100 performs a secondary transformation process using the basis candidates selected in step S1002 (step S1003), and then ends the operation of the encoding device 100.
[0387] If the encoding device 100 determines that the secondary transformation process is not to be applied to the current block (No in step S1001), the encoding device 100 ends the operation.
[0388] Note that the processing flow described in Figure 48 is an example, and the order of the processing described in Figure 48 may be changed, some of the processing described may be removed, or processing not described may be added.
[0389] 48 is also performed in the inverse transform unit of the decoding device 200. In the inverse transform unit of the decoding device 200, the operation of encoding a signal into a bit stream, which is performed in the transform unit of the encoding device 100, is changed to the operation of decoding a signal from the bit stream.
[0390] Note that the processing flow of the decoding device 200 described above is an example, and the order of the described processing may be changed, some of the described processing may be removed, or processing not described may be added.
[0391] Fig. 49A is a table showing an example of the amount of processing required for primary transformation processing per block in an embodiment. Fig. 49B is a table showing an example of the amount of processing required for secondary transformation processing per block in an embodiment. According to the configuration of the embodiment, the encoding device 100 or the decoding device 200 may be able to reduce the amount of processing required for transformation processing.
[0392] 49A and 49B illustrate the amount of processing required for the primary conversion process and the secondary conversion process per block using specific examples. The amount of processing required for the primary conversion process and the secondary conversion process for the entire CTU (Coding Tree Unit) can be calculated using the following formula, for example: (Amount of processing required for the primary conversion process and the secondary conversion process for the entire CTU) = {(Amount of processing required for the primary conversion process) + (Amount of processing required for the secondary conversion process) × (Number of blocks spread across the CTU)}
[0393] In the primary transformation process, the block size of the block to be processed is set to a square block size using a value that is a power of 2, such as 4 × 4, 8 × 8, 16 × 16, or 32 × 32. Figures 49A and 49B show the assumed numbers of processes required for the primary transformation process and the secondary transformation process for each of the above block sizes.
[0394] Here, the amount of processing required for the primary transformation process and the secondary transformation process may be interpreted as the number of multiplications, the number of additions, and the sum of the number of multiplications and the number of additions.
[0395] Here, it is assumed that the size of the sub-block on which the secondary transformation process is performed, that is, the size of the base used in the secondary transformation process, is a 4×4 square or an 8×8 square.
[0396] Fig. 50 is a table showing a first example of the embodiment. Fig. 50 illustrates a first example in which the base candidates used in the secondary transformation process are only bases of 4 × 4 square size.
[0397] Assume that the shape of the CTU in the first example is a square of 128 × 128. For example, when a 4 × 4 square block is used as the processing target block, the amount of processing required for the primary conversion process and secondary conversion process of the entire CTU is calculated using the following formula.
[0398] (48 + 256) x {(128 / 4)^2} = 311,296 (times)
[0399] The amount of processing required for the primary transform process and the secondary transform process of the entire CTU for each block size of the block to be processed, calculated using the same calculation as above, is shown in Figure 50. In the first example shown in Figure 50, the encoding device 100 or the decoding device 200 uses a 4 × 4 square base for the secondary transform process for all sizes of blocks to be processed that are to be subjected to the primary transform process.
[0400] In the first example shown in Figure 50, the processing volume is greatest when the block size of the target block is a 32x32 square block, which is the largest. In contrast, the processing volume is second-largest when the block size of the target block is a 4x4 square block, which has the largest number of blocks in the CTU. However, for example, if the block size of the target block is 8x8 or larger and the encoding device 100 uses an 8x8 square base for the secondary transform process, the processing volume increases even more significantly than the processing volume shown in Figure 50. In other words, in the first example shown in Figure 50, the processing volume required for the primary transform process and the secondary transform process is reduced by reducing the size of the sub-block on which the secondary transform process is performed. The first example is a preferred example of candidate bases to be used for the secondary transform process, selected for the block size of the target block on which the primary transform process is performed.
[0401] However, the transform processing of the CTU performed by the transform unit of the encoding device 100 or the inverse transform unit of the decoding device 200 is expected to involve processing other than the primary transform processing and secondary transform processing shown in FIG. 50 . Therefore, depending on the processing volume of processing other than the primary transform processing and secondary transform processing, in the first example, the processing volume required when the block size of the target block is 4x4 may be significantly larger than in other cases. Here, the other processing refers to processing required for each target block. For example, preprocessing or postprocessing for the transform processing may be performed. Specifically, the preprocessing involves determining the memory storage method to be used, copying data to memory, transforming the copied data, scanning the transformed data block by block, and transmitting the data. Therefore, the 4x4 case has the largest number of blocks within the CTU that are subjected to primary transform processing and the largest number of sub-blocks that are subjected to secondary transform processing, and therefore the processing volume may be the largest when processing other than the primary transform processing and secondary transform processing is also taken into account.
[0402] Therefore, an example will be shown below for reducing the amount of processing performed by the encoding device 100, taking into consideration processes other than those required for the primary transform process and the secondary transform process. In the following example, examples of candidate bases used in the secondary transform process, which are selected for each block size of the target block for the primary transform process, will be described.
[0403] FIG. 51 is a table illustrating a second example of the embodiment. In the second example illustrated in FIG. 51 , the encoding device 100 or the decoding device 200 does not perform secondary transform processing when the block size of the target block to be processed is 4×4, but performs secondary transform processing using candidate bases of 4×4 square size when the block size of the target block to be processed is other than 4×4. Note that instead of performing secondary transform processing, the encoding device 100 may be configured to perform secondary transform processing using bases having transform characteristics such that coefficient values are equal before and after transform. FIG. 51 shows the amount of processing required for primary transform processing and secondary transform processing for the entire CTU for each block size of the target block in the second example, calculated using the formula used in FIG. 50 .
[0404] As shown in Figure 51, in the second example, the amount of processing required for the primary transform processing and the secondary transform processing when the block size of the target block is 4x4, which is the case when the amount of processing other than the primary transform processing and the secondary transform processing that occurs for each target block is the largest, is reduced compared to the first example. Therefore, even when the amount of processing other than the primary transform processing and the secondary transform processing that occurs for each target block is large, it is possible to suppress the maximum amount of processing that can occur in the transform processing of the entire CTU. Therefore, the encoding device 100 can promote reduction in circuit scale in a device implemented to perform the transform processing.
[0405] In the second example described in FIG. 51 , the encoding device 100 or the decoding device 200 does not perform secondary transform processing when the block size of the target block to be subjected to primary transform processing is 4×4. However, the encoding device 100 or the decoding device 200 may be configured not to perform secondary transform processing when the block size of the target block to be subjected to primary transform processing is other than 4×4. For example, the encoding device 100 or the decoding device 200 may not perform secondary transform processing when the block size of the target block to be subjected to primary transform processing is 8×8. Furthermore, for example, the encoding device 100 or the decoding device 200 may not perform secondary transform processing when the block size of the target block to be subjected to primary transform processing is 4×8 or 8×4. Furthermore, for example, the encoding device 100 or the decoding device 200 may not perform secondary transform processing when the block size of the target block to be subjected to primary transform processing is other than 8×8, 4×8, or 8×4. In other words, the encoding device 100 may be configured not to perform secondary transform processing when the size of the block to be processed is equal to or smaller than the smallest block size among one or more block sizes selectable for the secondary transform processing. In this case, the encoding device 100 may be configured to be able to apply secondary transform processing when the size of the block to be processed is larger than the smallest block size among one or more block sizes selectable for the secondary transform processing.
[0406] In addition, instead of the encoding device 100 performing secondary transformation processing, the encoding device 100 may be configured to perform secondary transformation processing using a base having transformation characteristics such that the coefficient values before and after transformation are equal.
[0407] With the above configuration, the encoding device 100 or the decoding device 200 can set the block sizes of the target blocks on which the primary transform processing is performed to mean that there are no candidate secondary transform bases for block sizes that may require a large amount of processing other than the primary transform processing and the secondary transform processing required for each target block. In other words, the encoding device 100 or the decoding device 200 can set the block sizes of the target blocks on which the primary transform processing is performed to mean that no secondary transform processing is performed for block sizes that may require a large amount of processing other than the primary transform processing and the secondary transform processing required for each target block.
[0408] For example, the encoding device 100 or the decoding device 200 can set a candidate secondary transform base to mean that there are no candidates when the block size of the block to be processed that is the target of primary transform processing is 8x8. Furthermore, for example, the encoding device 100 or the decoding device 200 can set a candidate secondary transform base to mean that there are no candidates when the block size of the block to be processed that is the target of primary transform processing is 4x8 or 8x4. Furthermore, for example, the encoding device 100 or the decoding device 200 can set a candidate secondary transform base to mean that there are no candidates when the block size of the block to be processed that is the target of primary transform processing is other than 8x8, 4x8, or 8x4. Furthermore, for example, the encoding device 100 or the decoding device 200 can set a candidate secondary transform base to mean that there are no candidates when the block size of the block to be processed that is the target of primary transform processing is other than 4x4.
[0409] This allows the encoding device 100 or the decoding device 200 to improve the possibility of suppressing the maximum amount of processing that can occur in the transform processing of a CTU, thereby promoting a reduction in the circuit scale in a device implemented for the transform processing.
[0410] When the encoding device 100 performs secondary transform processing using a 4 × 4 square base, part of the 4 × 4 square base may be set to 0. In other words, the 4 × 4 square base may have transform characteristics that force part of the transform coefficient values of the target block to be processed to 0 after secondary transform processing.
[0411] FIG. 52 is a table illustrating a third example of the embodiment. In the third example illustrated in FIG. 52, when the block size of the block to be processed is 4×4, secondary transform processing is not performed. When the block size of the block to be processed is 8×8, secondary transform processing is performed using a 4×4 square base. When the block size of the block to be processed is 16×16 or 32×32, secondary transform processing is performed using an 8×8 square base. Note that instead of performing secondary transform processing, the encoding device 100 may be configured to perform secondary transform processing using a base with transform characteristics that result in equal coefficient values before and after transform. FIG. 52 shows the amount of processing required for primary transform processing and secondary transform processing for the entire CTU for each block size of the block to be processed in the third example, calculated using the calculation formula used in FIG. 50.
[0412] As shown in FIG. 52 , in the third example, the amount of processing required for the primary and secondary transforms increases when 16×16 and 32×32 target blocks are used, compared to the first and second examples. However, the amount and rate of increase are not significant. On the other hand, in the third example, the amount of processing required for the primary and secondary transforms when the target block size is 4×4, which is the case when the processing amount for the processes other than the primary and secondary transforms that occur for each target block is the largest, is reduced compared to the first example. Therefore, even when the processing amount for the processes other than the primary and secondary transforms that occur for each target block is large, it is possible to suppress the maximum amount of processing that can occur in the transform processing of the entire CTU. In addition, because the size of the bases used in the secondary transform is larger in some areas than in the first and second examples, more efficient transform processing is possible, potentially improving coding efficiency. Therefore, the encoding device 100 can promote reduction in circuit scale in devices implemented to perform transform processing.
[0413] When performing secondary transformation processing using an 8 × 8 square base, part of the 8 × 8 square base may be set to 0. In other words, the 8 × 8 square base may have transformation characteristics such that part of the transformation coefficient values of the target block after secondary transformation processing are forcibly set to 0.
[0414] Note that the processes described in the second example illustrated in FIG. 51 and the third example illustrated in FIG. 52 are not necessarily applicable when the amount of processing required for each target block, other than the primary and secondary transform processes, is large. The processes described in the second example illustrated in FIG. 51 and the third example illustrated in FIG. 16 may be applicable when the amount of processing required for each target block, other than the primary and secondary transform processes, is small. In this case, the maximum amount of processing that can occur in the transform process of a CTU is smaller than when the processes described in the second example illustrated in FIG. 51 and the third example illustrated in FIG. 52 are applied when the amount of processing required for each target block, other than the primary and secondary transform processes, is large. Therefore, the encoding device 100 or the decoding device 200 can promote reduction in circuit size in a device implemented for performing the transform process.
[0415] FIG. 53 is a table illustrating a fourth example of the embodiment. In the first example shown in FIG. 50, a 4×4 square base used for secondary transformation is commonly used for all sizes of target blocks to be subjected to primary transformation, thereby making it possible to reduce the maximum amount of processing required for the primary transformation and secondary transformation. However, the above method is difficult to address the fact that the trends in coefficient values differ depending on the size of the target block during primary transformation. For example, there is a high possibility that the trends in coefficient values after primary transformation of a 4×4 square target block and the trends in coefficient values after primary transformation of a 4×4 square region corresponding to the low-frequency side of a 16×16 square target block are significantly different. In this case, if a common candidate base used for secondary transformation is used for target blocks of different sizes, there is a high possibility that the optimal candidate base will not be used for the secondary transformation.
[0416] Therefore, in a fourth example, as shown in FIG. 53 , even if the bases used in the secondary transform process are the same size, the encoding device 100 assigns a candidate group, in which different bases are used as the secondary transform bases for each size of the block to be processed in the primary transform process, to the sub-blocks on which the secondary transform process is performed. The encoding device 100 selects a base to actually apply in the secondary transform process from the candidate group assigned to the sub-block on which the secondary transform process is performed. Here, the candidate group may include multiple candidates for the base to be used in the secondary transform process, or may include one candidate for the base to be used in the secondary transform process. The candidates included in the candidate group may be multiple candidates that differ depending on the direction of intra prediction.
[0417] As a result, the optimal transform bases are defined according to the tendency of coefficient values after the primary transform process in the area in the target block where the secondary transform process is performed, as candidate bases used in the secondary transform process that are assigned to the target block in the primary transform process according to the block size. Thus, the encoding device 100 can select more appropriate candidate bases to be used in the secondary transform process than in the first example.
[0418] In the fourth example described in Figure 53, the shape of the base used in the secondary transform process is a 4x4 square, but it may be a shape other than a 4x4 square. Also, in the fourth example, bases of different sizes may be used in the secondary transform process depending on the size of the block to be processed. Also, the encoding device 100 may not perform secondary transform process on some of the sizes of the block to be processed.
[0419] Furthermore, in the fourth example described in Figure 53, the encoding device 100 uses a different set of candidate bases to be used in the secondary transformation process for each size of the processing target block on which the primary transformation process is performed, but the encoding device 100 may also use a common set of candidate bases to be used in the secondary transformation process for processing target blocks of different sizes on which the primary transformation process is performed.
[0420] 50 to 53 show a configuration in which one candidate base is used when a secondary conversion process is performed for each block size of the target block to be subjected to the primary conversion process. However, in the examples described in Figures 50 to 53, multiple candidate bases may be used when a secondary conversion process is performed for each block size of the target block to be subjected to the primary conversion process. Furthermore, in the examples described in Figures 50 to 53, among the block sizes of the target block to be subjected to the primary conversion process, there may be a block size that has multiple candidate bases to be used when a secondary conversion process is performed.
[0421] For example, when the block size of a processing target block on which primary transformation processing is performed is 32 × 32, the encoding device 100 or the decoding device 200 may be configured to select a basis to be used in the secondary transformation processing from a 4 × 4 base or an 8 × 8 base. Furthermore, when the block size of a processing target block on which primary transformation processing is performed is 16 × 16, the encoding device 100 or the decoding device 200 may be configured to select a basis to be used in the secondary transformation processing from a 4 × 4 base or an 8 × 8 base. Furthermore, when secondary transformation processing is performed on multiple processing target blocks of multiple block sizes on which primary transformation processing is performed, there may be multiple candidate bases to be used in the secondary transformation processing.
[0422] In the fourth example described in FIG. 53 , the encoding device 100 selects a basis to be used in the secondary transform process from a different set of candidate bases for each size of the target block to be subjected to the primary transform process. However, this example is not limiting. For example, a candidate set may be configured such that even if the candidates in the candidate set share a common base, they are different candidates whose differences lie in whether or not they undergo secondary transform process by replacing some coefficients of the bases with zero. That is, in a given candidate set, the candidates may have transform characteristics such that some transform coefficient values of the target block after secondary transform process are forced to zero. In other words, a candidate set with different bases does not simply refer to a candidate set with different bases; a candidate set with different bases may also be considered to be a candidate set with different bases if it includes candidates whose bases are the same but whose coefficients of the block after secondary transform process using the bases are different.
[0423] The encoding device 100 or the decoding device 200 may perform different secondary transform processes depending on the block size of the target block on which the primary transform process is performed.
[0424] The processing contents of the encoding device shown in Figures 50 to 53 are similarly performed in the decoding device.
[0425] [Variation] When the block division structure of the block to be processed differs between the color difference signal and the luminance signal, the encoding device 100 or the decoding device 200 may apply the encoding method or the decoding method, etc., according to the embodiment of the present disclosure to only the luminance signal or only the color difference signal.
[0426] Furthermore, the encoding device 100 or the decoding device 200 may determine whether to apply the encoding method or the decoding method according to the embodiments of the present disclosure to the current block on a slice-by-slice or tile-by-tile basis.
[0427] In addition, the encoding device 100 or the decoding device 200 may determine whether to apply the encoding method and decoding method, etc. in the embodiments of the present disclosure depending on the slice type (I-slice, P-slice, B-slice) of the block to be processed.
[0428] In addition, the encoding device 100 or the decoding device 200 may write a flag indicating that the encoding method or decoding method, etc. in an embodiment of the present disclosure has been applied to the block to be processed in the syntax of the sequence layer, picture layer, slice layer, etc.
[0429] Furthermore, when applying the encoding method or decoding method, etc., according to the embodiments of the present disclosure to a current block, the encoding device 100 or the decoding device 200 may use a determination method for base candidates different from the method for determining base candidates used in the secondary transform processing according to the embodiments of the present disclosure. Furthermore, the encoding device 100 or the decoding device 200 may use a determination method for base candidates different from the method for determining base candidates used in the secondary transform processing according to the embodiments of the present disclosure in combination with the method for determining base candidates used in the secondary transform processing according to the embodiments of the present disclosure. For example, the encoding device 100 or the decoding device 200 may use a combination of the method for determining base candidates used in the secondary transform processing using an intra prediction mode and the method for determining base candidates used in the secondary transform processing according to the embodiments of the present disclosure.
[0430] In the encoding method, decoding method, etc. according to the embodiment of the present disclosure, the block to be processed is assumed to be square, but the block to be processed does not have to be square. In the encoding method, decoding method, etc. according to the embodiment of the present disclosure, the block to be processed may be rectangular, for example.
[0431] In the encoding method, decoding method, etc. according to the embodiment of the present disclosure, the shape of the base used in the secondary transformation process is a square, but the shape of the base used in the secondary transformation process does not have to be a square. In the encoding method, decoding method, etc. according to the embodiment of the present disclosure, the shape of the base used in the secondary transformation process may be, for example, a rectangle.
[0432] [Representative Example] Fig. 54 is a flowchart showing an example of the operation of the encoding device in this embodiment. For example, the encoding device 100 shown in Fig. 40 performs the operation shown in Fig. 54 when performing a transform process that applies a secondary transform process to a prediction residual signal that has been subjected to a primary transform. Specifically, the processor a1 performs the following operations using the memory a2.
[0433] First, the encoding device 100 selects one transform base from a group of one or more transform base candidates that differ depending on the block size of the block to be processed (step S2001).
[0434] Next, the encoding apparatus 100 further applies a secondary transform of a common block size to the transform coefficients obtained by applying the linear transform to the prediction residual signal (step S2002).
[0435] In addition, in the encoding device 100, the transform base of the secondary transform may be a 4×4 square.
[0436] Furthermore, in the encoding device 100, the transform base of the secondary transform may be an 8×8 square.
[0437] Furthermore, in the encoding device 100, common candidates for the transform base may be assigned in the secondary transform to blocks to be processed that have some of the sizes among a plurality of block sizes.
[0438] In addition, the encoding device 100 may determine not to apply secondary transformation to the transform coefficients when the block size of the block to be processed is equal to or smaller than a predetermined block size, and may determine to apply secondary transformation to the transform coefficients when the block size of the block to be processed is larger than the predetermined block size.
[0439] Furthermore, when the encoding apparatus 100 determines that secondary transform is not to be applied to the current block, the predetermined block size of the current block may be a 4×4 square.
[0440] Furthermore, when the encoding apparatus 100 determines that secondary transform is not to be applied to the current block, the predetermined block size of the current block may be a 4×8 or 8×4 rectangle.
[0441] Furthermore, when the encoding device 100 determines not to apply secondary transformation to the block to be processed, the specified block size of the block to be processed may be equal to the smallest block size of the block to be processed that can be selected for the secondary transformation among the block sizes of the block to be processed that can be selected for the secondary transformation.
[0442] Fig. 55 is a flowchart showing an example of the operation of a decoding device according to an embodiment. For example, the decoding device 200 shown in Fig. 46 performs the operation shown in Fig. 55 when performing inverse transform processing, in which a linear transform is further applied to transform coefficients to which a secondary transform has been applied. Specifically, the processor b1 performs the following operations using the memory b2.
[0443] First, the decoding device 200 selects one transformation basis from a group of candidates that are made up of one or more candidates for the transformation basis and that differ depending on the block size of the block to be processed (step S3001).
[0444] Next, the decoding device 200 performs an inverse transform process of applying a linear transform to the transform coefficients obtained by applying a secondary transform of a common block size to the transform coefficient signals (step S3002).
[0445] In addition, in the decoding device 200, the transform base of the secondary transform may be a 4×4 square.
[0446] In addition, in the decoding device 200, the transform base of the secondary transform may be an 8×8 square.
[0447] Furthermore, in the decoding device 200, common candidates for the transform base may be assigned in the secondary transform to blocks to be processed that have some sizes among a plurality of block sizes.
[0448] In addition, the decoding device 200 may determine not to apply secondary transformation to the transform coefficients when the block size of the block to be processed is equal to or smaller than a predetermined block size, and may determine to apply secondary transformation to the transform coefficients when the block size of the block to be processed is larger than the predetermined block size.
[0449] Furthermore, when the decoding device 200 determines not to apply secondary transform to the current block, the predetermined block size of the current block may be a 4×4 square.
[0450] Furthermore, when the decoding device 200 determines not to apply secondary transform to the current block, the predetermined block size of the current block may be a 4×8 or 8×4 rectangle.
[0451] In addition, when the decoding device 200 determines not to apply secondary transformation to the block to be processed, the specified block size of the block to be processed may be equal to the smallest block size of the block to be processed that can be selected in the secondary transformation among the block sizes of the block to be processed that can be selected in the secondary transformation.
[0452] [Supplementary Information] The encoding device 100 and the decoding device 200 in this embodiment may be used as an image encoding device and an image decoding device, respectively, or as a video encoding device and a video decoding device.
[0453] In each of the above embodiments, each component may be configured with dedicated hardware, or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or processor reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory.
[0454] Specifically, each of the encoding device 100 and the decoding device 200 may include a processing circuit and a storage device electrically connected to and accessible from the processing circuit. For example, the processing circuit corresponds to the processor a1 or b1, and the storage device corresponds to the memory a2 or b2.
[0455] The processing circuit includes at least one of dedicated hardware and a program execution unit, and executes processing using a storage device. If the processing circuit includes a program execution unit, the storage device stores the software program executed by the program execution unit.
[0456] Here, the software for realizing the encoding device 100 or the decoding device 200 according to the present embodiment is the following program.
[0457] In other words, this program may cause a computer to perform a transformation process in which a transform coefficient obtained by applying a linear transform to a prediction residual signal in a target block among multiple blocks of multiple block sizes is further transformed by applying a secondary transform of a block size common to the multiple blocks, and the secondary transform of the common block size is composed of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
[0458] Alternatively, this program may cause a computer to perform an inverse transform process in which a primary transform is applied to transform coefficients obtained by applying a secondary transform of a block size common to a target block of a target block having a plurality of block sizes to a transform coefficient signal of the target block, and the secondary transform of the common block size is composed of one or more candidate transform bases, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
[0459] Furthermore, as described above, each component may be a circuit. These circuits may form a single circuit as a whole, or each may be a separate circuit. Furthermore, each component may be realized by a general-purpose processor or a dedicated processor.
[0460] Furthermore, a process performed by a specific component may be performed by another component. The order in which the processes are performed may be changed, or multiple processes may be performed in parallel. Furthermore, the encoding / decoding device may include the encoding device 100 and the decoding device 200.
[0461] Furthermore, ordinal numbers such as first and second used in the description may be changed as appropriate. Furthermore, new ordinal numbers may be assigned to components or removed.
[0462] Although aspects of the encoding device 100 and the decoding device 200 have been described above based on the embodiments, the aspects of the encoding device 100 and the decoding device 200 are not limited to these embodiments. As long as they do not deviate from the spirit of the present disclosure, various modifications conceivable by those skilled in the art to the present embodiments and configurations constructed by combining components of different embodiments may also be included within the scope of the aspects of the encoding device 100 and the decoding device 200.
[0463] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.
[0464] (Embodiment 2) [Implementation and Application] In each of the above embodiments, each of the functional or operational blocks can typically be realized by an MPU (micro processing unit), memory, etc. Furthermore, the processing by each of the functional blocks may be realized as a program execution unit such as a processor that reads and executes software (programs) recorded on a recording medium such as a ROM. The software may be distributed. The software may be recorded on various recording media such as semiconductor memory. It is also possible to realize each functional block by hardware (dedicated circuitry).
[0465] The processing described in each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using multiple devices. Furthermore, the processor that executes the program may be a single processor or multiple processors. That is, centralized processing or distributed processing may be performed.
[0466] The aspects of the present disclosure are not limited to the above examples, and various modifications are possible, and these modifications are also included within the scope of the aspects of the present disclosure.
[0467] Furthermore, application examples of the video coding method (image coding method) or video decoding method (image decoding method) shown in each of the above embodiments and various systems for implementing the application examples will be described below. Such systems may be characterized by having an image coding device using the image coding method, an image decoding device using the image decoding method, or an image coding / decoding device that includes both. Other configurations of such systems can be appropriately changed depending on the situation.
[0468] [Example of Use] Fig. 56 shows the overall configuration of an appropriate content supply system ex100 that realizes a content distribution service. The area where communication services are provided is divided into cells of a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations in the illustrated example, are installed in each cell.
[0469] In this content supply system ex100, devices such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 are connected to the Internet ex101 via an Internet service provider ex102 or a communication network ex104 and base stations ex106 to ex110. The content supply system ex100 may connect a combination of any of the above devices. In various implementations, the devices may be connected to each other directly or indirectly via a telephone network, short-range wireless communication, or the like, without going through the base stations ex106 to ex110. Furthermore, the streaming server ex103 may be connected to devices such as the computer ex111, the game console ex112, the camera ex113, the home appliance ex114, and the smartphone ex115 via the Internet ex101, etc. The streaming server ex103 may also be connected to a terminal in a hotspot on an airplane ex117 via a satellite ex116.
[0470] Note that wireless access points, hot spots, etc. may be used instead of the base stations ex106 to ex110. Furthermore, the streaming server ex103 may be directly connected to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or may be directly connected to the airplane ex117 without going through the satellite ex116.
[0471] The camera ex113 is a device such as a digital camera that can take still images and videos. The smartphone ex115 is a smartphone, mobile phone, or PHS (Personal Handyphone System) that supports mobile communication systems such as 2G, 3G, 3.9G, 4G, and the upcoming 5G.
[0472] The home appliance ex114 is a refrigerator, or an appliance included in a home fuel cell cogeneration system, or the like.
[0473] In the content supply system ex100, a terminal having a photographing function is connected to a streaming server ex103 via a base station ex106 or the like, thereby enabling live streaming and the like. In live streaming, a terminal (such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal on an airplane ex117) may perform the encoding process described in each of the above embodiments on still image or video content captured by a user using the terminal, may multiplex the video data obtained by encoding with audio data obtained by encoding audio corresponding to the video, and may transmit the obtained data to the streaming server ex103. In other words, each terminal functions as an image encoding device according to one aspect of the present disclosure.
[0474] Meanwhile, the streaming server ex103 streams the transmitted content data to the requesting client. The client is a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, a terminal on an airplane ex117, or the like, which is capable of decoding the encoded data. Each device that receives the distributed data decodes and plays back the received data. That is, each device may function as an image decoding device according to one aspect of the present disclosure.
[0475] [Distributed Processing] The streaming server ex103 may also be multiple servers or multiple computers that process, record, and distribute data in a distributed manner. For example, the streaming server ex103 may be implemented using a CDN (Content Delivery Network), where content distribution is achieved through a network connecting numerous edge servers distributed around the world. In a CDN, a physically nearby edge server is dynamically assigned depending on the client. Content is then cached and distributed to that edge server, thereby reducing delays. Furthermore, when certain types of errors occur or communication conditions change due to increased traffic, processing can be distributed among multiple edge servers, the distribution entity can be switched to another edge server, or distribution can be continued by bypassing the failed portion of the network, thereby achieving high-speed and stable distribution.
[0476] In addition to the distributed processing of the distribution itself, the encoding of captured data may be performed by each terminal, by the server, or by multiple terminals. For example, encoding generally involves two processing loops. The first loop detects the complexity of the image or the amount of code for each frame or scene. The second loop maintains image quality while improving encoding efficiency. For example, a terminal may perform the first encoding process, and the server that receives the content may perform the second encoding process, thereby improving content quality and efficiency while reducing the processing load on each terminal. In this case, if there is a request to receive and decode the data in near real time, the data encoded by a terminal can be received and played back by another terminal, enabling more flexible real-time distribution.
[0477] As another example, the camera ex113 or the like extracts features from an image, compresses the data related to the features as metadata, and transmits the compressed data to the server. The server performs compression according to the meaning (or importance of the content) of the image, for example, by determining the importance of an object from the features and switching the quantization precision accordingly. The feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction when the server re-compresses the image. Alternatively, the terminal may perform simple encoding such as VLC (variable length coding), and the server may perform encoding with a high processing load such as CABAC (context-adaptive binary arithmetic coding).
[0478] As another example, in a stadium, shopping mall, factory, or the like, there may be multiple pieces of video data that have been shot by multiple terminals of almost the same scene. In this case, using the multiple terminals that shot the video and, as necessary, other terminals and servers that did not shoot the video, encoding processes are assigned to each of them, for example, in units of GOPs (Group of Pictures), pictures, or tiles obtained by dividing a picture, for distributed processing. This reduces delays and achieves better real-time performance.
[0479] Since multiple video data are of almost the same scene, the server may manage and / or instruct the video data shot by each terminal to be mutually referential. The server may also receive encoded data from each terminal and change the reference relationships between multiple data, or correct or replace the pictures themselves and re-encode them. This allows for the generation of streams with improved quality and efficiency for each piece of data.
[0480] Furthermore, the server may perform transcoding to change the encoding method of the video data before distributing it. For example, the server may convert an MPEG-based encoding method into a VP-based encoding method (e.g., VP9), or convert H.264 to H.265.
[0481] In this way, the encoding process can be performed by a terminal or one or more servers. Therefore, although the following uses terms such as "server" or "terminal" to refer to the entity performing the process, some or all of the processing performed by the server may be performed by the terminal, and some or all of the processing performed by the terminal may be performed by the server. The same applies to the decoding process.
[0482] [3D, Multi-Angle] Images or videos of different scenes or the same scene taken from different angles using multiple devices such as cameras ex113 and / or smartphones ex115 that are approximately synchronized with each other are increasingly being integrated and used. The videos taken by each device are integrated based on the relative positional relationship between the devices obtained separately, or on areas where feature points in the videos match.
[0483] The server may not only encode two-dimensional video, but also encode still images automatically or at a time specified by the user based on scene analysis of the video and transmit them to the receiving terminal. Furthermore, if the server can acquire the relative positional relationship between the capturing terminals, it can generate a three-dimensional shape of the scene based on not only two-dimensional video but also video of the same scene captured from different angles. The server may separately encode 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 video captured by multiple terminals based on the results of recognizing or tracking people or objects using the three-dimensional data.
[0484] In this way, the user can enjoy a scene by arbitrarily selecting each video corresponding to each shooting terminal, or can enjoy content in which a video from a selected viewpoint is cut out from 3D data reconstructed using multiple images or videos. Furthermore, together with the video, sound may also be collected from multiple different angles, and the server may multiplex the sound from a specific angle or space with the corresponding video and transmit the multiplexed video and sound.
[0485] In recent years, content that associates the real world with a virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become popular. In the case of VR images, the server creates viewpoint images for the right eye and left eye, respectively, and may perform encoding that allows reference between each viewpoint video using Multi-View Coding (MVC) or the like, or may encode them as separate streams without referencing each other. When decoding the separate streams, it is preferable to play them in synchronization with each other so that a virtual three-dimensional space is reproduced according to the user's viewpoint.
[0486] In the case of AR images, the server superimposes virtual object information in the virtual space onto camera information in the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device may acquire or store virtual object information and three-dimensional data, generate a two-dimensional image according to the movement of the user's viewpoint, and smoothly connect the two-dimensional image to create superimposed data. Alternatively, the decoding device may send the movement of the user's viewpoint to the server in addition to a request for virtual object information. The server may create superimposed data according to the movement of the viewpoint received from the three-dimensional data stored on the server, encode the superimposed data, and distribute it to the decoding device. Note that the superimposed data may have an α value indicating transparency in addition to RGB, and the server may set the α value of parts other than the object created from the three-dimensional data to 0, etc., to encode the parts in a transparent state. Alternatively, the server may generate data by setting a predetermined RGB value as the background, like a chromakey, and using the background color for parts other than the object.
[0487] Similarly, the decoding of distributed data may be performed by each client terminal, by the server, or by multiple terminals. For example, one terminal may first send a reception request to the server, and then other terminals may receive and decode content according to the request, after which the decoded signal is transmitted to a device having a display. By distributing the processing and selecting appropriate content regardless of the capabilities of the communication terminals themselves, high-quality data can be reproduced. As another example, large-sized image data may be received on a TV or other device, and only a portion of the picture, such as a tile into which the picture is divided, may be decoded and displayed on the viewer's personal device. This allows the viewer to share the overall picture while checking their own area of responsibility or an area of interest in more detail.
[0488] In situations where multiple short-, medium-, or long-range wireless communications are available indoors or outdoors, it may be possible to seamlessly receive content using distribution system standards such as MPEG-DASH. Users may freely select and switch between decoding and display devices, such as their own terminals and indoor / outdoor displays, in real time. Furthermore, decoding can be performed while switching between the decoding and display devices using their own location information. This allows information to be mapped and displayed on a part of the wall or ground of a neighboring building with an embedded display device while the user is traveling to their destination. It is also possible to switch the bit rate of received data based on the accessibility of the encoded data on the network, such as if the encoded data is cached on a server that can be quickly accessed from the receiving terminal or copied to an edge server in a content delivery service.
[0489] [Scalable Coding] Content switching will be described using a scalable stream, shown in FIG. 57 , compressed and coded using the video coding method described in each of the above embodiments. The server may have multiple streams with the same content but different qualities as individual streams, or it may be configured to switch content by taking advantage of the characteristics of a temporally / spatially scalable stream, which is achieved by coding the content separately into layers, as shown in the figure. In other words, the decoding side determines which layer to decode based on internal factors such as performance and external factors such as the state of the communication bandwidth, allowing the decoding side to freely switch between low-resolution content and high-resolution content. For example, if a user wants to continue watching a video they were watching on their smartphone ex115 while on the go on a device such as an Internet TV after returning home, the device can simply decode the same stream up to a different layer, thereby reducing the burden on the server.
[0490] Furthermore, as described above, pictures are coded for each layer, and in addition to the configuration in which scalability is achieved by an enhancement layer above the base layer, the enhancement layer may include meta-information based on image statistics, etc. The decoding side may generate high-quality content by super-resolving pictures in the base layer based on the meta-information. Super-resolution may improve the signal-to-noise ratio while maintaining and / or increasing the resolution. The meta-information may include information for specifying linear or non-linear filter coefficients used in super-resolution processing, or information for specifying parameter values in filter processing, machine learning, or least-squares calculations used in super-resolution processing.
[0491] 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 selects tiles to decode, thereby decoding only a portion of the area. Furthermore, by storing the attributes of the object (such as a person, a car, a ball, etc.) and its position in the video (such as a coordinate position in the same image) as meta information, the decoding side can identify the position of a desired object based on the meta information and determine the tile containing the object. For example, as shown in Figure 58, the meta information may be stored using a data storage structure different from 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.
[0492] Meta information may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units. The decoding side can obtain the time when a specific person appears in the video, and by combining the picture-by-picture information with the time information, it can identify the picture in which the object exists and determine the position of the object within the picture.
[0493] [Web Page Optimization] Figure 59 is a diagram showing an example of a display screen of a web page on a computer ex111 or the like. Figure 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 Figures 59 and 60, a web page may include multiple link images that are links to image content, and the appearance of the web page may differ depending on the device used to view the page. When multiple link images are visible on the screen, the display device (decoding device) may display a still image or I-picture contained in each content as a link image until the user explicitly selects the link image, or until the link image approaches the center of the screen or the entire link image is within the screen, or may display a video such as a GIF animation using multiple still images or I-pictures, or may receive only the base layer and decode and display the video.
[0494] When a link image is selected by a user, the display device performs decoding while giving top priority to the base layer. Note that if the HTML constituting the web page contains information indicating that the content is scalable, the display device may decode up to the enhancement layer. Furthermore, to ensure real-time performance, before selection or when the communication bandwidth is very limited, the display device decodes and displays only forward-reference pictures (I pictures, P pictures, and B pictures with forward reference only), thereby reducing the delay between the decoding time of the first picture and the display time (the delay from the start of content decoding to the start of display). Furthermore, the display device may intentionally ignore the picture reference relationships and roughly decode all B pictures and P pictures with forward reference, and then perform normal decoding as the number of received pictures increases over time.
[0495] [Autonomous Driving] When transmitting and receiving still image or video data such as two-dimensional or three-dimensional map information for automatic driving or driving assistance of a vehicle, the receiving terminal may receive weather or construction information as meta information in addition to image data belonging to one or more layers, and may associate and decode these. Note that the meta information may belong to a layer, or may simply be multiplexed with the image data.
[0496] In this case, since a vehicle, drone, airplane, or the like including the receiving terminal is moving, the receiving terminal can transmit location information of the receiving terminal, thereby realizing seamless reception and decoding while switching between base stations ex106 to ex110. Furthermore, the receiving terminal can dynamically switch how much meta information to receive or how much to update map information depending on the user's selection, the user's situation, and / or the state of the communication bandwidth.
[0497] In the content supply system ex100, the client can receive, decode, and play back encoded information sent by a user in real time.
[0498] [Distribution of Personal Content] The content supply system ex100 also allows for unicast or multicast distribution of not only high-quality, long-duration content from video distribution companies, but also low-quality, short-duration content from individuals. It is expected that such personal content will continue to increase in the future. To improve the quality of personal content, the server may perform editing before encoding. This can be achieved, for example, using the following configuration.
[0499] During shooting, either in real time or after accumulating and shooting, the server performs recognition processing such as detecting shooting errors, scene search, semantic analysis, and object detection from the original image data or encoded data. Based on the recognition results, the server manually or automatically corrects out-of-focus or camera shake, deletes less important scenes such as scenes with lower brightness or out-of-focus compared to other pictures, emphasizes object edges, changes color, and performs other editing. The server then encodes the edited data based on the editing results. It is also known that viewing rates decrease if the shooting time is too long. Therefore, the server may automatically clip not only less important scenes as described above but also scenes with little movement, based on the image processing results, so that the content falls within a specific time range depending on the shooting time. Alternatively, the server may generate and encode a digest based on the results of the semantic analysis of the scenes.
[0500] Personal content may contain content that, if left as is, violates copyright, moral rights, or portrait rights, and may cause the scope of sharing to exceed the intended scope, resulting in inconvenience to individuals. Therefore, for example, the server may intentionally defocus images of people's faces on the periphery of the screen or the interior of a house before encoding. Furthermore, the server may recognize whether the image to be encoded contains the face of a person other than a pre-registered person, and if so, perform processing such as blurring the face. Alternatively, as pre- or post-processing before encoding, the user may specify a person or background area they wish to modify in the image for copyright or other reasons. The server may replace the specified area with another image or blur the focus. If the image contains a person, the server may track the person in the video and replace the image of the person's face.
[0501] Because viewing personal content with small data volumes requires high real-time performance, the decoding device first receives the base layer as a top priority, and then decodes and plays it back, depending on the bandwidth. The decoding device may also receive an enhancement layer during this time, and if the content is played back more than once, such as when playback is looped, it may play back high-quality video including the enhancement layer. A stream that has undergone scalable encoding in this way can provide an experience in which the video appears rough when not selected or when viewing begins, but gradually becomes smarter and the image quality improves. In addition to scalable encoding, a similar experience can also be provided when a rough stream played the first time and a second stream that is encoded with reference to the first video are configured as a single stream.
[0502] [Other Application Examples] Furthermore, these encoding or decoding processes are generally performed by the LSIex500 possessed by each terminal. The LSI (large scale integration circuitry) ex500 (see FIG. 56) may be a single-chip or multi-chip configuration. Furthermore, video encoding or decoding software may be embedded in some kind of recording medium (such as a CD-ROM, flexible disk, or hard disk) readable by the computer ex111, and the encoding or decoding process may be performed using that software. Furthermore, if the smartphone ex115 is equipped with a camera, video data captured by the camera may be transmitted. This video data is data encoded and processed by the LSIex500 possessed by the smartphone ex115.
[0503] The LSIex500 may be configured to download and activate application software. In this case, the terminal first determines whether it supports the content encoding method or has the capability to execute a specific service. If the terminal does not support the content encoding method or does not have the capability to execute a specific service, the terminal downloads a codec or application software, and then acquires and plays the content.
[0504] Furthermore, at least one of the moving image encoding device (image encoding device) or moving image decoding device (image decoding device) of each of the above embodiments can be incorporated into a digital broadcasting system, not limited to the content supply system ex100 via the Internet ex101. Since multiplexed data in which video and audio are multiplexed is transmitted and received over broadcast radio waves using a satellite or the like, there is a difference in that it is more suited to multicast than the content supply system ex100, which has a configuration that is easy to use for unicast, but similar applications are possible with regard to encoding and decoding processes.
[0505] [Hardware Configuration] Fig. 61 is a diagram showing further details of the smartphone ex115 shown in Fig. 56. Fig. 62 is a diagram showing an example configuration of the smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex465 capable of capturing video and still images, and a display unit ex458 for displaying video captured by the camera unit ex465 and decoded data of the video and the like received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting voice or sound, an audio input unit ex456 such as a microphone for inputting voice, a memory unit ex467 capable of storing captured video or still images, recorded voice, received video or still images, encoded data such as email, or decoded data, and a slot unit ex464 that is an interface with a SIM ex468 for identifying a user and authenticating access to various data including the network. Note that an external memory may be used instead of the memory unit ex467.
[0506] A main control unit ex460 that comprehensively controls the display unit ex458 and operation unit ex466, etc., is connected to a power supply circuit unit ex461, an operation input control unit ex462, a video signal processing unit ex455, a camera interface unit ex463, a display control unit ex459, a modulation / demodulation unit ex452, a multiplexing / separation unit ex453, an audio signal processing unit ex454, a slot unit ex464, and a memory unit ex467 via a synchronization bus ex470.
[0507] When the power key is turned on by a user's operation, the power supply circuit unit ex461 starts up the smartphone ex115 to an operable state and supplies power to each unit from the battery pack.
[0508] The smartphone ex115 performs processes such as telephone calls and data communications under the control of a main control unit ex460 having a CPU, ROM, RAM, etc. During a call, an audio signal collected by an audio input unit ex456 is converted into a digital audio signal by an audio signal processing unit ex454, subjected to spectrum spread processing by a modulation / demodulation unit ex452, subjected to digital-to-analog conversion and frequency conversion processing by a transmission / reception unit ex451, and the resulting signal is transmitted via an antenna ex450. The received data is also amplified and subjected to frequency conversion and analog-to-digital conversion processing, subjected to spectrum despreading processing by a modulation / demodulation unit ex452, and converted into an analog audio signal by an audio signal processing unit ex454, which is then output from an audio output unit ex457. During data communication mode, text, still images, or video data is sent to the main control unit ex460 via an operation input control unit ex462 based on operations on the main unit's operation unit ex466, etc. Similar transmission and reception processing is performed. When transmitting video, still images, or video and audio in the data communication mode, the video signal processing unit ex455 compresses and encodes the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 using the moving image encoding method described in each of the above embodiments, and sends the encoded video data to the multiplexing / demultiplexing unit ex453. The audio signal processing unit ex454 encodes the audio signal collected by the audio input unit ex456 while the camera unit ex465 is capturing video or still images, and sends the encoded audio data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and encoded audio data using a predetermined method, and modulates and converts the multiplexed video data and audio data in the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, before transmitting the multiplexed video data and audio data via the antenna ex450.
[0509] In order to decode the multiplexed data received via the antenna ex450, such as when receiving video attached to an email or chat, or video linked to a web page, the multiplexing / separation unit ex453 separates the multiplexed data into a video data bit stream and an audio data bit stream, and supplies the encoded video data to the video signal processing unit ex455 and the encoded audio data to the audio signal processing unit ex454 via the synchronization bus ex470. The video signal processing unit ex455 decodes the video signal using a video decoding method corresponding to the video encoding method described in each of the above embodiments, and the video or still image contained in the linked video file is displayed on the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal, and audio is output from the audio output unit ex457. As real-time streaming becomes increasingly common, audio playback may be socially inappropriate depending on the user's situation. Therefore, it is preferable that the initial setting be a configuration in which only the video data is played without playing the audio signal, and audio may be played in sync only when the user performs an operation such as clicking on the video data.
[0510] Although the smartphone ex115 has been used as an example, three other implementation formats are possible: a transmitting / receiving terminal having both an encoder and a decoder, a transmitting terminal having only an encoder, and a receiving terminal having only a decoder. In the digital broadcasting system, multiplexed data in which audio data is multiplexed with video data is received or transmitted. However, in addition to audio data, text data related to the video may also be multiplexed into the multiplexed data. Furthermore, the video data itself may be received or transmitted instead of the multiplexed data.
[0511] Although the main control unit ex460 including a CPU has been described as controlling the encoding or decoding process, various terminals often include a GPU. Therefore, a configuration may be adopted in which a memory shared by the CPU and GPU, or a memory whose addresses are managed for common use, is used to take advantage of the GPU's performance to process a large area in a batch. This shortens the encoding time, ensures real-time performance, and achieves low latency. It is particularly efficient to perform motion estimation, deblocking filtering, SAO (Sample Adaptive Offset), and transformation / quantization processes in a batch, such as by picture, by the GPU rather than by the CPU.
[0512] The present disclosure is applicable to, for example, television receivers, digital video recorders, car navigation systems, mobile phones, digital cameras, digital video cameras, video conference systems, electronic mirrors, and the like.
[0513] REFERENCE SIGNS LIST 100 Encoding device 102 Division unit 104 Subtraction unit 106 Transform 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 126, 218 Inter prediction unit 128, 220 Prediction control unit 200 Decoding device 202 Entropy decoding unit 1201 Boundary determination unit 1202, 1204, 1206 Switch 1203 Filter determination unit 1205 Filter processing unit 1207 Filter characteristic determination unit 1208 Processing determination unit a1, b1 Processor a2, b2 memory
Claims
1. An encoding device comprising: a circuit; and a memory, wherein the circuit uses the memory to perform a transform process in which a transform coefficient obtained by applying a linear transform to a prediction residual signal in a target block among a plurality of blocks of a plurality of block sizes is further subjected to a secondary transform of a block size common to the plurality of blocks, and the secondary transform of the common block size is composed of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
2. The encoding device according to claim 1, wherein the transform base of the quadratic transform of the common block size is a 4x4 square.
3. The encoding device according to claim 1, wherein the transform base of the quadratic transform of the common block size is an 8x8 square.
4. The encoding device according to any one of claims 1 to 3, wherein for the processing target blocks of some sizes among the plurality of block sizes, common candidates for the transformation base are assigned to the candidate group in the secondary transformation.
5. An encoding device according to any one of claims 1 to 4, wherein when the block size of the block to be processed is equal to or smaller than a predetermined block size, it is determined not to apply the secondary transform to the transform coefficients, and when the block size of the block to be processed is larger than the predetermined block size, it is determined to apply the secondary transform to the transform coefficients.
6. The encoding device according to claim 5, wherein the predetermined block size is a 4x4 square.
7. The encoding device according to claim 5, wherein the predetermined block size is a 4x8 or 8x4 rectangle.
8. The encoding device according to claim 5, wherein the predetermined block size is equal to the smallest block size among one or more block sizes selectable in the secondary transform.
9. A decoding device comprising: a circuit; and a memory, wherein the circuit uses the memory to perform an inverse transform process in which a linear transform is further applied to transform coefficients obtained by applying a secondary transform of a block size common to a target block of a plurality of blocks having a plurality of block sizes to a transform coefficient signal of the target block of the plurality of blocks, and the secondary transform of the common block size is composed of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block of the processing.
10. The decoding device according to claim 9, wherein the transform base of the quadratic transform of the common block size is a 4x4 square.
11. The decoding device according to claim 9, wherein the transform base of the quadratic transform of the common block size is an 8x8 square.
12. A decoding device according to any one of claims 9 to 11, wherein for the processing target blocks of some sizes among the plurality of block sizes, a common candidate for the transformation base is assigned to the candidate group in the secondary transformation.
13. A decoding device according to any one of claims 9 to 12, wherein when the block size of the block to be processed is equal to or smaller than a predetermined block size, it is determined not to apply the secondary transform to the transform coefficients, and when the block size of the block to be processed is larger than the predetermined block size, it is determined to apply the secondary transform to the transform coefficients.
14. The decoding device according to claim 13, wherein the predetermined block size is a 4x4 square.
15. The decoding device according to claim 13, wherein the predetermined block size is a 4x8 or 8x4 rectangle.
16. The decoding device according to claim 13, wherein the predetermined block size is equal to the smallest block size among one or more block sizes selectable in the secondary transform.
17. A coding method, comprising: a target block among a plurality of blocks of a plurality of block sizes; a transform process for applying a secondary transform of a block size common to the plurality of blocks to transform coefficients obtained by applying a linear transform to a prediction residual signal; and the secondary transform of the common block size is comprised of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.
18. A decoding method, comprising: a target block among a plurality of blocks of a plurality of block sizes; an inverse transform process in which a linear transform is further applied to transform coefficients obtained by applying a secondary transform of a block size common to the plurality of blocks to a transform coefficient signal; and the secondary transform of the common block size is comprised of one or more candidates for a transform base, and one of the transform bases is selected from a group of candidates that differ depending on the block size of the target block.