Encoding device, decoding device, encoding method, decoding method, and transmission method
By applying a quadratic transformation of a common block size with selected transformation bases, the encoding device addresses processing inefficiencies in conventional methods, enhancing encoding efficiency and reducing code usage.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2026-01-08
- Publication Date
- 2026-03-19
AI Technical Summary
Conventional encoding methods for moving images, such as H.265 (HEVC), face challenges in managing processing loads when applying secondary transformations to transformation coefficients, leading to inefficiencies in encoding processes.
The encoding device applies a quadratic transformation of a common block size to transformation coefficients obtained by a linear transformation, selecting an appropriate transformation basis from different candidate groups based on block size, thereby reducing processing loads and code usage.
This approach reduces the processing load and amount of code required during the encoding process by selecting optimal transformation bases, improving efficiency compared to conventional methods.
Smart Images

Figure 2026050425000001_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an encoding device and the like that encodes a moving image including a plurality of pictures.
Background Art
[0002] Conventionally, as a standard for encoding a moving image, there is H.265, also called HEVC (High Efficiency Video Coding) (Non-Patent Document 1).
Prior Art Documents
[0007] These comprehensive or specific embodiments may be implemented as systems, devices, methods, integrated circuits, computer programs, or non-temporary recording media such as computer-readable CD-ROMs, or as any combination of systems, devices, methods, integrated circuits, computer programs, and recording media. [Effects of the Invention]
[0008] An encoding device, etc., according to one aspect of this disclosure can reduce the processing load compared to conventional methods when applying a secondary transformation to a transformation coefficient obtained by applying a linear transformation to a predicted residual signal. [Brief explanation of the drawing]
[0009] [Figure 1] Figure 1 is a block diagram showing the functional configuration of an encoding device according to an embodiment. [Figure 2]Figure 2 is a flowchart showing an example of the overall encoding process performed by the encoding device. [Figure 3] Figure 3 shows an example of block division. [Figure 4A] Figure 4A shows an example of the slice configuration. [Figure 4B] Figure 4B shows an example of a tile configuration. [Figure 5A] Figure 5A is a table showing the transformation basis functions corresponding to each transformation type. [Figure 5B] Figure 5B shows a diagram of SVT (Spatially Varying Transform). [Figure 6A] Figure 6A shows an example of the filter shape used in an ALF (adaptive loop filter). [Figure 6B] Figure 6B shows another example of the filter shape used in ALF. [Figure 6C] Figure 6C shows another example of the filter shape used in ALF. [Figure 7] Figure 7 is a block diagram showing an example of a detailed configuration of the loop filter section that functions as a DBF. [Figure 8] Figure 8 shows an example of a deblocking filter with symmetrical filter characteristics with respect to block boundaries. [Figure 9] Figure 9 illustrates the block boundaries where deblocking filtering is performed. [Figure 10] Figure 10 shows an example of a Bs value. [Figure 11] Figure 11 shows an example of the processing performed in the prediction processing unit of the encoding device. [Figure 12] Figure 12 shows another example of processing performed in the prediction processing unit of the encoding device. [Figure 13] Figure 13 shows another example of the processing performed in the prediction processing unit of the encoding device. [Figure 14]FIG. 14 is a diagram showing an example of 67 intra prediction modes in intra prediction. [Figure 15] FIG. 15 is a flowchart showing the basic processing flow of inter prediction. [Figure 16] FIG. 16 is a flowchart showing an example of motion vector derivation. [Figure 17] FIG. 17 is a flowchart showing another example of motion vector derivation. [Figure 18] FIG. 18 is a flowchart showing another example of motion vector derivation. [Figure 19] FIG. 19 is a flowchart showing an example of inter prediction in normal inter mode. [Figure 20] FIG. 20 is a flowchart showing an example of inter prediction in merge mode. [Figure 21] FIG. 21 is a diagram for explaining an example of motion vector derivation processing in merge mode. [Figure 22] FIG. 22 is a flowchart showing an example of FRUC (frame rate up conversion). [Figure 23] FIG. 23 is a diagram for explaining an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. [Figure 24] FIG. 24 is a diagram for explaining an example of pattern matching (template matching) between a template in the current picture and a block in the reference picture. [Figure 25A] FIG. 25A is a diagram for explaining an example of deriving a motion vector in sub-block units based on the motion vectors of a plurality of adjacent blocks. [Figure 25B] FIG. 25B is a diagram for explaining an example of deriving a motion vector in sub-block units in affine mode having three control points. [Figure 26A] FIG. 26A is a conceptual diagram for explaining affine merge mode. [Figure 26B]Figure 26B is a conceptual diagram illustrating an affine merge mode with two control points. [Figure 26C] Figure 26C is a conceptual diagram illustrating an affine merge mode with three control points. [Figure 27] Figure 27 is a flowchart showing an example of processing in affine merge mode. [Figure 28A] Figure 28A is a diagram illustrating an affine intermode with two control points. [Figure 28B] Figure 28B is a diagram illustrating an affine intermode with three control points. [Figure 29] Figure 29 is a flowchart showing an example of affine intermode processing. [Figure 30A] Figure 30A is a diagram illustrating an affine intermode in which the current block has three control points and the adjacent block has two control points. [Figure 30B] Figure 30B is a diagram illustrating an affine intermode in which the current block has two control points and the adjacent block has three control points. [Figure 31A] Figure 31A shows the relationship between merge mode and DMVR (dynamic motion vector refreshing). [Figure 31B] Figure 31B is a conceptual diagram illustrating an example of DMVR processing. [Figure 32] Figure 32 is a flowchart showing an example of predictive image generation. [Figure 33] Figure 33 is a flowchart showing another example of predictive image generation. [Figure 34] Figure 34 is a flowchart showing yet another example of predictive image generation. [Figure 35] Figure 35 is a flowchart illustrating an example of predictive image correction processing using OBMC (overlapped block motion compensation). [Figure 36] Figure 36 is a conceptual diagram illustrating an example of predictive image correction processing using OBMC. [Figure 37] Figure 37 is a diagram illustrating the generation of two triangular prediction images. [Figure 38] Figure 38 is a diagram illustrating a model that assumes uniform linear motion. [Figure 39] Figure 39 illustrates an example of a predictive image generation method using brightness correction processing by LIC (local illumination compensation). [Figure 40] Figure 40 is a block diagram showing an example of an encoding device implementation. [Figure 41] Figure 41 is a block diagram showing the functional configuration of a decoding device according to an embodiment. [Figure 42] Figure 42 is a flowchart showing an example of the overall decoding process by the decoding device. [Figure 43] Figure 43 shows an example of the processing performed in the prediction processing unit of the decoding device. [Figure 44] Figure 44 shows another example of the processing performed in the prediction processing unit of the decoding device. [Figure 45] Figure 45 is a flowchart showing an example of inter-mode prediction in a decoding device. [Figure 46] Figure 46 is a block diagram showing an example of a decoding device implementation. [Figure 47] Figure 47 is a diagram illustrating the secondary conversion process in the embodiment. [Figure 48] Figure 48 is a flowchart showing the processing procedure in the conversion unit of the encoding device in the embodiment. [Figure 49A] Figure 49A is a table showing an example of the processing volume required for the primary conversion process of the entire CTU in the embodiment. [Figure 49B] Figure 49B is a table showing an example of the processing volume required for the entire secondary conversion process of the CTU in the embodiment. [Figure 50] Figure 50 is a table showing a first example in the embodiment. [Figure 51] Figure 51 is a table showing a second example in the embodiment. [Figure 52] Figure 52 is a table showing a third example in the embodiment. [Figure 53] Figure 53 is a table showing a fourth example in the embodiment. [Figure 54] Figure 54 is a flowchart showing an example of the operation of the encoding device in the embodiment. [Figure 55] Figure 55 is a flowchart showing an example of the operation of the decoding device in the embodiment. [Figure 56] Figure 56 is an overall diagram of the content supply system that realizes the content distribution service. [Figure 57] Figure 57 shows an example of an encoding structure during scalable encoding. [Figure 58] Figure 58 shows an example of an encoding structure during scalable encoding. [Figure 59] Figure 59 shows an example of how a web page is displayed. [Figure 60] Figure 60 shows an example of how a web page is displayed. [Figure 61] Figure 61 shows an example of a smartphone. [Figure 62] Figure 62 is a block diagram showing an example of a smartphone configuration. [Modes for carrying out the invention]
[0010] (Knowledge that forms the basis of this disclosure) For example, an encoding device may perform a quadratic transformation on the transformation coefficients obtained by applying a linear transformation to the predicted residual signal, and then apply further transformations such as an orthogonal transformation. In this case, the encoding device may apply quadratic transformations of multiple block sizes to the transformation coefficients obtained by applying a linear transformation to the predicted residual signal.
[0011] For example, an encoding device according to one aspect of the present disclosure comprises a circuit and a memory, wherein the circuit uses the memory to perform a transformation process in which a transformation coefficient obtained by applying a linear transformation to a prediction residual signal in a block to be processed among a plurality of blocks of a plurality of block sizes further applies a quadratic transformation of a block size common to the plurality of blocks, wherein the quadratic transformation of the common block size consists of one or more candidate transformation basis bases, and one of the transformation basis bases is selected from different candidate groups depending on the block size of the block to be processed.
[0012] As a result, when the encoding device applies a quadratic transformation of a common block size to the blocks to be processed, it can select a more appropriate transformation basis candidate than before and apply the selected transformation basis candidate to the blocks to be processed. Therefore, the encoding device can reduce the amount of code used in the quadratic transformation process compared to before.
[0013] Furthermore, for example, in an encoding device according to one aspect of this disclosure, the transformation basis for the quadratic transformation of the common block size is a 4x4 square.
[0014] This allows the encoding device to select the smallest size transformation basis when applying a quadratic transformation of a common block size to the blocks being processed.
[0015] Furthermore, for example, in an encoding device according to one aspect of this disclosure, the transformation basis for the quadratic transformation of the common block size is an 8x8 square.
[0016] This allows the decoder to select an appropriate transformation basis when applying a common block-size quadratic transformation to the blocks being processed.
[0017] Furthermore, for example, an encoding device according to one aspect of the present disclosure assigns a common candidate for the transformation basis to the candidate group in the secondary transformation for a portion of the processing blocks of a certain size among the plurality of block sizes.
[0018] This allows the encoding device to reduce the amount of processing required compared to conventional devices. For example, the encoding device can reduce the amount of processing required by assigning a common basis to a 16x16 processing block and a 32x32 processing block and performing a quadratic transformation.
[0019] Furthermore, for example, an encoding device according to one aspect of the present disclosure determines not to apply the quadratic transformation to the transformation coefficient when the block size of the block to be processed is less than or equal to a predetermined block size, and determines to apply the quadratic transformation to the transformation coefficient when the block size of the block to be processed is greater than the predetermined block size.
[0020] This allows the encoding device to reduce the processing load during the conversion process compared to conventional methods by not performing a secondary conversion when the block size of the block to be processed would result in a large amount of processing load during the secondary conversion.
[0021] Furthermore, for example, in an encoding device according to one aspect of this disclosure, the predetermined block size is a 4x4 square.
[0022] As a result, the encoding device can reduce the amount of processing required for conversion by not performing a secondary conversion when the block being processed is a 4x4 block size, which would result in a large amount of processing in the secondary conversion.
[0023] Furthermore, for example, in an encoding device according to one aspect of the present disclosure, the predetermined block size is a rectangle of 4 × 8 or 8 × 4.
[0024] As a result, the encoding device can reduce the amount of processing required for conversion by not performing a secondary conversion when the block being processed has a block size of 4x8 or 8x4, which would result in a large amount of processing in the secondary conversion.
[0025] Furthermore, 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 transformation.
[0026] As a result, the encoding device can reduce the processing load during the conversion process by not performing a secondary conversion when the block being processed is the block size that would result in the largest processing load during the secondary conversion among the sizes selectable by the encoding device.
[0027] Furthermore, for example, a decoding device according to one aspect of the present disclosure comprises a circuit and a memory, wherein the circuit uses the memory to perform an inverse transformation process in which, in a block to be processed among a plurality of blocks of a plurality of block sizes, a linear transformation is applied to the transformation coefficient obtained by applying a quadratic transformation of a common block size to the plurality of blocks to the transformation coefficient signal, and the quadratic transformation of the common block size consists of one or more candidate transformation basis bases, and one of the transformation basis bases is selected from different candidate groups depending on the block size of the block to be processed.
[0028] As a result, when the decoding device applies a quadratic transformation of a common block size to the blocks to be processed, it can select a more appropriate transformation basis candidate than before and apply the selected transformation basis candidate to the blocks to be processed. Therefore, the decoding device can reduce the amount of code used in the quadratic transformation process compared to before.
[0029] Furthermore, for example, in a decoding device according to one aspect of this disclosure, the transformation basis for the quadratic transformation of the common block size is a 4x4 square.
[0030] This allows the decoder to select the smallest size transformation basis when applying a common block-size quadratic transformation to the blocks being processed.
[0031] Furthermore, for example, in a decoding device according to one aspect of this disclosure, the transformation basis for the quadratic transformation of the common block size is an 8x8 square.
[0032] This allows the decoder to select an appropriate transformation basis when applying a common block-size quadratic transformation to the blocks being processed.
[0033] Furthermore, for example, a decoding device according to one aspect of the present disclosure assigns a common candidate for the transformation basis to the candidate group in the secondary transformation for some of the processing blocks of a certain size among the plurality of block sizes.
[0034] This allows the decoding device to reduce its processing load compared to conventional devices. For example, the decoding device can reduce its processing load by assigning a common basis to a 16x16 processing block and a 32x32 processing block and performing a quadratic transformation.
[0035] Furthermore, for example, a decoding device according to one aspect of the present disclosure determines that the quadratic transformation will not be applied to the transformation coefficient when the block size of the block to be processed is less than or equal to a predetermined block size, and determines that the quadratic transformation will be applied to the transformation coefficient when the block size of the block to be processed is greater than the predetermined block size.
[0036] As a result, the decoding device can reduce the processing load during the conversion process by not performing a secondary conversion when the block being processed has a block size that would result in a large amount of processing load in the secondary conversion.
[0037] Furthermore, for example, in a decoding device according to one aspect of this disclosure, the predetermined block size is a 4x4 square.
[0038] As a result, the decoding device can reduce the processing load during the conversion process compared to conventional methods by not performing a secondary conversion when the target block to be converted is a 4x4 block size, which would result in a large amount of processing load in the secondary conversion.
[0039] Furthermore, for example, in a decoding device according to one aspect of this disclosure, the predetermined block size is a rectangle of 4 × 8 or 8 × 4.
[0040] As a result, the decoding device can reduce the processing load during the conversion process compared to conventional methods by not performing the secondary conversion when the target block to be converted has a block size of 4x8 or 8x4, which would increase the processing load during the secondary conversion.
[0041] Furthermore, 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 transformation.
[0042] This allows the decryption device to reduce the processing load during the conversion process compared to conventional methods by not performing the secondary conversion when the block size is the one that would require the most processing load in the secondary conversion among the sizes the decryption device can select.
[0043] Furthermore, for example, an encoding method according to one aspect of the present disclosure performs a transformation process in which, in a block to be processed among a plurality of blocks of a plurality of block sizes, a transformation is applied to the transformation coefficients obtained by applying a linear transformation to the predicted residual signal, and a quadratic transformation of a common block size is applied to the plurality of blocks. The quadratic transformation of the common block size consists of one or more candidate transformation basis bases, and one of the transformation basis bases is selected from different candidate groups depending on the block size of the block to be processed.
[0044] As a result, the encoding method can achieve the same effect as the encoding device described above.
[0045] Furthermore, for example, a decoding method according to one aspect of the present disclosure performs an inverse transformation process in which, in a block to be processed among a plurality of blocks of a plurality of block sizes, a linear transformation is applied to the transformation coefficients obtained by applying a quadratic transformation of a block size common to the plurality of blocks to the transformation coefficient signal, and the quadratic transformation of the common block size consists of one or more candidate transformation basis bases, and one of the transformation basis bases is selected from different candidate groups depending on the block size of the block to be processed.
[0046] As a result, the decryption method can achieve the same effect as the decryption device described above.
[0047] Furthermore, for example, an encoding device according to one aspect of this disclosure may include a splitting unit, an intra-prediction unit, an inter-prediction unit, a loop filter unit, a conversion unit, a quantization unit, and an entropy encoding unit.
[0048] The division unit may divide the picture into a plurality of blocks. The intra prediction unit may perform intra prediction on the blocks included in the plurality of blocks. The inter prediction unit may perform inter prediction on the blocks. The conversion unit may convert the prediction error between the predicted image obtained by the intra prediction or the inter prediction and the original image to generate conversion coefficients. The quantization unit may quantize the conversion coefficients to generate quantization coefficients. The entropy coding unit may encode the quantization coefficients to generate an encoded bitstream. The loop filter unit may apply a filter to the reconstructed image of the blocks.
[0049] Furthermore, for example, the encoding device may be an encoding device that encodes a video image containing multiple pictures.
[0050] The conversion unit then performs a conversion process in which, for the processing block among the multiple blocks of multiple block sizes, a quadratic conversion of a common block size is applied to the conversion coefficients obtained by applying a linear conversion to the predicted residual signal. The quadratic conversion of the common block size consists of one or more candidate conversion basis bases, and one of the conversion basis bases may be selected from different candidate groups depending on the block size of the processing block.
[0051] Furthermore, for example, a decoding device according to one aspect of this 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 the quantization coefficients of the blocks in the picture from the encoded bitstream. The inverse quantization unit may inverse quantize the quantization coefficients to obtain transformation coefficients. The inverse transformation unit may inverse transform the transformation coefficients to obtain a prediction error. 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 the reconstructed image generated using the 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 image containing multiple pictures.
[0054] The inverse transform unit then performs an inverse transform process in which, in the processing block among the multiple blocks of multiple block sizes, a linear transform is applied to the transformed coefficients obtained by applying a quadratic transform of a common block size to the multiple blocks to the transformed coefficient signal, and in the quadratic transform of a common block size, one or more candidates for the transform basis are composed of a transform basis, and one of the transform basis may be selected from different candidate groups depending on the block size of the processing block.
[0055] Furthermore, these comprehensive or specific embodiments may be implemented as systems, devices, methods, integrated circuits, computer programs, or non-temporary recording media such as computer-readable CD-ROMs, or as any combination of systems, devices, methods, integrated circuits, computer programs, and recording media.
[0056] The embodiments will be described in detail below with reference to the drawings. Note that the embodiments described below are all general or specific examples. The numerical values, shapes, materials, components, arrangement and connection forms of components, steps, relationships and sequences of steps shown in the following embodiments are examples only and are not intended to limit the scope of the claims.
[0057] Embodiments of encoding and decoding devices are described below. These embodiments are examples of encoding and decoding devices to which the processes and / or configurations described in each aspect of this disclosure can be applied. The processes and / or configurations can also be implemented in encoding and decoding devices different from those in the embodiments. For example, with respect to the processes and / or configurations applicable to the embodiments, one of the following may be implemented:
[0058] (1) Any of the multiple components of the encoding 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 or decoding device of the embodiment, any modifications such as addition, replacement, or deletion of functions or processes performed by some of the multiple components of the encoding or decoding device may be made. For example, any of the functions or processes may be replaced or combined with other functions or processes described in any of the embodiments of this disclosure.
[0060] (3) In the methods performed by the encoding or decoding apparatus of the embodiment, any modifications, such as additions, replacements, and deletions, may be made to some of the processes included in the method. For example, any of the processes in the method may be replaced with or combined with other processes described in any of the embodiments of this disclosure.
[0061] (4) Some of the multiple components constituting the encoding or decoding device of the embodiment may be combined with components described in any of the embodiments of this disclosure, or with components that have some of the functions described in any of the embodiments of this disclosure, or with components that perform some of the processing performed by the components described in any of the embodiments of this disclosure.
[0062] (5) Components that provide some of the functions of the encoding or decoding device of the embodiment, or components that perform some of the processing of the encoding or decoding device of the embodiment, may be combined with or replaced with components described in any of the aspects of the disclosure and components that provide some of the functions described in any of the aspects of the disclosure, or components that perform some of the processing described in any of the aspects of the disclosure.
[0063] (6) In a method performed by an encoding or decoding device of an embodiment, any of the processes included in the method may be replaced or combined with any of the processes described in any of the embodiments of the present disclosure.
[0064] (7) Some of the processes included in the methods performed by the encoding or decoding device of the embodiment may be combined with the processes described in any of the embodiments of this disclosure.
[0065] (8) The methods of carrying out the processes and / or configurations described in each aspect of the present disclosure are not limited to the encoding or decoding devices of the embodiments. For example, the processes and / or configurations may be carried out in devices used for purposes other than the video encoding or video decoding disclosed in the embodiments.
[0066] (Embodiment 1) [Encoding device] First, the encoding device according to this embodiment will be described. Figure 1 is a block diagram showing the functional configuration of the encoding device 100 according to this embodiment. The encoding device 100 is a video encoding device that encodes video in block units.
[0067] As shown in Figure 1, the encoding device 100 is a device that encodes an image in block units and comprises 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 can be implemented, for example, by a general-purpose processor and memory. In this case, when a software program stored in memory is executed by the processor, the processor functions as a splitting unit 102, a subtraction unit 104, a conversion unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse conversion unit 114, an addition unit 116, a loop filter unit 120, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128. Alternatively, the encoding device 100 may be implemented as one or more dedicated electronic circuits corresponding to the splitting unit 102, a subtraction unit 104, a conversion unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse conversion unit 114, an addition unit 116, a loop filter unit 120, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.
[0069] The following describes the overall processing flow of the encoding device 100, followed by a description of each component included in the encoding device 100.
[0070] [Overall flow of the encoding process] Figure 2 is a flowchart showing an example of the overall encoding process performed by the encoding device 100.
[0071] First, the splitting unit 102 of the encoding device 100 divides each picture contained in the input image, which is a moving image, into multiple fixed-size blocks (128 x 128 pixels) (step Sa_1). Then, the splitting unit 102 selects a splitting pattern (also called a block shape) for these fixed-size blocks (step Sa_2). In other words, the splitting unit 102 further divides the fixed-size blocks into multiple blocks that constitute the selected splitting pattern. Then, the encoding device 100 performs the processing in steps Sa_3 to Sa_9 for each of these multiple blocks (i.e., the block to be encoded).
[0072] In other words, the prediction processing unit, which consists of all or part of the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128, generates a prediction signal (also called a prediction block) for the block to be encoded (also called the current block) (step Sa_3).
[0073] Next, the subtraction unit 104 generates the difference between the block to be encoded and the predicted block as the predicted residual (also called the difference block) (step Sa_4).
[0074] Next, the transformation unit 106 and the quantization unit 108 generate multiple quantization coefficients by performing transformation and quantization on the difference block (step Sa_5). A block consisting of multiple quantization coefficients is also called a coefficient block.
[0075] Next, the entropy coding unit 110 generates an encoded signal by encoding (specifically, entropy coding) its coefficient block and the prediction parameters related to the generation of the prediction signal (step Sa_6). The encoded signal is also called an encoded bitstream, compressed bitstream, or stream.
[0076] Next, the inverse quantization unit 112 and the inverse transform unit 114 reconstruct multiple predicted residuals (i.e., difference blocks) by performing inverse quantization and inverse transform on the coefficient block (step Sa_7).
[0077] Next, the adder 116 reconstructs the current block into a reconstructed image (also called a reconstructed block or decoded image block) by adding the predicted block to the restored difference block (step Sa_8). This generates the 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 or not the encoding of the entire picture is complete (step Sa_10). If it determines that it is not complete (No. in step Sa_10), it repeats the process from step Sa_2.
[0080] In the example described above, the encoding device 100 selects one division pattern for a fixed-size block and encodes each block according to that division pattern. However, it may also encode each block according to multiple division patterns. In this case, the encoding device 100 may evaluate the cost of each of the multiple division patterns and, for example, select the encoded signal obtained by encoding according to the division pattern with the smallest cost as the final output encoded signal.
[0081] Furthermore, the processes in steps Sa_1 to Sa_10 may be performed sequentially by the encoding device 100, some of these processes may be performed in parallel, and the order may be changed.
[0082] [Divided part] The splitting unit 102 divides each picture contained in the input video into multiple blocks and outputs each block to the subtraction unit 104. For example, the splitting unit 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). Then, the splitting unit 102 divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 or less) based on, for example, a recursive quadtree and / or binary tree block partitioning. In other words, the splitting unit 102 selects a partitioning pattern. These variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transformation units (TUs). In various implementation examples, CUs, PUs, and TUs do not need to be distinguished, and some or all of the blocks in the picture may be processing units for CUs, PUs, and TUs.
[0083] Figure 3 shows an example of block partitioning in this embodiment. In Figure 3, solid lines represent block boundaries due to quadtree block partitioning, and dashed lines represent block boundaries due to binary tree block partitioning.
[0084] Here, block 10 is a 128x128 pixel square block (128x128 block). This 128x128 block 10 is first divided into four 64x64 square blocks (quadtree block partitioning).
[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 partitioning). As a result, the top-left 64x64 block is divided into two 16x64 blocks 11 and 12 and a 32x64 block 13.
[0086] The 64x64 block in the upper right is horizontally divided into two rectangular 64x32 blocks, 14 and 15 (binary tree block division).
[0087] The bottom-left 64x64 block is divided into four square 32x32 blocks (quadrutree block division). Of the four 32x32 blocks, the top-left and bottom-right blocks are further divided. The top-left 32x32 block is vertically divided into two rectangular 16x32 blocks, and the rightmost 16x32 block is further horizontally divided into two 16x16 blocks (binary tree block division). The bottom-right 32x32 block is horizontally divided into two 32x16 blocks (binary tree block division). As a result, the bottom-left 64x64 block is divided into 16x32 block 16, two 16x16 blocks 17 and 18, two 32x32 blocks 19 and 20, and two 32x16 blocks 21 and 22.
[0088] The 64x64 block 23 in the bottom right will not be divided.
[0089] As described above, in Figure 3, block 10 is divided into 13 variable-sized blocks 11-23 based on recursive quad-tree and binary tree block partitioning. Such partitioning is sometimes called QTBT (quad-tree plus binary tree) partitioning.
[0090] In Figure 3, one block was divided into four or two blocks (quadrutree or binary tree block partitioning), but partitioning is not limited to these. For example, one block may be divided into three blocks (ternary tree block partitioning). Partitioning that includes such ternary tree block partitioning is sometimes called MBT (multi-type tree) partitioning.
[0091] [Picture composition: slice / tile] To decode pictures in parallel, the pictures may be composed of slice units or tile units. A picture consisting of slice units or tile units may be composed of a division unit 102.
[0092] A slice is the basic coding unit that makes up a picture. A picture is composed of, for example, one or more slices. A slice consists of one or more consecutive Coding Tree Units (CTUs).
[0093] Figure 4A shows an example of a slice configuration. For example, a picture contains 11 × 8 CTUs and is divided into four slices (slice 1-4). Slice 1 consists of 16 CTUs, slice 2 consists of 21 CTUs, slice 3 consists of 29 CTUs, and slice 4 consists of 22 CTUs. Here, each CTU in the picture belongs to one of the slices. The shape of the slice is the horizontal division of the picture. The boundaries of the slice do not have to be at the edges of the screen, but can be anywhere among 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, the raster scan order. The slice also contains header information and encoded data. The header information may describe the characteristics of the slice, such as the CTU address at the beginning of the slice and the slice type.
[0094] A tile is a rectangular area that makes up a picture. Each tile may be assigned a number called a TileId in the order of the raster scan.
[0095] Figure 4B shows an example of tile configuration. For example, a picture contains 11 × 8 CTUs and is divided into four rectangular tiles (tiles 1-4). When tiles are used, the processing order of 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, in each of the multiple tiles, at least one CTU is processed in raster scan order. For example, as shown in Figure 4B, the processing order of multiple CTUs contained 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] Note that one tile may contain one or more slices, and one slice may contain one or more tiles.
[0097] [Subtraction Unit] The subtraction unit 104 subtracts the predicted signal (predicted samples input from the prediction control unit 128, shown below) from the original signal (original sample) in block units that are input from the division unit 102 and divided by the division unit 102. In other words, the subtraction unit 104 calculates the prediction error (also called residual) of the block to be encoded (hereinafter referred to as the current block). The subtraction unit 104 then outputs the calculated prediction error (residual) to the conversion unit 106.
[0098] The source signal is the input signal to the encoding device 100, and is a signal representing the image of each picture that makes up the video (for example, a luminance (luma) signal and two chroma (chroma) signals). In the following, the signal representing an image may also be referred to as a sample.
[0099] [Conversion section] The conversion unit 106 converts the prediction error in the spatial domain into conversion coefficients in the frequency domain and outputs the conversion coefficients to the quantization unit 108. Specifically, the conversion unit 106 performs a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error in the spatial domain, for example.
[0100] The transformation unit 106 may also adaptively select a transformation type from among several transformation types and use a transformation basis function corresponding to the selected transformation type to convert the prediction error into transformation coefficients. Such a transformation is sometimes called an EMT (explicit multiple core transform) or an AMT (adaptive multiple transform).
[0101] Multiple transformation types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 5A is a table showing the transformation basis functions corresponding to each transformation type. In Figure 5A, N represents the number of input pixels. The selection of a transformation type from among these multiple transformation types may depend, for example, on the type of prediction (intra-prediction and inter-prediction) or on the intra-prediction mode.
[0102] Information indicating whether or not to apply EMT or AMT (e.g., called an EMT flag or AMT flag) and information indicating the selected conversion type are typically signaled at the CU level. However, the signaling of this information is not 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 transformation unit 106 may retransform the transformation coefficients (transformation results). Such retransformation is sometimes called AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the transformation unit 106 performs retransformation for each subblock (e.g., 4x4 subblock) contained in the block of transformation coefficients corresponding to the intra-prediction error. Information indicating whether or not to apply NSST and information regarding the transformation matrix used for NSST are usually signaled at the CU level. However, the signaling of this information is not 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] The transformation unit 106 may be subjected to either a separable transformation or a non-separable transformation. A separable transformation is a method in which the input is separated into directions equal to the number of dimensions and transformed multiple times, while a non-separable transformation is a method in which, when the input is multidimensional, two or more dimensions are treated as one dimension and transformed together.
[0105] For example, one example of a non-separable transformation is to treat a 4x4 block as a single array with 16 elements and then perform the transformation on that array using a 16x16 transformation matrix.
[0106] Another example of a non-separable transformation is a transformation (Hypercube Givens Transform) in which a 4x4 input block is treated as a single array with 16 elements, and then multiple Givens rotations are performed on that array.
[0107] In the conversion unit 106, the type of basis for conversion to 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 Figure 5B, the CU is divided into two equal parts horizontally or vertically, and only one of the regions is converted to the frequency domain. The type of conversion basis can be set for each region; for example, DST7 and DCT8 are used. In this example, only one of the two regions within the CU is converted, and the other is not, but both regions may also be converted. Furthermore, the division method can be made more flexible, not only by dividing into two equal parts, but also by dividing into four equal parts, or by separately encoding information indicating the division and signaling it in the same way as CU division. Note that SVT is sometimes called SBT (Sub-block Transform).
[0108] [Quantization section] The quantization unit 108 quantizes the conversion coefficients output from the conversion unit 106. Specifically, the quantization unit 108 scans the conversion coefficients of the current block in a predetermined scanning order and quantizes the conversion coefficients based on the quantization parameter (QP) corresponding to the scanned conversion coefficients. The quantization unit 108 then outputs the quantized conversion coefficients of the current block (hereinafter referred to as quantization coefficients) to the entropy coding unit 110 and the inverse quantization unit 112.
[0109] A predetermined scan order is the order for quantization / inverse quantization of the transformation coefficients. For example, a predetermined scan order is defined as ascending frequency (from low to high frequency) or descending frequency (from high to low frequency).
[0110] The quantization parameter (QP) is a parameter that defines the quantization step (quantization width). For example, if the value of the quantization parameter increases, the quantization step also increases. In other words, if the value of the quantization parameter increases, the quantization error increases.
[0111] Furthermore, quantization matrices may be used for quantization. For example, several types of quantization matrices may be used corresponding to frequency conversion sizes such as 4x4 and 8x8, prediction modes such as intra-prediction and inter-prediction, and pixel components such as luminance and chrominance. Quantization refers to the process of digitizing values sampled at predetermined intervals and associating them with predetermined levels. In this field, terms such as rounding, scaling, and scaling may also be used.
[0112] There are two methods for using quantization matrices: using a quantization matrix directly set on the encoding device, and using a default quantization matrix (default matrix). By directly setting the quantization matrix on the encoding device, it is possible to set a quantization matrix that corresponds to the image features. However, in this case, there is a disadvantage that the amount of code increases due to the encoding of the quantization matrix.
[0113] On the other hand, there is also a method that does not use a quantization matrix, and quantizes both the high-frequency and low-frequency components in the same way. This method is equivalent to using a quantization matrix where all coefficients have the same value (a flat matrix).
[0114] The quantization matrix may be specified, for example, as an SPS (Sequence Parameter Set) or a PPS (Picture Parameter Set). An SPS contains the parameters used for the sequence, and a PPS contains the parameters used for the picture. SPS and PPS are sometimes simply referred to as parameter sets.
[0115] [Entropy coding unit] The entropy coding unit 110 generates an encoded signal (encoded bitstream) based on the quantization coefficients input from the quantization unit 108. Specifically, the entropy coding unit 110, for example, binarizes the quantization coefficients, arithmetically encodes the binary signal, and outputs a compressed bitstream or sequence.
[0116] [Dequantization section] The inverse quantization unit 112 inversely quantizes the quantization coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inversely quantizes the quantization coefficients of the current block in a predetermined scanning order. Then, the inverse quantization unit 112 outputs the inversely quantized conversion coefficients of the current block to the inverse conversion unit 114.
[0117] [Inverse Transformation Section] The inverse transform unit 114 restores the prediction error (residual) by performing an inverse transform on the transformation coefficients input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform on the transformation coefficients corresponding to the transformation by the transformation unit 106. The inverse transform unit 114 then outputs the restored prediction error to the adder unit 116.
[0118] Furthermore, the recovered prediction error usually does not match the prediction error calculated by the subtraction unit 104 because information is typically lost due to quantization. In other words, the recovered prediction error usually includes quantization errors.
[0119] [Addition section] The adder 116 reconstructs the 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 the local decoded block.
[0120] [Block memory] The block memory 118 is a storage unit for storing blocks within the encoded picture (referred to as the current picture) that are referenced in intra prediction, for example. 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 reference pictures used, for example, for interpretation, and is sometimes called a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120.
[0122] [Loop Filter Section] The loop filter unit 120 applies a loop filter to the block reconstructed by the adder unit 116 and outputs the filtered reconstructed block to the frame memory 122. A loop filter is a filter used within the encoding loop (in-loop filter), and includes, for example, a deblocking filter (DF or DBF), sample adaptive offset (SAO), and adaptive loop filter (ALF).
[0123] In ALF, a least-squares error filter is applied to remove coding distortion. For example, for each 2x2 subblock within the current block, one filter selected from several filters is applied based on the direction and activity of the local gradient.
[0124] Specifically, first, subblocks (e.g., 2x2 subblocks) are classified into multiple classes (e.g., 15 or 25 classes). The classification of subblocks is based on the direction and activity of the gradient. For example, a classification value C (e.g., C = 5D + A) is calculated using the gradient direction value D (e.g., 0-2 or 0-4) and the gradient activity value A (e.g., 0-4). Then, based on the classification value C, the subblocks are classified into multiple classes.
[0125] The gradient direction value D is derived, for example, by comparing gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions). The gradient activation value A is derived, for example, by adding the gradients in multiple directions and quantizing the sum.
[0126] Based on the results of this classification, a filter for the subblock is determined from among multiple filters.
[0127] For example, a circularly symmetric shape is used as the filter shape in ALF. Figures 6A to 6C show 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. However, the signaling of information indicating the filter shape is not 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] The on / off status of ALF may be determined, for example, at the picture level or CU level. For example, the decision to apply ALF to luminance may be made at the CU level, and the decision to apply ALF to color difference may be made at the picture level. Information indicating whether ALF is on or off is usually signaled at the picture level or CU level. However, the signaling of information indicating whether ALF is on or off is not limited to the picture level or CU level, but may be at other levels (e.g., sequence level, slice level, tile level, or CTU level).
[0129] The coefficient sets for multiple selectable filters (e.g., up to 15 or 25 filters) are typically signaled at the picture level. However, signaling of the coefficient sets is not limited to the picture level; it may be at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or subblock level).
[0130] [Loop Filter Section > Deblocking Filter] In a deblocking filter, the loop filter section 120 reduces distortion at block boundaries by applying a filter to the block boundaries of the reconstructed image.
[0131] Figure 7 is a block diagram showing an example of a detailed configuration of the loop filter section 120, which 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 characteristic determination unit 1207, and switches 1202, 1204, and 1206.
[0133] The boundary determination unit 1201 determines whether or not a pixel to be deblocked and filtered (i.e., a target pixel) is located near a block boundary. The boundary determination unit 1201 then 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, switch 1202 outputs the image before filtering to switch 1204. Conversely, if the boundary determination unit 1201 determines that the target pixel is not located near a block boundary, switch 1202 outputs the image before filtering to switch 1206.
[0135] The filter determination unit 1203 determines whether or not to perform a deblocking filter on the target pixel based on the pixel values of at least one surrounding pixel located around the target pixel. The filter determination unit 1203 then outputs the determination result to the switch 1204 and the processing determination unit 1208.
[0136] If the filter determination unit 1203 determines that deblocking filtering should be performed on the target pixel, switch 1204 outputs the pre-filtered image acquired via switch 1202 to the filter processing unit 1205. Conversely, if the filter determination unit 1203 determines that deblocking filtering should not be performed on the target pixel, switch 1204 outputs the pre-filtered image acquired via switch 1202 to switch 1206.
[0137] When the filter processing unit 1205 acquires an image before filtering via switches 1202 and 1204, it performs a deblocking filter process on the target pixel, using the filter characteristics determined by the filter characteristic determination unit 1207. The filter processing unit 1205 then outputs the filtered pixel to switch 1206.
[0138] Switch 1206 selectively outputs pixels that have not undergone deblocking and filtering, and pixels that have undergone deblocking and filtering by the filtering processing unit 1205, in accordance with the control by the processing determination unit 1208.
[0139] The processing determination unit 1208 controls the switch 1206 based on the determination results of the boundary determination unit 1201 and the filter determination unit 1203. Specifically, if the boundary determination unit 1201 determines that a target pixel is near a block boundary, and the filter determination unit 1203 determines that the target pixel should undergo deblocking and filtering, the processing determination unit 1208 outputs the deblocked and filtered pixel from the switch 1206. In all other cases, the processing determination unit 1208 outputs the undeblocked and unfiltered pixel from the switch 1206. This output of pixels is repeated, resulting in the filtered image being output from the switch 1206.
[0140] Figure 8 shows an example of a deblocking filter with symmetrical filter characteristics with respect to block boundaries.
[0141] In deblocking filtering, for example, one of two deblocking filters with different characteristics, namely a strong filter and a weak filter, is selected using pixel values and quantization parameters. In the strong filter, as shown in Figure 8, if pixels p0~p2 and pixels q0~q2 exist on either side of a block boundary, the respective pixel values of pixels q0~q2 are changed to pixel values q'0~q'2 by performing the operation 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~p2 and q0~q2 are the pixel values of pixels p0~p2 and pixels q0~q2, respectively. Also, q3 is the pixel value of pixel q3, which is adjacent to pixel q2 on the opposite side of the block boundary. Furthermore, the coefficient multiplied by the pixel value of each pixel used in the deblocking filter process on the right-hand side of each of the above equations is the filter coefficient.
[0144] Furthermore, in the deblocking filter process, clipping may be performed to ensure that the calculated pixel values do not exceed a threshold. In this clipping process, the calculated pixel values according to the above formula are clipped to "pre-calculation pixel value ± 2 × threshold" using a threshold determined from the quantization parameters. This prevents excessive smoothing.
[0145] Figure 9 illustrates the block boundaries where deblocking filtering is performed. Figure 10 shows an example of a Bs value.
[0146] The block boundaries on which deblocking filtering is performed are, for example, the boundaries of the PU (Prediction Unit) or TU (Transform Unit) of an 8x8 pixel block, as shown in Figure 9. Deblocking filtering is performed in units of 4 rows or 4 columns. First, for blocks P and Q shown in Figure 9, the Bs (Boundary Strength) value is determined as shown in Figure 10.
[0147] According to the Bs value in Figure 10, it is determined whether or not to perform deblocking filtering of different strengths, even for block boundaries belonging to the same image. Deblocking filtering is performed on the chrominance signal when the Bs value is 2. Deblocking filtering is performed on the luminance signal when the Bs value is 1 or greater and predetermined conditions are met. Note that the criteria for determining the Bs value are not limited to those shown in Figure 10 and may be determined based on other parameters.
[0148] [Prediction Processing Unit (Intra Prediction Unit, Inter Prediction Unit, Prediction Control Unit)] Figure 11 shows an example of processing performed in the prediction processing unit of the encoding device 100. The prediction processing unit consists 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 predicted block. Predicted signals include, for example, intra-predicted signals or inter-predicted signals. Specifically, the prediction processing unit generates a predicted image of the current block using the reconstructed image already obtained by generating predicted blocks, difference blocks, coefficient blocks, difference blocks, and decoded image blocks.
[0150] The reconstructed image may be, for example, the image of the reference picture, or it may be the image of the encoded block within the current picture, which is the picture containing the current block. The encoded block within the current picture may be, for example, the adjacent block of the current block.
[0151] Figure 12 shows another example of processing performed in 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, second, and third methods are different methods for generating predicted images, and may be, for example, an interpretation method, an intraprediction method, and other prediction methods. These prediction methods may use the reconstructed images described above.
[0153] Next, the prediction processing unit selects one of the multiple prediction images generated in steps Sc_1a, Sc_1b, and Sc_1c (step Sc_2). This selection of a prediction image, i.e., the selection of a method or mode to obtain the final prediction image, may be based on the cost of each generated prediction image. Alternatively, the selection of the prediction image may be based on the parameters used in the coding process. The coding device 100 may signal information to identify the selected prediction image, method, or mode into a coded signal (also called a coded bitstream). This information may be, for example, a flag. This allows the decoding device to generate a prediction image according to the method or mode selected by the coding device 100 based on this information. In the example shown in Figure 12, the prediction processing unit selects one of the prediction images after generating prediction images for each method. However, the prediction processing unit may select a method or mode based on the parameters used in the coding process described above before generating those prediction images, and then generate the prediction image according to that method or mode.
[0154] For example, the first and second methods are intra-prediction and inter-prediction, respectively, and the prediction processing unit may select the final predicted image for the current block from the predicted images generated according to these prediction methods.
[0155] Figure 13 shows another example of processing performed in the prediction processing unit of the encoding device 100.
[0156] First, the prediction processing unit generates a predicted image using intra-prediction (step Sd_1a), and then generates a predicted image using inter-prediction (step Sd_1b). The predicted image generated by intra-prediction is also called the intra-prediction image, and the predicted image generated by inter-prediction is also called the inter-prediction image.
[0157] Next, the prediction processing unit evaluates the intra-predicted image and the inter-predicted image (step Sd_2). Cost may be used in this evaluation. That is, the prediction processing unit calculates the cost C of the intra-predicted image and the inter-predicted image. This cost C is calculated by the formula of the RD optimization model, for example, C = D + λ × R. In this formula, D is the coding distortion of the predicted image, and is expressed, for example, as the sum of the absolute differences between the pixel values of the current block and the pixel values of the predicted image. R is the generated code amount of the predicted image, specifically the code amount required to encode motion information and other data to generate the predicted image. λ is, for example, a Lagrange multiplier.
[0158] The prediction processing unit then selects the prediction image with the smallest cost C from the intra-predicted image and inter-predicted image as the final prediction image for the current block (step Sd_3). In other words, a prediction method or mode for generating the prediction image for 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 called in-screen prediction) of the current block by referring to the block in the current picture stored in the block memory 118. Specifically, the intra-prediction unit 124 generates an intra-prediction signal by performing intra-prediction by referring to samples (e.g., luminance values, color difference 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 predetermined set of intra-prediction modes. The set of intra-prediction modes typically includes one or more non-directional prediction modes and multiple directional prediction modes.
[0161] One or more non-directional prediction modes include, for example, the Planar prediction mode and DC prediction mode as defined in the H.265 / HEVC standard.
[0162] Multiple directional prediction modes include, for example, the 33 prediction modes defined in the H.265 / HEVC standard. Note that multiple directional prediction modes may also include 32 additional prediction modes (a total of 65 directional prediction modes). Figure 14 shows all 67 intra-prediction modes (2 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 implementations, luminance blocks may be referenced in the intra-prediction of chrominance blocks. That is, the chrominance components of the current block may be predicted based on the luminance components of the current block. Such intra-prediction is sometimes called CCLM (cross-component linear model) prediction. Such an intra-prediction mode for chrominance blocks that references luminance blocks (e.g., called CCLM mode) may be added as one of the intra-prediction modes for chrominance blocks.
[0164] The intra-prediction unit 124 may correct the pixel values after intra-prediction based on the gradient of the horizontal / vertical reference pixels. Intra-prediction with such correction is sometimes called PDPC (position dependent intra-prediction combination). Information indicating whether or not PDPC is applied (for example, called a PDPC flag) is usually signaled at the CU level. However, the signaling of this information is not limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).
[0165] [International Prediction Department] The inter-prediction unit 126 generates a prediction signal (inter-prediction signal) by performing inter-prediction (also called inter-screen prediction) of the current block by referring 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 the current sub-block within the current block (e.g., a 4x4 block). For example, the inter-prediction unit 126 performs motion estimation within the reference picture for the current block or current sub-block and finds the reference block or sub-block that best matches that current block or current sub-block. Then, the inter-prediction unit 126 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. Based on that motion information, the inter-prediction unit 126 performs motion compensation (or motion prediction) and generates an inter-prediction signal for the current block or sub-block. The inter-prediction unit 126 outputs the generated inter-prediction signal to the prediction control unit 128.
[0166] The motion information used for motion compensation may be signaled as an interpretation signal in various forms. For example, the motion vector may be signaled. As another example, the difference between the motion vector and the predicted motion vector (motion vector predictor) may be signaled.
[0167] [Basic flow of interpretation] Figure 15 is a flowchart showing the basic flow of interpretation prediction.
[0168] The interpretation unit 126 first generates a predicted image (steps Se_1 to Se_3). Next, the subtraction unit 104 generates the difference between the current block and the predicted image as the predicted residual (step Se_4).
[0169] Here, the interpretation unit 126 generates the predicted image by determining the motion vector (MV) of the current block (steps Se_1 and Se_2) and performing motion compensation (step Se_3). The interpretation unit 126 also determines the MV by selecting a candidate motion vector (candidate MV) (step Se_1) and deriving the MV (step Se_2). The selection of a candidate MV is performed, for example, by selecting at least one candidate MV from a list of candidate MVs. In the derivation of the MV, the interpretation unit 126 may determine the selected at least one candidate MV as the MV of the current block by further selecting at least one candidate MV from the at least one candidate MV. Alternatively, the interpretation unit 126 may determine the MV of the current block by searching the region of the reference picture indicated by each of the selected at least one candidate MVs. This search of the region of the reference picture may be called motion estimation.
[0170] Furthermore, in the example described above, steps Se_1 to Se_3 are performed by the interpretation unit 126, but processing such as step Se_1 or step Se_2 may be performed by other components included in the encoding device 100.
[0171] [Flowchart for deriving motion vectors] Figure 16 is a flowchart showing an example of motion vector derivation.
[0172] The interpretation unit 126 derives the MV of the current block in a mode that encodes motion information (e.g., MV). In this case, for example, motion information is encoded as prediction parameters and converted into a signal. That is, the encoded motion information is included in the encoded signal (also called an encoded bitstream).
[0173] Alternatively, the interpretation unit 126 derives MV in a mode that does not encode motion information. In this case, motion information is not included in the encoded signal.
[0174] Here, the modes for MV derivation include the normal intermode, merge mode, FRUC mode, and affine mode, which will be described later. Of these modes, the modes that encode motion information include the normal intermode, merge mode, and affine mode (specifically, the affine intermode and affine merge mode). Note that the motion information may include not only the MV but also the predicted motion vector selection information, which will be described later. Modes that do not encode motion information include the FRUC mode, etc. The interpretation unit 126 selects a mode from these multiple modes for deriving the MV of the current block and derives the MV of the current block using the selected mode.
[0175] Figure 17 is a flowchart showing another example of motion vector derivation.
[0176] The interpretation unit 126 derives the MV of the current block in a mode that encodes the differential MV. In this case, for example, the differential MV is encoded as a prediction parameter and converted into a signal. That is, the encoded differential MV is included in the encoded signal. This differential MV is the difference between the MV of the current block and its predicted MV.
[0177] Alternatively, the interpretation unit 126 derives MV in a mode that does not encode the differential MV. In this case, the encoded differential MV is not included in the encoded signal.
[0178] As mentioned above, the modes for MV derivation include the normal inter, merge mode, FRUC mode, and affine mode, which will be described later. Of these modes, the modes that encode differential MV include the normal inter mode and affine mode (specifically, affine inter mode). Modes that do not encode differential MV include the FRUC mode, merge mode, and affine mode (specifically, affine merge mode). The inter prediction unit 126 selects a mode from these multiple modes to derive the MV of the current block, and uses the selected mode to derive the MV of the current block.
[0179] [Flowchart for deriving motion vectors] Figure 18 is a flowchart illustrating another example of motion vector derivation. There are several modes for MV derivation, i.e., interpretation modes, which can be broadly divided into modes that encode differential MVs and modes that do not encode differential motion vectors. Modes that do not encode differential MVs include merge mode, FRUC mode, and affine mode (specifically, affine merge mode). Details of these modes will be described later, but simply put, merge mode derives the MV of the current block by selecting motion vectors from surrounding encoded blocks, and FRUC mode derives the MV of the current block by performing a search between encoded regions. Affine mode assumes an affine transformation and derives the motion vectors of each of the multiple subblocks that make up the current block as the MV of the current block.
[0180] Specifically, the interpretation unit 126 derives the motion vector using the merge mode (Sf_2) when the interpretation mode information indicates 0 (0 in Sf_1). Also, the interpretation unit 126 derives the motion vector using the FRUC mode (Sf_3) when the interpretation mode information indicates 1 (1 in Sf_1). Also, the interpretation unit 126 derives the motion vector using the affine mode (specifically, the affine merge mode) when the interpretation mode information indicates 2 (2 in Sf_1) (Sf_4). Also, the interpretation unit 126 derives the motion vector using a mode that encodes the difference MV (for example, the normal intermode) when the interpretation mode information indicates 3 (3 in Sf_1) (Sf_5).
[0181] [MV Derivation > Normal Intermode] The normal intermode is an interpretation mode that derives the MV of the current block by finding blocks similar to the image of the current block from the region of the reference picture indicated by the candidate MV. In this normal intermode, the differential MV is also encoded.
[0182] Figure 19 is a flowchart showing an example of inter-mode prediction.
[0183] The interpretation unit 126 first obtains multiple candidate MVs for the current block based on information such as the MVs of multiple encoded blocks surrounding the current block in time or space (step Sg_1). In other words, the interpretation unit 126 creates a candidate MV list.
[0184] Next, the interpretation unit 126 extracts N candidate MVs (where N is an integer greater than or equal to 2) from the multiple candidate MVs obtained in step Sg_1 as predicted motion vector candidates (also called predicted MV candidates) according to a predetermined priority order (step Sg_2). The priority order is predetermined for each of the N candidate MVs.
[0185] Next, the interpretation unit 126 selects one of the N predicted motion vector candidates as the predicted motion vector (also called predicted MV) for the current block (step Sg_3). At this time, the interpretation unit 126 encodes the predicted motion vector selection information for identifying the selected predicted motion vector into a stream. The stream is the encoded signal or encoded bitstream described above.
[0186] Next, the interpretation unit 126 refers to the encoded reference picture and derives the MV of the current block (step Sg_4). At this time, the interpretation unit 126 further encodes the difference between the derived MV and the predicted motion vector as the difference MV into the stream. The encoded reference picture is a picture consisting of multiple blocks that have been reconstructed after encoding.
[0187] Finally, the interpretation unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the encoded reference picture (step Sg_5). The predicted image is the interpretation signal described above.
[0188] Furthermore, information indicating the interprediction mode used to generate the predicted image (the normal intermode in the example above), which is included in the encoded signal, is encoded, for example, as a prediction parameter.
[0189] The candidate MV list may be the same as the list used in other modes. Furthermore, processing related to the candidate MV list may be applied to processing related to lists used in other modes. This processing related to the candidate MV list may include, for example, extracting or selecting candidate MVs from the candidate MV list, rearranging candidate MVs, or deleting candidate MVs.
[0190] [MV Derivation > Merge Mode] Merge mode is an interpretation mode that derives an MV by selecting a candidate MV from a list of candidate MVs as the MV of the current block.
[0191] Figure 20 is a flowchart showing an example of interpretation using merge mode.
[0192] The interpretation unit 126 first obtains multiple candidate MVs for the current block based on information such as the MVs of multiple encoded blocks surrounding the current block in time or space (step Sh_1). In other words, the interpretation unit 126 creates a candidate MV list.
[0193] Next, the interpretation unit 126 derives the MV of the current block by selecting one candidate MV from among the multiple candidate MVs obtained in step Sh_1 (step Sh_2). At this time, the interpretation unit 126 encodes MV selection information to identify the selected candidate MV into a stream.
[0194] Finally, the interpretation unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the encoded reference picture (step Sh_3).
[0195] Furthermore, information indicating the inter-prediction mode (the merge mode in the example above) used to generate the predicted image, which is included in the encoded signal, is encoded, for example, as a prediction parameter.
[0196] Figure 21 illustrates an example of the process of deriving the motion vector of the current picture using merge mode.
[0197] First, a list of predicted MVs is generated, containing registered candidates for predicted MVs. Candidates for predicted MVs include spatially adjacent predicted MVs, which are the MVs of multiple encoded blocks located spatially around the target block; temporally adjacent predicted MVs, which are the MVs of nearby blocks projected onto the target block's position in the encoded reference picture; combined predicted MVs, which are generated by combining the MV values of spatially adjacent predicted MVs and temporally adjacent predicted MVs; and zero predicted MVs, which are MVs with a value of zero.
[0198] Next, one predicted MV is selected from the multiple predicted MVs registered in the predicted MV list to determine it as the MV for the target block.
[0199] Furthermore, the variable-length coding unit encodes the merge_idx signal, which indicates which predicted MV was selected, by writing it to a stream.
[0200] Note that the predicted MVs registered in the predicted MV list explained in Figure 21 are just examples, and the number of predicted MVs may differ from the number shown in the figure, the configuration may not include some of the types of predicted MVs shown in the figure, or it may include predicted MVs other than those shown in the figure.
[0201] The final MV may be determined by performing the DMVR (dynamic motion vector refreshing) process described later, using the MV of the target block derived by merge mode.
[0202] The candidates for the predicted MV are the candidate MVs mentioned above, and the predicted MV list is the candidate MV list mentioned above. The candidate MV list may also be referred to as the candidate list. Furthermore, merge_idx is the MV selection information.
[0203] [MV Derivation > FRUC Mode] Motion information may be derived at the decoding device side without being signaled at the encoding device side. Furthermore, as mentioned above, the merge mode specified in the H.265 / HEVC standard may be used. Alternatively, motion information may be derived by performing a motion search at the decoding device side. In this case, the decoding device performs the motion search without using the pixel values of the current block.
[0204] Here, we will explain the mode in which motion detection is performed on the decoding device side. This mode in which motion detection is performed on the decoding device side is sometimes called PMMVD (pattern matched motion vector derivation) mode or FRUC (frame rate up-conversion) mode.
[0205] An example of FRUC processing is shown in Figure 22. First, a list of multiple candidates (i.e., a candidate MV list, which may be the same as the merge list) is generated by referencing the motion vectors of encoded blocks spatially or temporally adjacent to the current block, each having a predicted motion vector (MV) (step Si_1). Next, the best candidate MV is selected from the multiple candidate MVs registered in the candidate MV list (step Si_2). For example, an evaluation value is calculated for each candidate MV included in the candidate MV list, 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 directly derived as the motion vector for the current block. Alternatively, for example, the motion vector for the current block may be derived by performing pattern matching in the area surrounding the position in the reference picture corresponding to the motion vector of the selected candidate. In other words, a search is performed in the area surrounding the best candidate MV using pattern matching and evaluation values in the reference picture. If an MV with a better evaluation value is found, the best candidate MV may be updated to that MV and set as the final MV for the current block. It is also possible to configure the system so that it does not perform the process of updating to an MV with a better evaluation value.
[0206] Finally, the interpretation unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the encoded reference picture (step Si_5).
[0207] The same processing method can be used when processing at the subblock level.
[0208] The evaluation value may be calculated by various methods. For example, the reconstructed image of the region in the reference picture corresponding to the motion vector may be compared with the reconstructed image of a predetermined region (which may be, for example, a region in another reference picture or a region in an adjacent block of the current picture, as shown below). The difference in pixel values between the two reconstructed images may then be calculated and used as the evaluation value for the motion vector. In addition to the difference value, other information may also be used to calculate the evaluation value.
[0209] Next, we will explain pattern matching in detail. First, one candidate MV included in the candidate MV list (e.g., merge list) is selected as the starting point for the pattern matching search. For pattern matching, either first-order pattern matching or second-order pattern matching is used. First-order pattern matching and second-order 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 aligned with the motion trajectory of the current block. Therefore, in the first pattern matching, a region in another reference picture aligned with the motion trajectory of the current block is used as a predetermined region for calculating the evaluation value of the candidate described above.
[0211] Figure 23 illustrates an example of first pattern matching (bilateral matching) between two blocks in two reference pictures along a motion trajectory. As shown in Figure 23, in first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the best-matching pair of blocks in two different reference pictures (Ref0, Ref1) that are along the motion trajectory of the current block. Specifically, for the current block, the difference between the reconstructed image at a specified position in the first encoded reference picture (Ref0) specified by the candidate MV and the reconstructed image at a specified position in the second encoded reference picture (Ref1) specified by the symmetric MV obtained by scaling the candidate MV by the display time interval is derived, and an evaluation value is calculated using the obtained difference value. It is preferable to select the candidate MV with the best evaluation value among multiple candidate MVs as the final MV.
[0212] Under the assumption of a continuous motion trajectory, the motion vector (MV0, MV1) pointing to two reference blocks is proportional to the temporal distance (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, if the current picture is temporally located between the two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, then the first pattern matching derives a mirror-symmetric bidirectional motion vector.
[0213] [MV Derivation > FRUC > Template Matching] In the second pattern matching (template matching), pattern matching is performed between the template in the current picture (blocks adjacent to the current block in the current picture (e.g., blocks above and / or to the left)) and the blocks in the reference picture. Therefore, in the second pattern matching, the blocks adjacent to the current block in the current picture are used as a predetermined area for calculating the evaluation value of the candidates mentioned above.
[0214] Figure 24 illustrates an example of pattern matching (template matching) between a template in the current picture and a block in the reference picture. As shown in Figure 24, in the second pattern matching, the motion vector of the current block is derived by searching in the reference picture (Ref0) for the block that best matches the block adjacent to the current block (Cur block) in the current picture (Cur Pic). Specifically, for the current block, the difference is derived between the reconstructed image of the encoded region of both or either of the left adjacent and upper adjacent regions and the reconstructed image at the equivalent position in the encoded reference picture (Ref0) specified by the candidate MV. An evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value among multiple candidate MVs is selected as the best candidate MV.
[0215] Information indicating whether or not to apply such a FRUC mode (e.g., called a FRUC flag) may be signaled at the CU level. Furthermore, if FRUC mode is applied (e.g., the FRUC flag is true), information indicating the applicable pattern matching method (first pattern matching or second pattern matching) may be signaled at the CU level. Note that the signaling of this information is not limited to the CU level, but may be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or subblock level).
[0216] [MV Derivation > Affine Mode] Next, we will describe an affine mode in which motion vectors are derived at the sub-block level based on the motion vectors of multiple adjacent blocks. This mode is sometimes called the affine motion compensation prediction mode.
[0217] Figure 25A illustrates an example of deriving a subblock-level motion vector based on the motion vectors of multiple adjacent blocks. In Figure 25A, the current block contains 16 4x4 subblocks. Here, the motion vector v0 of the upper left corner control point of the current block is derived based on the motion vectors of the adjacent blocks, and similarly, the motion vector v1 of the upper right corner control point of the current block is derived based on the motion vectors of the adjacent subblocks. Then, by projecting the two motion vectors v0 and v1 using the following equation (1A), the motion vector (v) of each subblock within the current block is obtained. x ,v y ) is derived.
[0218]
number
[0219] Here, x and y represent the horizontal and vertical positions of the subblock, respectively, and w represents a predetermined weighting coefficient.
[0220] Information indicating such affine modes (e.g., called an affine flag) may be signaled at the CU level. However, the signaling of this information indicating affine modes is not limited to the CU level, but may be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or subblock level).
[0221] Furthermore, such affine modes may include several modes in which the method of deriving the motion vectors of the upper-left and upper-right corner control points differs. For example, there are two affine modes: the affine inter (also called the affine normal inter) mode and the affine merge mode.
[0222] [MV Derivation > Affine Mode] Figure 25B illustrates an example of deriving motion vectors for subblock units in an affine mode with three control points. In Figure 25B, the current block contains 16 4x4 subblocks. Here, the motion vector v0 of the upper left corner control point of the current block is derived based on the motion vectors of adjacent blocks, similarly, the motion vector v1 of the upper right corner control point of the current block is derived based on the motion vectors of adjacent blocks, and the motion vector v2 of the lower left corner control point of the current block is derived based on the motion vectors of adjacent blocks. Then, by projecting the three motion vectors v0, v1 and v2 using the following equation (1B), the motion vector (v) of each subblock within the current block is obtained. x ,v y ) is derived.
[0223]
number
[0224] Here, x and y represent the horizontal and vertical positions of the subblock center, respectively, w represents the width of the current block, and h represents 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. Information indicating the number of control points for 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 subblock level).
[0226] Furthermore, an affine mode having three control points may include several modes in which the method of deriving the motion vectors of the upper-left, upper-right, and lower-left corner control points differs. For example, there are two affine modes: the affine inter (also called the affine normal inter) mode and the affine merge mode.
[0227] [MV Derivation > Affine Merge Mode] FIG. 26A, FIG. 26B and FIG. 26C are conceptual diagrams for explaining the affine merge mode.
[0228] In the affine merge mode, as shown in FIG. 26A, for example, among the encoded blocks A (left), block B (above), block C (upper right), block D (lower left), and block E (upper left) adjacent to the current block, a plurality of motion vectors corresponding to the blocks encoded in the affine mode are used. Based on these motion vectors, the predicted motion vectors of each control point of the current block are calculated. Specifically, these blocks are inspected in the order of encoded block A (left), block B (above), block C (upper right), block D (lower left), and block E (upper left), and the first valid block encoded in the affine mode is identified. Based on the plurality of motion vectors corresponding to this identified block, the predicted motion vector of the control point of the current block is calculated.
[0229] For example, as shown in FIG. 26B, when the block A adjacent to the left of the current block is encoded in the affine mode having two control points, the motion vectors v3 and v4 projected onto the upper left corner and upper right corner positions of the encoded block including block A are derived. Then, from the derived motion vectors v3 and v4, the predicted motion vector v0 of the control point at the upper left corner of the current block and the predicted motion vector v1 of the control point at the upper right corner are calculated.
[0230] For example, as shown in FIG. 26C, when the block A adjacent to the left of the current block is encoded in the affine mode having three control points, the motion vectors v3, v4, and v5 projected onto the upper left corner, upper right corner, and lower left corner positions of the encoded block including block A are derived. Then, from the derived motion vectors v3, v4, and v5, the predicted motion vector v0 of the control point at the upper left corner of the current block, the predicted motion vector v1 of the control point at the upper right corner, and the predicted motion vector v2 of the control point at the lower left corner are calculated.
[0231] Note that this predicted motion vector derivation method may also be used to derive the respective predicted motion vectors of the control points of the current block in step Sj_1 of FIG. 29 described later.
[0232] FIG. 27 is a flowchart showing an example of the affine merge mode.
[0233] In the affine merge mode, first, the inter prediction unit 126 derives the respective predicted MVs of the control points of the current block (step Sk_1). The control points are, as shown in FIG. 25A, the upper left and upper right points of the current block, or, as shown in FIG. 25B, the upper left, upper right, and lower left points of the current block.
[0234] That is, as shown in FIG. 26A, the inter prediction unit 126 inspects these blocks in the order of the encoded block A (left), block B (upper), block C (upper right), block D (lower left), and block E (upper left), and identifies the first valid block encoded in the affine mode.
[0235] When block A is identified and block A has two control points, as shown in FIG. 26B, the inter prediction unit 126 calculates the motion vector v0 of the control point at the upper left corner of the current block and the motion vector v1 of the control point at the upper right corner from the motion vectors v3 and v4 at the upper left and upper right corners of the encoded block including block A. For example, the inter prediction unit 126 projects the motion vectors v3 and v4 at the upper left and upper right corners of the encoded block onto the current block to calculate the predicted motion vector v0 of the control point at the upper left corner of the current block and the predicted motion vector v1 of the control point at the upper right corner.
[0236] Alternatively, if block A is identified and block A has three control points, as shown in Figure 26C, the interpretation unit 126 calculates the motion vector v0 of the upper left corner control point, the motion vector v1 of the upper right corner control point, and the motion vector v2 of the lower left corner control point of the current block from the motion vectors v3, v4, and v5 of the upper left, upper right, and lower left corners of the encoded block containing block A. For example, the interpretation unit 126 calculates the predicted motion vector v0 of the upper left corner control point, the predicted motion vector v1 of the upper right corner control point, and the motion vector v2 of the lower left corner control point of the current block by projecting the motion vectors v3, v4, and v5 of the upper left, upper right, and lower left corners of the encoded block onto the current block.
[0237] Next, the interpretation unit 126 performs motion compensation for each of the multiple subblocks contained in the current block. That is, for each of the multiple subblocks, the interpretation unit 126 calculates the motion vector of that subblock as an affine MV using two predicted motion vectors v0 and v1 and equation (1A) described above, or three predicted motion vectors v0, v1 and v2 and equation (1B) described above (step Sk_2). Then, the interpretation unit 126 performs motion compensation for that subblock using these affine MVs and the encoded reference picture (step Sk_3). As a result, motion compensation is performed on the current block, and a predicted image of that current block is generated.
[0238] [MV Derivation > Affine Intermode] Figure 28A is a diagram illustrating an affine intermode with two control points.
[0239] In this affine intermode, as shown in Figure 28A, a motion vector selected from the motion vectors of the encoded blocks A, B, and C adjacent to the current block is used as the predicted motion vector v0 for the control point at the upper left corner of the current block. Similarly, a motion vector selected from the motion vectors of the encoded blocks D and E adjacent to the current block is used as the predicted motion vector v1 for the control point at the upper right corner of the current block.
[0240] Figure 28B is a diagram illustrating an affine intermode with three control points.
[0241] In this affine intermode, as shown in Figure 28B, the motion vector selected from the motion vectors of the encoded blocks A, B, and C adjacent to the current block is used as the predicted motion vector v0 for the control point at the upper left corner of the current block. Similarly, the motion vector selected from the motion vectors of the encoded blocks D and E adjacent to the current block is used as the predicted motion vector v1 for the control point at the upper right corner of the current block. Furthermore, the motion vector selected from the motion vectors of the encoded blocks F and G adjacent to the current block is used as the predicted motion vector v2 for the control point at the lower left corner of the current block.
[0242] Figure 29 is a flowchart showing an example of an affine intermode.
[0243] In affine intermode, the interpretation unit 126 first derives the predicted MV(v0,v1) or (v0,v1,v2) for each of two or three control points of the current block (step Sj_1). The control points are the upper left corner, upper right corner, or lower left corner of the current block, as shown in Figure 25A or Figure 25B.
[0244] In other words, the interpretation unit 126 derives the predicted motion vector (v0,v1) or (v0,v1,v2) of the control point of the current block by selecting the motion vector of one of the encoded blocks near each control point of the current block shown in Figure 28A or Figure 28B. At this time, the interpretation unit 126 encodes predicted motion vector selection information into a stream to identify the two selected motion vectors.
[0245] For example, the interpretation unit 126 may determine, using cost evaluation or the like, which block's motion vector to select as the predicted motion vector for the control point from the encoded blocks adjacent to the current block, and write a flag to the bitstream indicating which predicted motion vector was selected.
[0246] Next, the interpretation unit 126 performs motion search (steps Sj_3 and Sj_4) while updating the predicted motion vectors selected or derived in step Sj_1 (step Sj_2). That is, the interpretation unit 126 calculates the motion vectors of each subblock corresponding to the updated predicted motion vectors as affine MVs using the above-mentioned equation (1A) or equation (1B) (step Sj_3). Then, the interpretation unit 126 performs motion compensation for each subblock using these affine MVs and encoded reference pictures (step Sj_4). As a result, in the motion search loop, the interpretation unit 126 determines, for example, the predicted motion vector that yields the smallest cost as the motion vector of the control point (step Sj_5). At this time, the interpretation unit 126 further encodes the difference between the determined MV and the predicted motion vector as a difference MV into a stream.
[0247] Finally, the interpretation unit 126 generates a predicted image of the current block by performing motion compensation on the current block using the determined MV and the encoded reference picture (step Sj_6).
[0248] [MV Derivation > Affine Inter Mode] When signaling by switching affine modes with different numbers of control points (e.g., two and three) at the CU level, the number of control points may be different between the coded block and the current block. FIGS. 30A and 30B are conceptual diagrams for explaining a method of deriving a prediction vector of control points when the number of control points is different between the coded block and the current block.
[0249] For example, as shown in FIG. 30A, when the current block has three control points at the upper left corner, upper right corner, and lower left corner, and the block A adjacent to the left of the current block is coded in an affine mode having two control points, motion vectors v3 and v4 projected onto the upper left corner and upper right corner positions of the coded block including block A are derived. Then, from the derived motion vectors v3 and v4, a predicted motion vector v0 of the control point at the upper left corner of the current block and a predicted motion vector v1 of the control point at the upper right corner are calculated. Further, from the derived motion vectors v0 and v1, a predicted motion vector v2 of the control point at the lower left corner is calculated.
[0250] For example, as shown in FIG. 30B, when the current block has two control points at the upper left corner and upper right corner, and the block A adjacent to the left of the current block is coded in an affine mode having three control points, motion vectors v3, v4, and v5 projected onto the upper left corner, upper right corner, and lower left corner positions of the coded block including block A are derived. Then, from the derived motion vectors v3, v4, and v5, a predicted motion vector v0 of the control point at the upper left corner of the current block and a predicted motion vector v1 of the control point at the upper right corner are calculated.
[0251] This prediction motion vector derivation method may be used to derive each predicted motion vector of the control points of the current block in step Sj_1 of FIG. 29.
[0252] [MV Derivation > DMVR] Figure 31A shows the relationship between merge mode and DMVR.
[0253] The interpretation unit 126 derives the motion vector of the current block in merge mode (step Sl_1). Next, the interpretation unit 126 determines whether or not to perform a motion vector search, i.e., a motion search (step Sl_2). If the interpretation unit 126 determines not to perform a motion search (No in step Sl_2), it determines the motion vector derived in step Sl_1 as the final motion vector for the current block (step Sl_4). In other words, in this case, the motion vector of the current block is determined in merge mode.
[0254] On the other hand, if it is determined in step Sl_1 to perform a motion search (Yes in step Sl_2), the interpretation unit 126 derives the final motion vector for the current block by searching the surrounding region of the reference picture indicated by the motion vector derived in step Sl_1 (step Sl_3). In other words, in this case, the motion vector of the current block is determined by the DMVR.
[0255] Figure 31B is a conceptual diagram illustrating an example of DMVR processing for determining MV.
[0256] First, the optimal MVP set for the current block (for example, in merge mode) is designated as the candidate MV. Then, according to the candidate MV(L0), reference pixels are identified from the first reference picture (L0), which is an encoded picture in the L0 direction. Similarly, according to the candidate MV(L1), reference pixels are identified from the second reference picture (L1), which is an encoded picture in the L1 direction. A template is generated by taking the average of these reference pixels.
[0257] Next, using the template, the surrounding regions of candidate MVs in the first reference picture (L0) and the second reference picture (L1) are searched, and the MV with the minimum cost is determined as the final MV. The cost value may be calculated, for example, using the difference between each pixel value of the template and each pixel value of the search region, as well as the candidate MV value.
[0258] Note that the encoding device and the decoding device, which will be described later, share essentially the same configuration and operation of the processes described here.
[0259] Any process that can explore the vicinity of a candidate MV and derive the final MV is acceptable, even if it's not the exact process described here.
[0260] [Motion compensation > BIO / OBMC] Motion compensation includes modes that generate a predictive image and then correct that predictive image. These modes include, for example, BIO and OBMC, which will be described later.
[0261] Figure 32 is a flowchart showing an example of predictive image generation.
[0262] The interpretation unit 126 generates a predicted image (step Sm_1) and corrects the predicted image using one of the modes described above (step Sm_2).
[0263] Figure 33 is a flowchart showing another example of predictive image generation.
[0264] The interpretation unit 126 determines the motion vector of the current block (step Sn_1). Next, the interpretation unit 126 generates a predicted image (step Sn_2) and determines whether or not to perform correction processing (step Sn_3). If the interpretation unit 126 determines that correction processing should be performed (Yes in step Sn_3), it generates the final predicted image by correcting the predicted image (step Sn_4). On the other hand, if the interpretation unit 126 determines that no correction processing should be performed (No in step Sn_3), it outputs the predicted image as the final predicted image without correction (step Sn_5).
[0265] Furthermore, motion compensation includes a mode that corrects brightness when generating the predicted image. One such mode is the LIC, which will be discussed later.
[0266] Figure 34 is a flowchart showing yet another example of predictive image generation.
[0267] The interpretation unit 126 derives the motion vector of the current block (step So_1). Next, the interpretation unit 126 determines whether or not to perform brightness correction processing (step So_2). If the interpretation unit 126 determines to perform brightness correction processing (Yes in step So_2), it generates a predicted image while performing brightness correction (step So_3). In other words, the predicted image is generated by LIC. On the other hand, if the interpretation unit 126 determines not to perform brightness correction processing (No in step So_2), it generates a predicted image using normal motion compensation without performing brightness correction (step So_4).
[0268] [Motion Compensation > OBMC] Interpretation signals may be generated using not only the motion information of the current block obtained through motion search, but also the motion information of adjacent blocks. Specifically, interpretation signals may be generated at the sub-block level within the current block by weighted addition of a prediction signal based on motion information obtained through motion search (within the reference picture) and a prediction signal based on motion information of adjacent blocks (within the current picture). Such interpretation (motion compensation) is sometimes called OBMC (overlapped block motion compensation).
[0269] In OBMC mode, information indicating the size of subblocks for OBMC (e.g., called OBMC block size) may be signaled at the sequence level. Furthermore, information indicating whether or not to apply OBMC mode (e.g., called OBMC flag) may be signaled at the CU level. Note that the signaling levels of this information are not limited to the sequence level and CU level, but may be other levels (e.g., picture level, slice level, tile level, CTU level, or subblock level).
[0270] Let's explain the OBMC mode in more detail. Figures 35 and 36 are flowcharts and conceptual diagrams illustrating the overview of the predictive image correction process using OBMC processing.
[0271] First, as shown in Figure 36, a predicted image (Pred) is obtained using normal motion compensation with the motion vector (MV) assigned to the current block to be processed. In Figure 36, the arrow "MV" points to the reference picture, indicating what the current block of the current picture is referencing in order to obtain the predicted image.
[0272] Next, the motion vector (MV_L) already derived for the encoded left-adjacent block is applied (reused) to the block to be encoded to obtain the predicted image (Pred_L). The motion vector (MV_L) is indicated by the arrow "MV_L" pointing from the current block to the reference picture. Then, the first correction of the predicted image is performed by superimposing the two predicted images, Pred and Pred_L. This has the effect of blending the boundaries between adjacent blocks.
[0273] Similarly, the motion vector (MV_U) already derived for the encoded upper adjacent block is applied (reused) to the block to be encoded to obtain the predicted image (Pred_U). The motion vector (MV_U) is indicated by an arrow "MV_U" pointing from the current block to the reference picture. Then, the predicted image Pred_U is superimposed on the predicted image that has undergone the first correction (e.g., Pred and Pred_L) to perform a second correction of the predicted image. This has the effect of blending the boundaries between adjacent blocks. The predicted image obtained by the second correction is the final predicted image of the current block, with the boundaries with adjacent blocks blended (smoothed).
[0274] The above example is a two-pass correction method using left-adjacent and top-adjacent blocks, but the correction method may also be a three-pass or more-pass correction method using right-adjacent and / or bottom-adjacent blocks.
[0275] Furthermore, the area to be superimposed does not have to be the entire pixel area of the block, but rather only a portion of the area near the block boundary.
[0276] Here, we have described the OBMC predictive image correction process for obtaining a single predictive image Pred by superimposing additional predictive images Pred_L and Pred_U onto a single reference picture. However, if the predictive image is corrected based on multiple reference images, the same process may be applied to each of the multiple reference pictures. In such cases, by performing OBMC image correction based on multiple reference pictures, a corrected predictive image is obtained from each reference picture, and then the final predictive image is obtained by further superimposing these multiple corrected predictive images.
[0277] In OBMC, the unit of the target block may be the prediction block unit, or it may be a subblock unit obtained by further dividing the prediction block.
[0278] One method for determining whether to apply OBMC processing is to use an obmc_flag signal, which indicates whether or not to apply OBMC processing. As a specific example, the encoding device may determine whether the target block belongs to a region with complex motion. If it belongs to a region with complex motion, the encoding device sets the obmc_flag to a value of 1 and applies OBMC processing to perform encoding. If it does not belong to a region with complex motion, it sets the obmc_flag to a value of 0 and encodes the block without applying OBMC processing. On the other hand, the decoding device decodes the obmc_flag described in the stream (e.g., compressed sequence) and switches whether or not to apply OBMC processing depending on its value to perform decoding.
[0279] In the example described above, the interpretation unit 126 generates one rectangular prediction image for the current rectangular block. However, the interpretation unit 126 may generate multiple prediction images of shapes different from rectangles for the current rectangular block, and then combine these multiple prediction images to generate the final rectangular prediction image. The shapes different from rectangles may be, for example, triangles.
[0280] Figure 37 is a diagram illustrating the generation of two triangular prediction images.
[0281] The interpretation unit 126 generates a predicted triangular image by performing motion compensation on the first triangular partition within the current block using the first MV of that first partition. Similarly, the interpretation unit 126 generates a predicted triangular image by performing motion compensation on the second triangular partition within the current block using the second MV of that second partition. Then, the interpretation unit 126 combines these predicted images to generate a predicted rectangular image identical to that of the current block.
[0282] In the example shown in Figure 37, the first and second partitions are triangular, but they may also be trapezoidal, or have different shapes from each other. Furthermore, in the example shown in Figure 37, the current block consists of two partitions, but it may also consist of three or more partitions.
[0283] Furthermore, the first and second partitions may overlap. That is, the first and second partitions may contain the same pixel region. In this case, the predicted image of the current block may be generated using the predicted image in the first partition and the predicted image in the second partition.
[0284] Furthermore, while this example shows that prediction images are generated by interpretation for both partitions, prediction images may also be generated by intrapretation for at least one partition.
[0285] [Motion Compensation > BIO] Next, we will explain how to derive motion vectors. First, we will describe the mode of deriving motion vectors based on a model that assumes uniform linear motion. This mode is sometimes called the BIO (bi-directional optical flow) mode.
[0286] Figure 38 is a diagram illustrating a model that assumes uniform linear motion. In Figure 38, (vx, vy) represents the velocity vector, and τ0 and τ1 represent the temporal distance between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) represents the motion vector corresponding to reference picture Ref0, and (MVx1, MVy1) represents the motion vector corresponding to reference picture Ref1.
[0287] Under the assumption of uniform linear motion of the velocity vector (vx, vy), (MVx0, MVy0) and (MVx1, MVy1) can be expressed as (vxτ0, vyτ0) and (-vxτ1, -vyτ1), respectively, and the following optical flow equality (2) holds.
[0288]
number
[0289] Here, I(k) represents the luminance value of the reference image k (k=0,1) after motion compensation. This optical flow equation shows 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 this optical flow equation and Hermite interpolation, block-level motion vectors obtained from merge lists, etc., may be corrected on a pixel-by-pixel basis.
[0290] Furthermore, motion vectors may be derived on the decoding side using a method different from that used for deriving motion vectors based on a model that assumes uniform linear motion. For example, motion vectors may be derived on a sub-block basis based on the motion vectors of multiple adjacent blocks.
[0291] [Motion Compensation > LIC] Next, we will describe an example of a mode that generates a predicted image (prediction) using LIC (local illumination compensation) processing.
[0292] Figure 39 illustrates an example of a predictive image generation method using brightness correction processing by LIC processing.
[0293] First, the MV is derived from the encoded reference picture to obtain the reference image corresponding to the current block.
[0294] Next, information is extracted showing how the luminance values have changed between the reference picture and the current picture for the current block. This extraction is based on the luminance pixel values of the encoded left adjacent reference region (peripheral reference region) and encoded upper adjacent reference region (peripheral reference region) in the current picture, and the luminance pixel values at the equivalent positions in the reference picture specified by the derived MV. Then, the luminance correction parameter is calculated using the information showing how the luminance values have changed.
[0295] A predicted image for the current block is generated by applying the brightness correction parameters to the reference image within the reference picture specified in MV.
[0296] Note that the shape of the peripheral reference region in Figure 39 is just one example, and other shapes may be used.
[0297] Furthermore, although this explanation describes the process of generating a predicted image from a single reference picture, the process is similar when generating predicted images from multiple reference pictures. Alternatively, the brightness correction process may be applied to each reference picture obtained from the reference picture in the same manner as described above before generating the predicted image.
[0298] One method for determining whether or not to apply LIC processing is to use a signal called lic_flag, which indicates whether or not to apply LIC processing. For example, in an encoding device, it is determined whether the current block belongs to a region where brightness changes are occurring. If it belongs to a region where brightness changes are occurring, the value of lic_flag is set to 1, and LIC processing is applied and encoding is performed. If it does not belong to a region where brightness changes are occurring, the value of lic_flag is set to 0, and encoding is performed without applying LIC processing. On the other hand, in a decoding device, the lic_flag written in the stream can be decoded, and the device may switch whether or not to apply LIC processing depending on its value before performing decoding.
[0299] Another way to determine whether to apply LIC processing is, for example, by checking whether LIC processing was applied to surrounding blocks. A specific example is, if the current block is in merge mode, the system checks whether the surrounding encoded blocks selected during the MV derivation in merge mode were encoded with LIC processing. Based on this result, the system switches whether to apply LIC processing and then performs the encoding. Note that in this example, the same process is applied to the decoding device.
[0300] The LIC processing (luminance correction processing) was explained using Figure 39, but the details will be explained below.
[0301] First, the interpretation unit 126 derives motion vectors to obtain a reference image corresponding to the block to be encoded from a reference picture which is an encoded picture.
[0302] Next, the interpretation unit 126 extracts information indicating how the luminance values have changed between the reference picture and the picture to be encoded, using the luminance pixel values of the left-adjacent and upper-adjacent encoded peripheral reference regions and the luminance pixel values at equivalent positions in the reference picture specified by the motion vector, and calculates luminance correction parameters. For example, let p0 be the luminance pixel value of a pixel in the peripheral reference region of the picture to be encoded, and p1 be the luminance pixel value of a pixel in the peripheral reference region of the reference picture at an equivalent position to that pixel. The interpretation unit 126 calculates coefficients A and B as luminance correction parameters to optimize A×p1+B=p0 for multiple pixels in the peripheral reference region.
[0303] Next, the interpretation unit 126 generates a predicted image for the encoding target block by performing brightness correction processing on the reference image in the reference picture specified by the motion vector using brightness correction parameters. For example, let p2 be the brightness pixel value in the reference image, and p3 be the brightness pixel value of the predicted image after brightness correction processing. The interpretation unit 126 generates the predicted image after brightness correction processing by calculating A × p2 + B = p3 for each pixel in the reference image.
[0304] Note that the shape of the surrounding reference region in Figure 39 is just one example, and other shapes may be used. Also, only a part of the surrounding reference region shown in Figure 39 may be used. For example, a region containing a predetermined number of pixels obtained by thinning out the upper adjacent pixels and the left adjacent pixels may be used as the surrounding reference region. Furthermore, the surrounding reference region is not limited to the region adjacent to the block to be encoded, but may also be a region not adjacent to the block to be encoded. In the example shown in Figure 39, the surrounding reference region in the reference picture is the region specified by the motion vector of the picture to be encoded, from the surrounding reference region in the picture to be encoded, but it may also be a region specified by other motion vectors. For example, the other motion vector may be the motion vector of the surrounding reference region in the picture to be encoded.
[0305] Although the operation of the encoding device 100 has been described here, the operation of the decoding device 200 is similar.
[0306] Furthermore, LIC processing may be applied not only to luminance but also to chrominance. 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] Furthermore, LIC processing may be applied on a subblock basis. For example, correction parameters may be derived using the surrounding reference region of the current subblock and the surrounding reference region of the reference subblock within the reference picture specified by the MV of the current subblock.
[0308] [Prediction Control Unit] The prediction control unit 128 selects either the intra-prediction signal (the signal output from the intra-prediction unit 124) or the inter-prediction signal (the signal output from the inter-prediction unit 126), and outputs the selected signal as the prediction signal to the subtraction unit 104 and the addition unit 116.
[0309] As shown in Figure 1, in various implementation examples, 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 a coded 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 decoder. The decoder may receive and decode the coded bitstream and perform the same processing as the prediction processing performed in the intra-prediction unit 124, inter-prediction unit 126, and prediction control unit 128. The prediction parameters may include a selected prediction signal (e.g., a motion vector, prediction type, or prediction mode used in the intra-prediction unit 124 or inter-prediction unit 126), or arbitrary indices, flags, or values that are based on or indicate the prediction processing performed in the intra-prediction unit 124, inter-prediction unit 126, and prediction control unit 128.
[0310] [Example of an encoding device implementation] Figure 40 is a block diagram showing an example implementation of the encoding device 100. The encoding device 100 includes a processor a1 and memory a2. For example, the multiple components of the encoding device 100 shown in Figure 1 are implemented by the processor a1 and memory a2 shown in Figure 40.
[0311] Processor a1 is a circuit that performs information processing and is a circuit that can access memory a2. For example, processor a1 is a dedicated or general-purpose electronic circuit for encoding moving images. Processor a1 may be a processor such as a CPU. Alternatively, processor a1 may be a collection of multiple electronic circuits. Furthermore, for example, processor a1 may play the role of multiple components of the encoding device 100 shown in Figure 1, etc., excluding the component for storing information.
[0312] Memory a2 is a dedicated or general-purpose memory in which information for the processor a1 to encode moving images is stored. Memory a2 may be an electronic circuit and may be connected to the processor a1. Memory a2 may also be included in the processor a1. Memory a2 may also be a collection of multiple electronic circuits. Memory a2 may also be a magnetic disk or an optical disk, or may be described as storage or a recording medium. Memory a2 may also be a non-volatile memory or a volatile memory.
[0313] For example, memory a2 may store the video to be encoded, or it may store the bit sequence corresponding to the encoded video. Alternatively, memory a2 may store a program for processor a1 to encode the video.
[0314] Furthermore, for example, memory a2 may play the role of an information storage component among the multiple components of the encoding device 100 shown in Figure 1, etc. Specifically, memory a2 may play the role of the block memory 118 and frame memory 122 shown in Figure 1. More specifically, reconstructed blocks and reconstructed pictures may be stored in memory a2.
[0315] Furthermore, it is not necessary for the encoding device 100 to implement all of the components shown in Figure 1, etc., nor is it necessary for all of the processes described above to be performed. Some of the components shown in Figure 1, etc., may be included in other devices, and some of the processes described above may be performed by other devices.
[0316] [Decoding device] Next, a decoding device capable of decoding the encoded signal (encoded bitstream) output from the above-described encoding device 100 will be explained. Figure 41 is a block diagram showing the functional configuration of the decoding device 200 according to this embodiment. The decoding device 200 is a video decoding device that decodes video in block units.
[0317] As shown in Figure 41, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an adder 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 can be implemented, for example, by a general-purpose processor and memory. In this case, when the software program stored in memory is executed by the processor, the processor functions as an entropy decoding unit 202, an inverse quantization unit 204, an inverse transformation unit 206, an addition unit 208, a loop filter unit 212, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220. Alternatively, the decoding device 200 may be implemented as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transformation unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0319] The following describes the overall processing flow of the decoding device 200, followed by a description of each component included in the decoding device 200.
[0320] [Overall flow of the decryption process] Figure 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 one selected by the encoding device 100. Then, the decoding device 200 performs steps Sp_2 to Sp_6 for each of the multiple blocks that make up that division pattern.
[0322] In other words, the entropy decoding unit 202 decodes (specifically, performs entropy decoding) the encoded quantization coefficients and prediction parameters of the block to be decoded (also called the current block) (step Sp_2).
[0323] Next, the inverse quantization unit 204 and the inverse transformation unit 206 reconstruct multiple predicted residuals (i.e., difference blocks) by performing inverse quantization and inverse transformation on multiple quantization coefficients (step Sp_3).
[0324] Next, the prediction processing unit, which consists 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) for the current block (step Sp_4).
[0325] Next, the addition unit 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, once this reconstructed image is generated, the loop filter unit 212 performs filtering on the reconstructed image (step Sp_6).
[0327] The decryption device 200 then determines whether or not the entire picture has been decrypted (step Sp_7). If it determines that it has not been completed (No. in step Sp_7), it repeats the process from step Sp_1.
[0328] The processes in steps Sp_1 to Sp_7 may be performed sequentially by the decoding device 200, some of these processes may be performed in parallel, and the order may be changed.
[0329] [Entropy Decoder] The entropy decoding unit 202 entropically decodes the encoded bitstream. Specifically, the entropy decoding unit 202 arithmetically decodes the encoded bitstream into a binary signal, for example. Then, the entropy decoding unit 202 debinarizes the binary signal. The entropy decoding unit 202 outputs the quantization coefficients in block units to the inverse quantization unit 204. The entropy decoding unit 202 may also output prediction parameters contained in the encoded bitstream (see Figure 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 intra-prediction unit 124, the inter-prediction unit 126, and the prediction control unit 128 on the encoding device side.
[0330] [Dequantization section] The inverse quantization unit 204 inversely quantizes the quantization coefficients of the decoded block (hereinafter referred to as the current block), which is the input from the entropy decoding unit 202. Specifically, for each quantization coefficient of the current block, the inverse quantization unit 204 inversely quantizes the quantization coefficient based on the quantization parameter corresponding to that quantization coefficient. The inverse quantization unit 204 then outputs the inversely quantized quantization coefficients (i.e., transformation coefficients) of the current block to the inverse transformation unit 206.
[0331] [Inverse Transformation Section] The inverse transform unit 206 restores the prediction error by inversely transforming the transformation coefficients, which are input from the inverse quantization unit 204.
[0332] For example, if the information decoded from the encoded bitstream indicates that EMT or AMT should be applied (e.g., the AMT flag is true), the inverse transform unit 206 inversely transforms the transformation coefficients of the current block based on the information indicating the decoded transformation type.
[0333] For example, if the information decoded from the encoded bitstream indicates that NSST should be applied, the inverse transform unit 206 applies inverse retransformation to the transformation coefficients.
[0334] [Addition section] The adder 208 reconstructs the current block by adding the prediction error, which is the input from the inverse transformer 206, and the prediction sample, which is the 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 located within the decoded picture (hereinafter referred to as the current picture). Specifically, the block memory 210 stores the reconstructed blocks output from the adder 208.
[0336] [Loop Filter Section] 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 and the display device, etc.
[0337] If the information interpreted from the encoded bitstream indicating ALF on / off indicates ALF is on, one filter is selected from among several filters based on the direction and activity of the local gradient, and the selected filter is applied to the reconstruction block.
[0338] [Frame memory] The frame memory 214 is a memory unit for storing reference pictures used for interpretation, and is sometimes 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)] Figure 43 shows an example of processing performed in the prediction processing unit of the decoding device 200. The prediction processing unit consists 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 predicted block. Predicted signals include, for example, intra-predicted signals or inter-predicted signals. Specifically, the prediction processing unit generates a predicted image of the current block using the reconstructed image already obtained by generating predicted blocks, difference blocks, coefficient blocks, difference blocks, and decoded image blocks.
[0341] The reconstructed image may be, for example, the image of the reference picture, or it may be the image of the decoded block within the current picture, which is the picture containing the current block. The decoded block within the current picture is, for example, the adjacent block to the current block.
[0342] Figure 44 shows another example of processing performed in the prediction processing unit of the decoding device 200.
[0343] The prediction processing unit determines a method or mode for generating the predicted image (step Sr_1). For example, this method or mode may be determined based on, for example, prediction parameters.
[0344] If the prediction processing unit determines a first method as the mode for generating the prediction image, it generates the prediction image according to that first method (step Sr_2a). If the prediction processing unit determines a second method as the mode for generating the prediction image, it generates the prediction image according to that second method (step Sr_2b). If the prediction processing unit determines a third method as the mode for generating the prediction image, it generates the prediction image according to that third method (step Sr_2c).
[0345] The first, second, and third methods are different methods for generating predictive images, and may be, for example, an interpretation method, an intrapretation method, and other prediction methods, respectively. These prediction methods may use the reconstructed images 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 decoded from the encoded bitstream, and by referring to the blocks in the current picture stored in the block memory 210. Specifically, the intra-prediction unit 216 generates an intra-prediction signal by performing intra-prediction by referring 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] Furthermore, if an intra-prediction mode that references a luminance block is selected in the intra-prediction of a color difference block, the intra-prediction unit 216 may predict the color difference component of the current block based on the luminance component of the current block.
[0348] Furthermore, if the information decoded from the encoded bitstream indicates the application of PDPC, the intra-prediction unit 216 corrects the pixel value after intra-prediction based on the gradient of the reference pixels in the horizontal / vertical directions.
[0349] [International Prediction Department] The inter-prediction unit 218 predicts the current block by referring to a reference picture stored in the frame memory 214. Prediction is performed in units of the current block or sub-blocks within the current block (e.g., 4x4 blocks). 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) decoded from the encoded bitstream (e.g., prediction parameters output from the entropy decoding unit 202), and outputs the inter-prediction signal to the prediction control unit 220.
[0350] If the information decoded from the encoded bitstream indicates that the OBMC mode should be applied, the interpretation unit 218 generates an interpretation prediction signal using not only the motion information of the current block obtained by motion search, but also the motion information of the adjacent block.
[0351] Furthermore, if the information decoded from the encoded bitstream indicates that FRUC mode should be applied, the interpretation unit 218 derives motion information by performing a motion search according to the pattern matching method (bilateral matching or template matching) decoded from the encoded stream. Then, the interpretation 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 motion vectors based on a model that assumes uniform linear motion. Also, if the information decoded from the encoded bitstream indicates that the affine motion compensation prediction mode should be applied, the inter-prediction unit 218 derives motion vectors on a sub-block basis based on the motion vectors of multiple adjacent blocks.
[0353] [MV Derivation > Normal Intermode] If the information decoded from the encoded bitstream indicates that the normal intermode should be applied, the interpretation unit 218 derives the motion video (MV) based on the information decoded from the encoded stream and uses that MV to perform motion compensation (prediction).
[0354] Figure 45 is a flowchart showing an example of inter-mode prediction in the decoding device 200.
[0355] The interpretation unit 218 of the decoding device 200 performs motion compensation for each block. In this process, the interpretation unit 218 first obtains multiple candidate MVs for the current block based on information such as the MVs of multiple decoded blocks that are temporally or spatially surrounding the current block (step Ss_1). In other words, the interpretation unit 218 creates a list of candidate MVs.
[0356] Next, the interpretation unit 218 extracts N candidate MVs (where N is an integer greater than or equal to 2) from among the multiple candidate MVs obtained in step Ss_1 as predicted motion vector candidates (also called predicted MV candidates) according to a predetermined priority order (step Ss_2). The priority order is predetermined for each of the N predicted MV candidates.
[0357] Next, the interpretation 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 among the N predicted MV candidates as the predicted motion vector (also called the predicted MV) for the current block (step Ss_3).
[0358] Next, the interpretation unit 218 decodes the differential MV from the input stream and derives the MV of the current block by adding the decoded differential MV (the difference value) to the selected predicted motion vector (step Ss_4).
[0359] Finally, the interpretation unit 218 generates a predicted image of the current block by performing motion compensation on the current block using the derived MV and the decoded reference picture (step Ss_5).
[0360] [Prediction Control Unit] The prediction control unit 220 selects either the intra-prediction signal or the inter-prediction signal and outputs the selected signal as the prediction signal to the summer unit 208. Overall, the configuration, 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 configuration, functions, and processing of the prediction control unit 128, intra-prediction unit 124, and inter-prediction unit 126 on the encoding device side.
[0361] [Example of a decryption device implementation] Figure 46 is a block diagram showing an example implementation of the decoding device 200. The decoding device 200 includes a processor b1 and memory b2. For example, the multiple components of the decoding device 200 shown in Figure 41 are implemented by the processor b1 and memory b2 shown in Figure 46.
[0362] Processor b1 is a circuit that performs information processing and is a circuit that can access memory b2. For example, processor b1 is a dedicated or general-purpose electronic circuit that decodes encoded video (i.e., encoded bitstream). Processor b1 may be a processor such as a CPU. Alternatively, processor b1 may be a collection of multiple electronic circuits. Furthermore, for example, processor b1 may play the role of multiple components of the decoding device 200 shown in Figure 41, etc., excluding the component for storing information.
[0363] Memory b2 is a dedicated or general-purpose memory in which information for the processor b1 to decode the encoded bitstream is stored. Memory b2 may be an electronic circuit and may be connected to the processor b1. Memory b2 may also be included in the processor b1. Memory b2 may also be a collection of multiple electronic circuits. Memory b2 may also be a magnetic disk or an optical disk, or may be described as storage or a recording medium. Memory b2 may also be non-volatile memory or volatile memory.
[0364] For example, memory b2 may store a video image or an encoded bitstream. Alternatively, memory b2 may store a program for processor b1 to decode the encoded bitstream.
[0365] Furthermore, for example, memory b2 may play the role of an information storage component among the multiple components of the decoding device 200 shown in Figure 41, etc. Specifically, memory b2 may play the role of the block memory 210 and frame memory 214 shown in Figure 41. More specifically, reconstructed blocks and reconstructed pictures may be stored in memory b2.
[0366] Furthermore, the decoding device 200 does not necessarily have to implement all of the components shown in Figure 41, etc., nor does it have to perform all of the processes described above. Some of the components shown in Figure 41, etc., may be included in other devices, and some of the processes described above may be performed by other devices.
[0367] [Definitions of each term] Each term may be defined as follows, for example:
[0368] A picture is an array of multiple luminance samples in a monochrome format, or two corresponding arrays of multiple luminance samples and multiple color difference samples in 4:2:0, 4:2:2, and 4:4:4 color formats. A picture may be a frame or a field.
[0369] The frame is composed of a top field where multiple sample rows 0, 2, 4, ... are generated, and a bottom field where multiple sample rows 1, 3, 5, ... are generated.
[0370] A slice is an integer number of coded tree units contained within one independent slice segment and all subsequent dependent slice segments that precede (if any) the next independent slice segment within the same access unit.
[0371] A tile is a rectangular region of a picture containing multiple coding tree blocks within a particular tile sequence and a particular tile row. A tile may also be a rectangular region of a frame that is intended to be decoded and coded independently, although loop filters may still be applied across the edges of the tile.
[0372] A block is an MxN (N rows x M columns) array of multiple samples, or an MxN array of multiple transformation coefficients. A block may also be a square or rectangular region of multiple pixels consisting of multiple matrices of one luminance and two chrominance values.
[0373] A CTU (Coded Tree Unit) may be a coded tree block of multiple luminance samples of a picture having three sample sequences, or two corresponding coded tree blocks of multiple chrominance samples. Alternatively, a CTU may be a coded tree block of multiple samples of either a monochrome picture or a picture coded using a syntax structure used to code three separate color planes and multiple samples.
[0374] The superblock may consist of one or two mode information blocks, or it may be a 64x64 pixel square block that can be recursively divided into four 32x32 blocks and further divided.
[0375] [Explanation of the secondary transformation process] Figure 47 is a diagram illustrating the secondary transformation process in the embodiment. The secondary transformation process is a further transformation process performed by the encoding device 100 or decoding device 200 on the predicted residual signal after it has undergone a primary transformation. In the secondary transformation process, an orthogonal transformation or the like is performed as the transformation process. The execution area of the secondary transformation process may differ from that of the primary transformation process. For example, even if the primary transformation process is performed on the entire processing block, the secondary transformation process may be performed on a part of the processing block, as shown in Figure 47. Here, the part of the processing block may be, for example, a sub-block on the low-frequency side.
[0376] Furthermore, the size of the subblock in which the secondary transformation process is performed does not have to be fixed. For example, the encoding device 100 may change the size of the subblock in which the secondary transformation process is performed according to the block size of the block to be processed.
[0377] Furthermore, the primary and secondary transformation processes may be separate or non-separable.
[0378] Multiple basis candidates may be used in the quadratic transformation process. For example, the encoding device 100 may hold a total of six basis candidates: 4x4 basis A, 4x4 basis B, 4x4 basis C, 8x8 basis D, 8x8 basis E, and 8x8 basis F. The encoding device 100 may select a candidate from among the multiple candidates to be used in the quadratic transformation process and write information about the selected candidate to the bitstream.
[0379] When selecting a base candidate to use for a quadratic transformation from multiple base candidates, the number of base candidates to use may be limited based on an arbitrary parameter. For example, when selecting a base candidate to use for a quadratic transformation from multiple base candidates, if the length of the shorter side of the block to be processed is 8 or more, an 8x8 base may be used. Alternatively, for example, when selecting a base candidate to use for a quadratic transformation from multiple base candidates, if the length of the shorter side of the block to be processed is 4, a 4x4 base may be used.
[0380] [Internal configuration of the conversion section of the encoding device] Figure 48 is a flowchart showing the processing procedure in the conversion unit of the encoding device in the embodiment.
[0381] First, the encoding device 100 determines whether the block to be processed is less than or equal to 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 rectangle block size. Furthermore, 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 transformation process.
[0382] If the encoding device 100 determines that the block to be processed is less than or equal to a predetermined block size (Yes in step S1000), the encoding device 100 terminates its operation without performing a secondary conversion process on the block to be processed. In this case, the encoding device 100 does not need to write the signals related to the secondary conversion process to the bitstream. In other words, the encoding device 100 does not need to encode the signals related to the secondary conversion process in the bitstream.
[0383] If the encoding device 100 determines that the block to be processed is larger than a predetermined block size (No in step S1000), the encoding device 100 determines whether or not to apply a secondary transformation process to the block to be processed (step S1001).
[0384] If the encoding device 100 determines that a secondary transformation process should be applied to the block to be processed (Yes in step S1001), the encoding device 100 selects one base candidate from one or more base candidate bases in the secondary transformation process (step S1002). Here, the determination in step S1001 and the selection in step S1002 may be made according to information such as the encoding mode of the block to be processed. Alternatively, the determination in step S1001 and the selection in step S1002 may be made by evaluating the cost by performing a provisional transformation process using each of the one or more base candidate bases in the secondary transformation process in step S1002. Furthermore, the signals indicating the results of the determination and selection made in steps S1001 and S1002 may be written to the bitstream by the encoding device 100. In other words, the signals indicating the results of the determination and selection made in steps S1001 and S1002 may be encoded in the bitstream by the encoding device 100.
[0385] Furthermore, in step S1002, one or more candidate bases in the quadratic transformation process may be changed according to the size of the block to be processed. For example, when the length of the shorter side of the block to be processed is less than 16, the encoding device 100 may use a base with the size of a 4x4 square as a candidate base for use in the quadratic transformation process. When the length of the shorter side of the block to be processed is 16 or more, the encoding device 100 may use an 8x8 square as a candidate base for use in the quadratic transformation.
[0386] Next, the encoding device 100 performs a quadratic transformation using the base candidate selected by the encoding device 100 in step S1002 (step S1003). Then, the encoding device 100 terminates its operation.
[0387] If the encoding device 100 determines that it does not apply a secondary transformation process to the block to be processed (No in step S1001), the encoding device 100 terminates its operation.
[0388] Note that the processing flow described in Figure 48 is just one example, and the order of the processes described in Figure 48 may be changed, some of the described processes may be omitted, or processes that are not described may be added.
[0389] Furthermore, the processing from step S1000 to step S1003, as explained in Figure 48, is also carried out in the inverse transform section of the decoding device 200. In the inverse transform section of the decoding device 200, the operation of encoding the signal in a bitstream, which was performed in the transform section of the encoding device 100, is changed to the operation of decoding the signal from a bitstream.
[0390] The processing flow of the decoding device 200 described above is just one example, and the order of the described processes may be changed, some of the described processes may be omitted, or processes that are not described may be added.
[0391] Figure 49A is a table showing an example of the amount of processing required for primary conversion per block in the embodiment. Figure 49B is a table showing an example of the amount of processing required for secondary conversion per block in the 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 conversion.
[0392] Figures 49A and 49B illustrate the processing load required for primary and secondary transformations per block with specific examples. The processing load required for primary and secondary transformations for the entire Coding Tree Unit (CTU) is, for example, (Processing time required for primary and secondary transformations of the entire CTU) = {(Processing time required for primary transformation) + (Processing time required for secondary transformation) × (Number of blocks that can be placed in the CTU)} It can be calculated using the following formula.
[0393] In the primary transformation process, the block sizes of the blocks to be processed are set to square block sizes of 4×4, 8×8, 16×16, and 32×32, which are powers of 2. The assumed number of processing steps required for the primary and secondary transformation processes for each of the above block sizes is shown in Figures 49A and 49B.
[0394] Here, the processing amount required for the primary and secondary transformation processes may be interpreted as the number of multiplications, the number of additions, and the sum of the number of multiplications and additions.
[0395] Furthermore, it is assumed here that the size of the subblock on which the quadratic transformation is performed, that is, the size of the base used in the quadratic transformation, is either a 4x4 square or an 8x8 square.
[0396] Figure 50 is a table showing a first example in the embodiment. Figure 50 describes a first example in which the only basis candidates used in the quadratic transformation process are basis bases of a 4x4 square size.
[0397] Let's assume the shape of the CTU in the first example is a 128x128 square. For example, if we use a 4x4 square block as the block to be processed, the processing time required for the primary and secondary transformations of the entire CTU can be calculated using the following formula.
[0398] (48 + 256) × {(128 / 4)^2} = 311,296 (times)
[0399] Figure 50 shows the processing load required for primary and secondary transformations of the entire CTU for each block size of the blocks to be processed, calculated using the same calculations as above. In the first example shown in Figure 50, the encoding device 100 or decoding device 200 uses a 4x4 square base for secondary transformations for all sizes of blocks to be processed in which primary transformations are performed.
[0400] In the first example shown in Figure 50, the processing load is highest when the block size of the block to be processed is the largest, a 32x32 square block size. Conversely, the second highest processing load is when the number of blocks in the CTU is the largest, and the block size of the block to be processed is a 4x4 square. However, if we consider, for example, when the block size of the block to be processed is 8x8 or larger, and the encoding device 100 uses an 8x8 square base for the secondary transformation process, the processing load increases even more significantly than that shown in Figure 50. In other words, in the first example shown in Figure 50, the processing load required for the primary and secondary transformation processes is suppressed by reducing the size of the subblocks in which the secondary transformation process is performed. The first example is a preferred example of a candidate base used for the secondary transformation process selected for the block size of the block to be processed in which the primary transformation process is performed.
[0401] However, the conversion process of the CTU performed by the conversion unit of the encoding device 100 or the inverse conversion unit of the decoding device 200 is expected to involve processes other than the primary and secondary conversion processes shown in Figure 50. Therefore, depending on the processing volume of these processes other than the primary and secondary conversion processes, the amount of processing required in the first example when the block size of the target block is 4x4 may be significantly larger than in other cases. Here, these other processes are processes required for each target block. For example, pre-processing or post-processing for performing the conversion process. Specifically, pre-processing involves determining the memory storage method to be used, copying the data to memory, converting the copied data, scanning the converted data in block units, and transmitting it. Therefore, the 4x4 case has the largest number of blocks in which primary conversion processing is performed and the largest number of sub-blocks in which secondary conversion processing is performed within the CTU, and when considering the processes other than primary and secondary conversion processing, the amount of processing may be the largest.
[0402] Therefore, an example is shown of how to reduce the amount of processing performed by the encoding device 100, taking into account processing other than that required for the primary and secondary conversion processes. The following example describes an example of a candidate base used for the secondary conversion process, which is selected for each block size of the target block on which the primary conversion process is performed.
[0403] Figure 51 is a table showing a second example in the embodiment. In the second example shown in Figure 51, the encoding device 100 or decoding device 200 does not perform secondary transformation processing when the block size of the block to be processed that is subject to primary transformation processing is 4x4, and performs secondary transformation processing using a candidate base of a 4x4 square size when the block size of the block to be processed is other than 4x4. Alternatively, instead of the encoding device 100 not performing secondary transformation processing, the encoding device 100 may be configured to perform secondary transformation processing using a base with transformation characteristics such that the coefficient values are equal before and after transformation. Figure 51 shows the processing amount required for primary and secondary transformation processing in the entire CTU for each block size of the block to be processed in the second example, calculated using the calculation formula used in Figure 50.
[0404] As shown in Figure 51, in the second example, the amount of processing required for primary and secondary conversion is reduced compared to the first example, even when the block size of the target block is 4x4, which is when the amount of processing required for processing other than primary and secondary conversion is greatest for each target block. Therefore, even when the amount of processing required for processing other than primary and secondary conversion is large for each target block, it is possible to suppress the maximum amount of processing that can occur in the overall conversion process of the CTU. Thus, the encoding device 100 can promote a reduction in circuit size in the device implemented to perform the conversion process.
[0405] In the second example described in Figure 51, the encoding device 100 or decoding device 200 does not perform secondary transformation processing when the block size of the block to be processed for primary transformation processing is 4x4. However, the encoding device 100 or decoding device 200 may be configured not to perform secondary transformation processing when the block size of the block to be processed for primary transformation processing is other than 4x4. For example, the encoding device 100 or decoding device 200 does not need to perform secondary transformation processing when the block size of the block to be processed for primary transformation processing is 8x8. Also, for example, the encoding device 100 or decoding device 200 does not need to perform secondary transformation processing when the block size of the block to be processed for primary transformation processing is 4x8 or 8x4. Furthermore, for example, the encoding device 100 or decoding device 200 does not need to perform secondary transformation processing when the block size of the block to be processed for primary transformation processing is other than 8x8, 4x8, and 8x4. In other words, the encoding device 100 may be configured not to perform secondary conversion processing if the size of the block to be processed is less than or equal to the smallest block size among the one or more block sizes selectable in the secondary conversion processing. In this case, the system may be configured to apply secondary conversion processing if the size of the block to be processed is greater than the smallest block size among the one or more block sizes selectable in the secondary conversion processing.
[0406] Alternatively, instead of the encoding device 100 performing a quadratic transformation, the encoding device 100 may be configured to perform a quadratic transformation using a basis with transformation characteristics such that the coefficient values are equal before and after the transformation.
[0407] With the above configuration, the encoding device 100 or the decoding device 200 can be configured to mean that there are no candidate secondary transformation bases for block sizes within the block size of the target blocks where primary transformation processing is performed, where the processing load for each target block may be large, separate from the primary and secondary transformation processing. In other words, the encoding device 100 or the decoding device 200 can be configured not to perform secondary transformation processing for block sizes within the block size of the target blocks where primary transformation processing is performed, where the processing load for each target block may be large, separate from the primary and secondary transformation processing.
[0408] For example, the encoding device 100 or the decoding device 200 can be configured to mean that there are no candidates for the secondary transformation basis when the block size of the block to be processed for the primary transformation is 8x8. Also, for example, the encoding device 100 or the decoding device 200 can be configured to mean that there are no candidates for the secondary transformation basis when the block size of the block to be processed for the primary transformation is 4x8 or 8x4. Also, for example, the encoding device 100 or the decoding device 200 can set the number of candidates for the secondary transformation basis to be "none" when the block size of the block to be processed for the primary transformation is other than 8x8, 4x8, and 8x4. Also, for example, the encoding device 100 or the decoding device 200 can set the number of candidates for the secondary transformation basis to be "none" when the block size of the block to be processed for the primary transformation is other than 4x4.
[0409] This improves the possibility that the encoding device 100 or the decoding device 200 can suppress the maximum processing load that may occur in the conversion process of the CTU. Therefore, the encoding device 100 or the decoding device 200 can promote a reduction in circuit size in the device implemented to perform the conversion process.
[0410] Furthermore, when the encoding device 100 performs a quadratic transformation using a 4x4 square base, it may set a portion of the 4x4 square base to zero. In other words, the 4x4 square base may have a transformation characteristic that forces some of the transformation coefficient values of the processed block after the quadratic transformation to become zero.
[0411] Figure 52 is a table showing a third example in the embodiment. In the third example shown in Figure 52, no secondary transformation processing is performed when the block size of the block to be processed is 4x4. When the block size of the block to be processed is 8x8, secondary transformation processing is performed using a base of a 4x4 square size. Furthermore, when the block size of the block to be processed is 16x16 and 32x32, secondary transformation processing is performed using a base of an 8x8 square size. Alternatively, 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 with transformation characteristics such that the coefficient values are equal before and after the transformation. Figure 52 shows the processing amount required for primary and secondary transformation processing in the entire CTU for each block size of the block to be processed in the third example, calculated using the calculation formula used in Figure 50.
[0412] As shown in Figure 52, in the third example, compared to the first and second examples, the amount of processing required for primary and secondary conversion increases when using 16×16 and 32×32 processing blocks. However, the amount and rate of increase are not large. On the other hand, in the third example, the amount of processing required for primary and secondary conversion is reduced compared to the first example when the block size of the processing block is 4×4, which is the case when the amount of processing required for processing blocks other than primary and secondary conversion is the largest. Therefore, even when the amount of processing required for processing blocks other than primary and secondary conversion is large, it is possible to suppress the maximum amount of processing that can occur in the overall conversion process of the CTU. In addition, because the size of the base used in secondary conversion is larger in some parts than in the first and second examples, it is possible to enable more efficient conversion processing and improve encoding efficiency. Thus, the encoding device 100 can promote a reduction in circuit size in the device implemented to perform the conversion processing.
[0413] Furthermore, when performing a quadratic transformation using a base of 8x8 squares, it is permissible to set a portion of the 8x8 square base to zero. In other words, the 8x8 square base may have a transformation characteristic that forces some of the transformation coefficient values of the processed blocks to become zero after the quadratic transformation.
[0414] Furthermore, the processes described in the second example shown in Figure 51 and the third example shown in Figure 52 are not necessarily applicable when the processing load of processes other than the primary and secondary conversion processes required for each target block is large. The processes described in the second example shown in Figure 51 and the third example shown in Figure 16 may be applied when the processing load of processes other than the primary and secondary conversion processes required for each target block is small. In this case, the maximum processing load that can occur in the CTU's conversion process will be smaller compared to when the processes described in the second example shown in Figure 51 and the third example shown in Figure 52 are applied when the processing load of processes other than the primary and secondary conversion processes required for each target block is large. Therefore, the encoding device 100 or the decoding device 200 can promote a reduction in circuit size in the devices implemented to perform the conversion process.
[0415] Figure 53 is a table showing a fourth example in the embodiment. In the first example shown in Figure 50, a common base of 4x4 squares used for the secondary transformation is used for all sizes of processing blocks that undergo the primary transformation, thereby suppressing the maximum amount of processing required for both the primary and secondary transformations. However, the above method has difficulty accommodating the fact that the trend of coefficient values differs depending on the size of the processing block during the primary transformation. For example, the trend of coefficient values after the primary transformation in a 4x4 square processing block is likely to be significantly different from the trend of coefficient values after the primary transformation in a 4x4 square region corresponding to the low-frequency side of a 16x16 square processing block. In this case, if a common candidate base used for the secondary transformation is used for processing blocks of different sizes, it is highly likely that the optimal candidate base cannot be used for the secondary transformation.
[0416] Therefore, in the fourth example, as shown in Figure 53, even if the basis used in the secondary transformation process is the same size, the encoding device 100 assigns a different group of candidate bases to be used in the secondary transformation process to the subblock where the secondary transformation process is performed, for each size of the block to be processed in the primary transformation process. The encoding device 100 selects the basis to be actually applied in the secondary transformation process from the group of candidates assigned to the subblock where the secondary transformation process is performed. Here, the candidate group may have multiple candidate bases to be used in the secondary transformation process, or it may have one candidate base to be used in the secondary transformation 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, a group of candidate bases to be used in the secondary transformation process, which are assigned to the target block in the primary transformation process according to the block size, is defined as a transformation basis that is optimal according to the trend of coefficient values after the primary transformation process in the region where the secondary transformation process is performed within the target block. Therefore, the encoding device 100 can select a more appropriate candidate base to be used in the secondary transformation process than in the first example.
[0418] In the fourth example explained in Figure 53, the base shape used for the secondary transformation is a 4x4 square, but other shapes may be used. Also, in the fourth example, different sized bases may be used for the secondary transformation depending on the size of the block to be processed. Furthermore, the encoding device 100 may choose not to perform the secondary transformation for some of the sizes of the blocks to be processed.
[0419] Furthermore, in the fourth example explained in Figure 53, the encoding device 100 uses a different set of candidate bases for the secondary transformation process for each size of the processing block on which the primary transformation process is performed. However, the encoding device 100 may also use a common set of candidate bases for the secondary transformation process for processing blocks of different sizes on which the primary transformation process is performed.
[0420] The examples shown in Figures 50 to 53 illustrate a configuration in which, for each block size of the blocks being processed under primary transformation, there is one candidate base used when secondary transformation is performed. However, in the examples shown in Figures 50 to 53, there may be multiple candidate bases used when secondary transformation is performed for each block size of the blocks being processed under primary transformation. Furthermore, in the examples shown in Figures 50 to 53, there may be block sizes among the blocks being processed under primary transformation that have multiple candidate bases used when secondary transformation is performed.
[0421] For example, if the block size of the block to be processed under primary transformation is 32x32, the encoding device 100 or the decoding device 200 may be configured to select a base from a 4x4 base and an 8x8 base as the base used for secondary transformation. Similarly, if the block size of the block to be processed under primary transformation is 16x16, the encoding device 100 or the decoding device 200 may be configured to select a base from a 4x4 base and an 8x8 base as the base used for secondary transformation. Furthermore, if secondary transformation is performed on multiple blocks of multiple block sizes under primary transformation, there may be multiple candidate bases for use in the secondary transformation.
[0422] In the fourth example explained in Figure 53, the encoding device 100 selects a basis to be used for the secondary transformation process from a different group of basis candidates for each size of the block to be processed in the primary transformation process. However, the example is not limited to this example. For example, the candidate group may be configured such that even if the candidates in the candidate group have a common basis, they are considered a group of candidates with different candidates, where some of the coefficients of the basis are replaced with 0, resulting in a difference in whether or not the secondary transformation process is performed. In other words, in a given group of candidates, the candidates may have a transformation characteristic in which some of the transformation coefficient values of the block to be processed after the secondary transformation process are forced to become 0. To put it another way, a group of candidate candidates with different basis bases is not limited to a group of candidates consisting of candidates with different basis bases; even if the basis consists of the same coefficients, a group of candidate candidates that includes candidates whose coefficients after the secondary transformation process using that basis are different may also be considered a group of candidate bases.
[0423] Furthermore, the encoding device 100 or the decoding device 200 may perform different secondary transformation processes depending on the block size of the block to be processed in which the primary transformation process is performed.
[0424] The processing steps of the encoding device shown in Figures 50 to 53 are also performed similarly in the decoding device.
[0425] [Differentiation] The encoding device 100 or decoding device 200 may apply the encoding method or decoding method, etc., of the embodiments of this disclosure to only the luminance signal or only the luminance signal if the block division structure of the processing target block is different for the chrominance signal and the luminance signal.
[0426] Furthermore, the encoding device 100 or decoding device 200 may decide whether or not to apply the encoding method or decoding method, etc., in the embodiments of this disclosure to the blocks to be processed, on a slice-by-slice or tile-by-tile basis.
[0427] Furthermore, the encoding device 100 or the decoding device 200 may decide whether or not to apply the encoding method and decoding method, etc., in the embodiments of this disclosure to the block to be processed, depending on the slice type (I-slice, P-slice, B-slice).
[0428] Furthermore, the encoding device 100 or decoding device 200 may write a flag indicating that the encoding method or decoding method, etc., according to the embodiment of this disclosure has been applied to the block to be processed, to the syntax of the sequence layer, picture layer, slice layer, etc.
[0429] Furthermore, when the encoding device 100 or decoding device 200 applies the coding method or decoding method, etc., in the embodiments of this disclosure to the blocks to be processed, it may use a determination method different from the method for determining base candidate used in the secondary transformation process in the embodiments of this disclosure. Also, the encoding device 100 or decoding device 200 may use a determination method different from the method for determining base candidate used in the secondary transformation process in the embodiments of this disclosure in combination with the method for determining base candidate used in the secondary transformation process in the embodiments of this disclosure. For example, the encoding device 100 or decoding device 200 may use a combination of the method for determining base candidate used in the secondary transformation process using intra-prediction mode and the method for determining base candidate used in the secondary transformation process in the embodiments of this disclosure.
[0430] In the coding method or decoding method, etc., of the embodiments of this disclosure, the processing target block is square, but the processing target block does not have to be square. For example, in the encoding method or decoding method, etc., of the embodiments of this disclosure, the processing target block may be rectangular.
[0431] In the encoding or decoding methods, etc., of the embodiments of this disclosure, the shape of the base used in the secondary transformation process is square, but the shape of the base used in the secondary transformation process does not have to be square. For example, in the encoding or decoding methods, etc., of the embodiments of this disclosure, the shape of the base used in the secondary transformation process may be rectangular.
[0432] [Representative example] Figure 54 is a flowchart showing an example of the operation of the encoding device in the embodiment. For example, the encoding device 100 shown in Figure 40 performs the operation shown in Figure 54 when performing a conversion process that applies a secondary conversion process to a predicted residual signal that has undergone a primary conversion. Specifically, the processor a1 performs the following operations using memory a2.
[0433] First, the encoding device 100 is composed of one or more candidate transformation basis sets, and it selects one transformation basis set from a different group of candidates depending on the block size of the block to be processed (step S2001).
[0434] Next, the encoding device 100 applies a quadratic transformation of a common block size to the transformation coefficients obtained by applying a linear transformation to the predicted residual signal (step S2002).
[0435] Furthermore, in the encoding device 100, the transformation basis for the quadratic transformation may be a 4x4 square.
[0436] Furthermore, in the encoding device 100, the transformation basis for the quadratic transformation may be an 8x8 square.
[0437] Furthermore, in the encoding device 100, a common transformation basis candidate may be assigned to some of the processing blocks of a certain size among the multiple block sizes during the quadratic transformation.
[0438] Furthermore, the encoding device 100 may determine not to apply a quadratic transformation to the transformation coefficients if the block size of the block to be processed is less than or equal to a predetermined block size, and may determine to apply a quadratic transformation to the transformation coefficients if the block size of the block to be processed is greater than the predetermined block size.
[0439] Furthermore, the predetermined block size of the block to be processed when the encoding device 100 determines that a secondary transformation should not be applied to the block to be processed may be a 4x4 square.
[0440] Furthermore, when the encoding device 100 determines that it will not apply a secondary transformation to the block to be processed, the predetermined block size of the block to be processed may be a rectangle of 4x8 or 8x4.
[0441] Furthermore, the predetermined block size of the block to be processed when the encoding device 100 determines not to apply a secondary transformation to 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.
[0442] Figure 55 is a flowchart showing an example of the operation of the decoding device in the embodiment. For example, the decoding device 200 shown in Figure 46 performs the operation shown in Figure 55 when performing an inverse transformation process that applies a linear transformation to the transformation coefficients to which a quadratic transformation has been applied. Specifically, the processor b1 performs the following operations using memory b2.
[0443] First, the decoding device 200 is composed of one or more candidate transformation basis sets, and it selects one transformation basis set from a different group of candidates depending on the block size of the block to be processed (step S3001).
[0444] Next, the decoding device 200 performs an inverse transform process by applying a linear transform to the transformed coefficients obtained by applying a quadratic transform of a common block size to the transformed coefficient signal (step S3002).
[0445] Furthermore, in the decoding device 200, the transformation basis for the quadratic transformation may be a 4x4 square.
[0446] Furthermore, in the decoding device 200, the transformation basis for the quadratic transformation may be an 8x8 square.
[0447] Furthermore, in the decoding device 200, a common transformation basis candidate may be assigned to some of the processing blocks of a certain size among the multiple block sizes during the secondary transformation.
[0448] Furthermore, the decoding device 200 may determine not to apply a quadratic transformation to the transformation coefficients if the block size of the block to be processed is less than or equal to a predetermined block size, and may determine to apply a quadratic transformation to the transformation coefficients if the block size of the block to be processed is greater than the predetermined block size.
[0449] Furthermore, the predetermined block size of the block to be processed when the decoding device 200 determines that it will not apply a secondary transformation to the block to be processed may be a 4x4 square.
[0450] Furthermore, the predetermined block size of the block to be processed when the decoding device 200 determines that it will not apply a secondary transformation to the block to be processed may be a rectangle of 4x8 or 8x4.
[0451] Furthermore, the predetermined block size of the block to be processed when the decoding device 200 determines not to apply a secondary transformation to 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.
[0452] [supplement] In this embodiment, the encoding device 100 and the decoding device 200 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 implemented by dedicated hardware or by executing a software program suitable for each component. Each component may also be implemented 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 circuitry and a storage device electrically connected to the processing circuitry and accessible from the processing circuitry. For example, the processing circuitry corresponds to a processor a1 or b1, and the storage device corresponds to memory a2 or b2.
[0455] The processing circuit includes at least one of dedicated hardware and a program execution unit, and performs processing using a memory device. Furthermore, if the processing circuit includes a program execution unit, the memory device stores the software program executed by that program execution unit.
[0456] Here, the software that implements the encoding device 100 or decoding device 200, etc., in this embodiment is the following program.
[0457] In other words, this program may cause the computer to perform a transformation process in which, in a block to be processed from among multiple blocks of multiple block sizes, a transformation coefficient obtained by applying a linear transformation to the predicted residual signal is further applied to the multiple blocks, and a quadratic transformation of a common block size is applied to the multiple blocks, and in the quadratic transformation of the common block size, one or more candidate transformation basis is composed of a transformation basis, and one of the transformation basis is selected from a different group of candidates depending on the block size of the block to be processed.
[0458] Alternatively, the program may cause the computer to perform an inverse transform process in which, in a block to be processed from among multiple blocks of multiple block sizes, a quadratic transform of a common block size is applied to the transform coefficient signal, and then a linear transform is applied to the transform coefficient, wherein the quadratic transform of the common block size consists of one or more candidate transform basis bases, and one of the transform basis bases is selected from a different group of candidates depending on the block size of the block to be processed.
[0459] Furthermore, each component may be a circuit, as described above. These circuits may form a single circuit as a whole, or they may be separate circuits. Also, each component may be implemented using a general-purpose processor, or it may be implemented using a dedicated processor.
[0460] Furthermore, a process performed by one component may be performed by another component. Also, the order in which processes are executed may be changed, and multiple processes may be executed in parallel. Additionally, the encoding / decoding device may comprise an encoding device 100 and a decoding device 200.
[0461] Furthermore, the first and second ordinal numbers used in the explanation may be changed as appropriate. Also, ordinal numbers may be newly assigned to the components, or removed.
[0462] Although the embodiments of the encoding device 100 and the decoding device 200 have been described above based on these embodiments, the embodiments of the encoding device 100 and the decoding device 200 are not limited to these embodiments. Without departing from the spirit of this disclosure, various modifications that a person skilled in the art could conceive of are applied to these embodiments, and configurations constructed by combining components from different embodiments may also be included within the scope of the embodiments of the encoding device 100 and the decoding device 200.
[0463] This embodiment may be implemented in combination with at least some of the other embodiments of this disclosure. Furthermore, some of the processes, some of the configurations of the apparatus, some of the syntax, etc., described in the flowchart of this embodiment may be implemented in combination with the other embodiments.
[0464] (Embodiment 2) [Implementation and Application] In each of the above embodiments, each functional or operational block can typically be implemented by an MPU (micro processing unit) and memory, etc. Furthermore, the processing performed by each functional block may be implemented as a program execution unit, such as a processor, which reads and executes software (programs) recorded on a recording medium such as ROM. This software may be distributed. This software may be recorded on various recording media such as semiconductor memory. It is also possible to implement each functional block using hardware (dedicated circuitry).
[0465] The processing described in each embodiment may be implemented by centralized processing using a single device (system), or by distributed processing using multiple devices. Furthermore, the processor executing the above program may be one or multiple. In other words, centralized processing may be performed, or distributed processing may be performed.
[0466] The embodiments of this disclosure are not limited to those described above, and various modifications are possible, which are also included within the scope of the embodiments of this disclosure.
[0467] Furthermore, here we will describe application examples of the video encoding method (image encoding method) or video decoding method (image decoding method) shown in each of the above embodiments, and various systems for implementing these application examples. Such systems may be characterized by having an image encoding device using the image encoding method, an image decoding device using the image decoding method, or an image encoding and decoding device that includes both. Other configurations of such systems can be appropriately modified as needed.
[0468] [Usage example] Figure 56 shows the overall configuration of a suitable content supply system ex100 for realizing a content distribution service. The service area for the communication service is divided into cells of a desired size, and within each cell, there are base stations ex106, ex107, ex108, ex109, and ex110, which are fixed radio stations in the illustrated example.
[0469] In this content supply system ex100, various 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~ex110. The content supply system ex100 may also be configured to connect any combination of the above devices. In various implementations, the devices may be directly or indirectly interconnected via a telephone network or short-range wireless, etc., without going through base stations ex106~ex110. Furthermore, the streaming server ex103 may be connected to various devices such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 via the internet ex101, etc. The streaming server ex103 may also be connected to terminals in a hotspot on an airplane ex117 via satellite ex116.
[0470] Note that instead of base stations ex106~ex110, wireless access points or hotspots may be used. Also, streaming server ex103 may be connected directly to the communication network ex104 without going through the internet ex101 or internet service provider ex102, or it may be connected directly to the airplane ex117 without going through satellite ex116.
[0471] The camera ex113 is a device capable of taking still images and videos, such as a digital camera. 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] Home appliance ex114 refers to appliances such as refrigerators or equipment included in household fuel cell cogeneration systems.
[0473] In the content supply system ex100, live streaming becomes possible when a terminal with a shooting function is connected to the streaming server ex103 via a base station ex106 or 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, and a terminal inside an airplane ex117) may perform the encoding process described in each of the above embodiments on still images or video content captured by a user using the terminal, or it may multiplex the video data obtained by encoding with sound data encoded from the sound corresponding to the video, and then 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 this disclosure.
[0474] Meanwhile, the streaming server ex103 streams the content data sent to the requesting client. The client is a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal on an airplane ex117, etc., that 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 this disclosure.
[0475] [Distributed Processing] Furthermore, the streaming server ex103 may consist of multiple servers or computers that distribute data processing, recording, and distribution. For example, the streaming server ex103 may be implemented using a CDN (Content Delivery Network), where content delivery is achieved through a network connecting numerous edge servers distributed worldwide. In a CDN, the physically closest edge server is dynamically assigned depending on the client. Latency can be reduced by caching and delivering content to the edge server. In addition, if several types of errors occur or the communication state changes due to increased traffic, processing can be distributed among multiple edge servers, the delivery entity can be switched to another edge server, or delivery can be continued by bypassing the failed part of the network, thus enabling high-speed and stable delivery.
[0476] Furthermore, beyond the distributed processing of the distribution itself, the encoding process of the captured data can be performed on each terminal, on the server side, or shared among them. For example, encoding generally involves two processing loops. In the first loop, the complexity or code amount of the image at the frame or scene level is detected. In the second loop, processing is performed to improve encoding efficiency while maintaining image quality. For example, if the terminal performs the first encoding process and the server that receives the content performs the second encoding process, it is possible to improve the quality and efficiency of the content while reducing the processing load on each terminal. In this case, if there is a request to receive and decode near real time, the first encoded data from the terminal can be received and played back on other terminals, enabling more flexible real-time distribution.
[0477] Another example is the camera ex113, which extracts features from an image, compresses the feature data as metadata, and sends it to the server. The server performs compression according to the meaning (or importance of content) of the image, for example, by determining the importance of objects from the features and switching the quantization precision. Feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction during further compression on the server. Alternatively, a simple encoding such as VLC (Variable Length Coding) may be performed on the terminal, and a more computationally intensive encoding such as CABAC (Context-Adaptive Binary Arithmetic Coding) may be performed on the server.
[0478] Another example is a scenario in a stadium, shopping mall, or factory where multiple video data sets of nearly identical scenes may exist, captured by multiple terminals. In such cases, the encoding process is distributed among the multiple terminals that captured the footage, along with other terminals and servers as needed, by assigning encoding tasks to each unit, for example, at the Group of Picture (GOP) level, picture level, or tile level (a division of a picture). This reduces latency and enables more real-time performance.
[0479] Since multiple video data sets depict essentially the same scene, the server may manage and / or instruct the video data captured by each terminal to reference each other. Alternatively, the server may receive the encoded data from each terminal, change the reference relationships between the multiple data sets, or correct or replace the pictures themselves and re-encode them. This allows for the creation of a stream with improved quality and efficiency for each individual data set.
[0480] Furthermore, the server may transcode the video data to change its encoding method before distributing it. For example, the server may convert an MPEG-based encoding to a VP-based encoding (e.g., VP9), or convert H.264 to H.265.
[0481] Thus, the encoding process can be performed by a terminal or one or more servers. Therefore, in the following, the terms "server" or "terminal" will be used to refer to the entity performing the processing, but 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] There is a growing trend to integrate and utilize images or videos of different scenes, or the same scene, captured from different angles, by multiple cameras ex113 and / or smartphones ex115, which are nearly synchronized with each other. The videos captured by each device are integrated based on the relative positional relationship between the devices, or on areas where feature points contained in the videos coincide, which are acquired separately.
[0483] The server may not only encode two-dimensional video but also encode still images automatically based on scene analysis of the video, or at a time specified by the user, and transmit them to the receiving terminal. Furthermore, if the server can obtain the relative positional relationship between the shooting terminals, it can generate a three-dimensional shape of the scene based not only on two-dimensional video but also on video of the same scene taken from different angles. The server may separately encode three-dimensional data generated by a point cloud or the like, or it may select or reconstruct video from video taken by multiple terminals to transmit to the receiving terminal based on the results of recognizing or tracking a person or object using the three-dimensional data.
[0484] In this way, users can enjoy scenes by arbitrarily selecting each video corresponding to each shooting terminal, or they can enjoy content in which a video from a selected viewpoint is extracted from 3D data reconstructed using multiple images or videos. Furthermore, along with the video, sound is also 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 links 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 may create separate viewpoint images for the right and left eyes and perform encoding that allows referencing between the viewpoint images using Multi-View Coding (MVC), or it may encode them as separate streams without referencing each other. When decoding the separate streams, it is advisable to synchronize playback so that the virtual 3D space is reproduced according to the user's viewpoint.
[0486] In the case of AR images, the server superimposes virtual object information from the virtual space onto camera information from the real space, based on its 3D position or the user's viewpoint movement. The decoding device may acquire or store the virtual object information and 3D data, generate a 2D image according to the user's viewpoint movement, and smoothly stitch them together to create superimposed data. Alternatively, the decoding device may send the user's viewpoint movement to the server in addition to the request for virtual object information. The server may create superimposed data according to the viewpoint movement received from the 3D data held by the server, encode the superimposed data, and distribute it to the decoding device. 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 3D data to 0, etc., so that those parts are transparent, and encode the data. Alternatively, the server may set a predetermined RGB value to the background, like chroma keying, and generate data in which parts other than the object are the background color.
[0487] Similarly, the decryption process of the distributed data can be performed on each client terminal, on the server side, or shared between them. For example, one terminal may send a reception request to the server, and other terminals may receive the content corresponding to that request, perform the decryption process, and then transmit the decrypted signal to a device with a display. By distributing the processing and selecting appropriate content regardless of the performance of the communication-capable terminals themselves, it is possible to play back data with good image quality. Another example is that while receiving large image data on a TV or similar device, a portion of the picture, such as tiles, may be decrypted and displayed on the viewer's personal terminal. This allows for sharing the overall picture while allowing users to check their own area of responsibility or areas they want to examine in more detail on their own device.
[0488] In situations where multiple short-range, medium-range, or long-range wireless communication networks are available both indoors and outdoors, it may be possible to seamlessly receive content using distribution system standards such as MPEG-DASH. Users may freely select and switch in real time between decoding devices or display devices, such as their own terminals or displays located indoors or outdoors. Furthermore, decoding can be performed while switching between the decoding terminal and the display terminal using the user's location information. This makes it possible to map and display information on a part of the wall or ground of an adjacent building with a displayable device embedded, while the user is moving to their destination. It is also possible to switch the bitrate of the received data based on the ease of access to the encoded data on the network, such as when the encoded data is cached on a server that can be accessed quickly from the receiving terminal, or copied to an edge server in the content delivery service.
[0489] [Scalable encoding] Regarding content switching, we will explain using a scalable stream compressed and encoded using the video encoding method described in each of the embodiments above, as shown in Figure 57. The server may have multiple streams with the same content but different qualities as individual streams, but it may also be configured to switch content by taking advantage of the temporal / spatial scalability of the stream realized by encoding it in layers, as shown in the figure. In other words, the decoding side can freely switch between decoding low-resolution and high-resolution content by deciding which layer to decode according to internal factors such as performance and external factors such as the state of the communication bandwidth. For example, if a user wants to continue watching a video they were watching on their smartphone ex115 while on the go, for example, on an internet TV or other device after returning home, the device only needs to decode the same stream up to a different layer, thus reducing the burden on the server.
[0490] Furthermore, as described above, in addition to a configuration where each layer encodes a picture and scalability is achieved by an enhancement layer above the base layer, the enhancement layer may also include metadata based on image statistics. The decoding side may generate high-quality content by super-resolution the picture in the base layer based on the metadata. Super-resolution may improve the signal-to-noise ratio while maintaining and / or increasing the resolution. The metadata may include information for identifying linear or nonlinear filter coefficients used in the super-resolution process, or information for identifying parameter values in the filtering process, machine learning, or least-squares operation used in the super-resolution process.
[0491] Alternatively, a configuration may be provided in which the picture is divided into tiles or the like according to the meaning of objects within the image. The decoding side decodes only a portion of the area by selecting the tiles to decode. Furthermore, by storing the attributes of the objects (people, cars, balls, etc.) and their positions in the image (coordinate positions within the same image, etc.) as metadata, the decoding side can identify the position of the desired object based on the metadata and determine the tile containing that object. For example, as shown in Figure 58, the metadata may be stored using a data storage structure different from the pixel data, such as the SEI (supplemental enhancement information) message in HEVC. This metadata indicates, for example, the position, size, or color of the main object.
[0492] Metadata may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units. The decryption side can obtain information such as the time when a specific person appears in the video, and by combining the picture-level information with the time information, it can identify the picture in which the object exists and determine the object's position within the picture.
[0493] [Web page optimization] Figure 59 shows an example of a web page display screen on a computer ex111, etc. Figure 60 shows an example of a web page display screen on a smartphone ex115, etc. As shown in Figures 59 and 60, a web page may contain multiple linked images, which are links to image content, and their appearance will differ depending on the viewing device. When multiple linked images are visible on the screen, the display device (decoder) may display still images or I-pictures of each content as linked images until the user explicitly selects a linked image, or until a linked image approaches the center of the screen or the entire linked image is within the screen, or it may display a video such as a GIF animation using multiple still images or I-pictures, or it may receive only the base layer and decode and display the video.
[0494] When a linked image is selected by the user, the display device performs decoding, prioritizing the base layer. If the HTML of 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 can decode and display only forward-referenced pictures (I-pictures, P-pictures, and B-pictures that only use forward references), thereby reducing the delay between the decoding time and the display time of the first picture (the delay from the start of content decoding to the start of display). In addition, the display device may deliberately ignore the reference relationships of the pictures and roughly decode all B-pictures and P-pictures using forward references, performing normal decoding as time passes and more pictures are received.
[0495] [Autonomous driving] Furthermore, when transmitting and receiving still image or video data, such as 2D or 3D map information, for autonomous driving or driving assistance of a vehicle, the receiving terminal may receive metadata such as weather or construction information in addition to image data belonging to one or more layers, and decode these in association with each other. The metadata may belong to a layer, or it may simply be multiplexed with the image data.
[0496] In this case, since the vehicle, drone, or airplane containing the receiving terminal is moving, the receiving terminal can transmit its own location information, enabling seamless reception and decoding while switching between base stations ex106 to ex110. Furthermore, the receiving terminal can dynamically switch how much metadata is received or how much map information is updated, depending on the user's selection, the user's situation, and / or the state of the communication bandwidth.
[0497] The content delivery system ex100 allows the client to receive, decode, and play back encoded information transmitted by the user in real time.
[0498] [Distribution of personal content] Furthermore, the ex100 content delivery system allows for unicast or multicast distribution of not only high-definition, long-duration content from video distribution companies, but also low-definition, short-duration content from individuals. It is expected that the amount of such individual content will continue to increase. To improve the quality of individual content, the server may perform editing before encoding. This can be achieved, for example, using a configuration like the following.
[0499] During shooting, or after shooting, the server performs recognition processing such as detecting shooting errors, searching for scenes, analyzing semantics, and detecting objects from the original image data or encoded data in real time. Based on the recognition results, the server manually or automatically edits the images, correcting out-of-focus or shaky images, deleting less important scenes such as those with lower brightness or out of focus compared to other pictures, emphasizing object edges, and altering color tones. The server then encodes the edited data based on the editing results. It is also known that viewership decreases if the shooting time is too long, so the server may automatically clip scenes with little movement, as well as less important scenes, based on the image processing results, to ensure that the content falls within a specific time range according to 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 elements that infringe on copyright, moral rights, or portrait rights, and the scope of sharing may exceed the intended scope, which can be inconvenient for the individual. Therefore, for example, the server may intentionally change the image to one that is out of focus, such as the faces of people at the edges of the screen or the interior of a house, before encoding. Furthermore, the server may recognize whether the face of a person other than those previously registered is visible in the image to be encoded, and if so, it may apply a mosaic effect to the face. Alternatively, as a pre-processing or post-processing step before encoding, the user may specify a person or background area that they want to process from a copyright perspective. The server may replace the specified area with another image or blur the focus. In the case of a person, the server can track the person in a video and replace the image of the person's face.
[0501] Viewing personal content with small data volumes requires real-time processing. Depending on the bandwidth, the decoder prioritizes receiving, decoding, and playing the base layer first. During this time, the decoder receives the enhancement layer, and if playback is looped or if the content is played more than once, it may play the high-quality video including the enhancement layer. With a stream that uses this scalable encoding, the video may appear low-resolution when unselected or at the start of viewing, but the stream gradually becomes smoother and the image quality improves, providing a similar experience. Even without scalable encoding, a similar experience can be provided if the low-resolution stream played the first time and the second stream encoded by referencing the first video are configured as a single stream.
[0502] [Other examples of practical applications] Furthermore, these encoding or decoding processes are generally performed by the LSIex500 present in each terminal. The LSI (large scale integration circuitry) ex500 (see Figure 56) may be a single chip or a configuration consisting of multiple chips. Alternatively, video encoding or decoding software may be embedded in some recording medium (such as a CD-ROM, flexible disk, or hard disk) that can be read by a computer ex111, and the encoding or decoding process may be performed using that software. In addition, if the smartphone ex115 has a camera, video data acquired by that camera may be transmitted. In this case, the video data is data encoded by the LSIex500 present in the smartphone ex115.
[0503] The LSIex500 may also be configured to be activated by downloading application software. In this case, the terminal first determines whether it supports the content encoding method or whether it has the capability to perform the specific service. If the terminal does not support the content encoding method or does not have the capability to perform the specific service, the terminal downloads the codec or application software, and then acquires and plays the content.
[0504] Furthermore, not only the content supply system ex100 via the Internet ex101, but also digital broadcasting systems can incorporate at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) of each of the above embodiments. While the content supply system ex100 has a configuration that is more suited to multicast than unicast, as it transmits and receives multiplexed data with video and sound multiplexed onto broadcast radio waves using satellites, etc., the encoding and decoding processes are similar and can be applied in the same way.
[0505] [Hardware configuration] Figure 61 shows further details of the smartphone ex115 shown in Figure 56. Figure 62 shows an example configuration of the smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves with the base station ex110, a camera unit ex465 capable of taking video and still images, and a display unit ex458 that displays video captured by the camera unit ex465 and data decoded from video received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466, such as a touch panel, an audio output unit ex457, such as a speaker for outputting 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 audio, received video or still images, encoded data such as emails, or decoded data, and a slot unit ex464, which is an interface unit with SIM ex468 for identifying the user and authenticating access to various data, including the network. External memory may be used instead of the memory unit ex467.
[0506] The main control unit ex460, which comprehensively controls the display unit ex458 and the operation unit ex466, is connected to the power supply circuit unit ex461, the operation input control unit ex462, the video signal processing unit ex455, the camera interface unit ex463, the display control unit ex459, the modulation / demodulation unit ex452, the multiplexing / decompression unit ex453, the audio signal processing unit ex454, the slot unit ex464, and the memory unit ex467 via the synchronization bus ex470.
[0507] The power supply circuit unit ex461, when the power key is turned on by the user, starts up the smartphone ex115 into an operational state and supplies power to each component from the battery pack.
[0508] The smartphone ex115 performs tasks such as voice calls and data communication based on the control of the main control unit ex460, which has a CPU, ROM, RAM, etc. During a call, the voice signal picked up by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454, spread spectrum processing is performed by the modulation / demodulation unit ex452, digital-to-analog conversion and frequency conversion processing are performed by the transmission / reception unit ex451, and the resulting signal is transmitted via the antenna ex450. Received data is amplified, frequency conversion and analog-to-digital conversion are performed, despread spectrum processing is performed by the modulation / demodulation unit ex452, and after being converted into an analog voice signal by the voice signal processing unit ex454, it is output from the voice output unit ex457. In data communication mode, text, still images, or video data are sent to the main control unit ex460 via the 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 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 video encoding method shown in each embodiment above, and sends the encoded video data to the multiplexing / decoding unit ex453. The audio signal processing unit ex454 encodes the audio signal picked up 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 / decoding unit ex453. The multiplexing / decoding unit ex453 multiplexes the encoded video data and encoded audio data in a predetermined manner, performs modulation and conversion processing in the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, and transmits the data via the antenna ex450.
[0509] When receiving video attached to an email or chat, or video linked to a webpage, etc., the multiplexing / decomposition unit ex453 separates the multiplexed data received via antenna ex450, dividing it into a video data bitstream and an audio data bitstream. It then 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 shown in each of the above embodiments, and the video or still image contained in the linked video file is displayed from the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal, and the audio is output from the audio output unit ex457. As real-time streaming is becoming increasingly widespread, audio playback may be socially inappropriate depending on the user's situation. Therefore, as an initial setting, it is preferable to play only the video data without playing the audio signal, and to synchronize the audio playback only when the user performs an action such as clicking on the video data.
[0510] While the smartphone ex115 was used as an example here, there are three other possible implementations for terminals: a transceiver-type terminal with both an encoder and a decoder, a transmitting terminal with only an encoder, and a receiving terminal with only a decoder. In the explanation for digital broadcasting systems, multiplexed data, in which audio data is multiplexed with video data, is received or transmitted. However, the multiplexed data may also contain text data related to the video in addition to audio data. Furthermore, the video data itself may be received or transmitted instead of multiplexed data.
[0511] Although it was explained that the main control unit ex460, including the CPU, controls the encoding or decoding process, various terminals often have a GPU. Therefore, a configuration that leverages the GPU's performance to process a wide area at once using memory shared by the CPU and GPU, or memory whose addresses are managed so that it can be used in common, is also possible. This can shorten the encoding time, ensure real-time performance, and achieve low latency. In particular, it is efficient to perform motion detection, deblocking filters, SAO (Sample Adaptive Offset), and transformation / quantization processes at once on the GPU, rather than on the CPU, in units such as pictures. [Industrial applicability]
[0512] This disclosure can be used, for example, in television receivers, digital video recorders, car navigation systems, mobile phones, digital cameras, digital video cameras, video conferencing systems, or electronic mirrors. [Explanation of Symbols]
[0513] 100 Encoding device 102 Division 104 Subtraction Unit 106 Conversion Unit 108 Quantization section 110 Entropy coding unit 112, 204 Inverse quantization section 114, 206 Inverse Transform Section 116, 208 Addition section 118, 210 block memory 120, 212 Loop filter section 122,214 frame memory 124, 216 Intra Prediction Unit 126, 218 Interpretation Unit 128, 220 Prediction Control Unit 200 Decoders 202 Entropy Decoder 1201 Boundary determination section 1202, 1204, 1206 switches 1203 Filter determination unit 1205 Filter Processing Unit 1207 Filter Characterization Unit 1208 Processing determination unit a1, b1 processors a2, b2 memory
Claims
1. Circuits and, Equipped with memory, The circuit uses the memory, Apply the first transformation to the residual signal of the current block, The result of the first transformation is then subjected to a second transformation, which is a non-separable transformation. (i) If the size of the current block is the first block size, the second transformation is applied to the first subblock having the first subblock size in the current block using the second transformation method selected from the first candidate group. (ii) If the size of the current block is a second block size different from the first block size, the second transformation is applied to the second subblock having the first subblock size in the current block using the transformation method of the second transformation selected from the second candidate group. The first candidate group includes a first transformation method that generates a first number of transformation coefficients using a first transformation matrix, The second group of candidates includes a second transformation method that generates a second number of transformation coefficients using the first transformation matrix, The first number is smaller than the second number. Encoding device.
2. Circuits and, Equipped with memory, The circuit uses the memory, The second transformation coefficient is generated by applying the second transformation, which is a non-separable transformation, to the first transformation coefficient of the current block. The first transformation is applied to the second transformation coefficient to generate a residual signal. (i) If the size of the current block is a first block size, the second transformation is applied to the first transformation coefficient of the first number using the transformation method of the second transformation selected from the first candidate group. (ii) If the size of the current block is a second block size different from the first block size, the second transformation is applied to the first transformation coefficient of the second number using the transformation method of the second transformation selected from the second candidate group. The first candidate group includes a first transformation method that uses a first transformation matrix to generate a first subblock of the second transformation coefficient having a first subblock size, The second candidate group includes a second transformation method that uses the first transformation matrix to generate a second subblock of the second transformation coefficient having the first subblock size, The first number is smaller than the second number. Decoding device.