Image encoding device, encoding method, image decoding device, decoding method, bitstream transmission device, and bitstream transmission method

The encoding apparatus optimizes block partitioning by dividing blocks into subblocks using specific partition modes, addressing inefficiencies in conventional methods to enhance video compression efficiency.

JP7863666B2Active Publication Date: 2026-05-21PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
Filing Date
2025-09-01
Publication Date
2026-05-21

AI Technical Summary

Technical Problem

Conventional image and video encoding methods face inefficiencies in compression due to increased overhead in signaling block partitioning information, particularly as the split depth increases, leading to reduced video compression efficiency.

Method used

An encoding apparatus that divides blocks into subblocks using specific partition modes, optimizing the division process to reduce unnecessary signaling and improve compression efficiency by selecting appropriate subblock sizes and directions based on parameters.

Benefits of technology

Enhances compression efficiency by minimizing unnecessary signaling overhead in block partitioning, thereby improving the overall video encoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007863666000003
    Figure 0007863666000003
  • Figure 0007863666000004
    Figure 0007863666000004
  • Figure 0007863666000005
    Figure 0007863666000005
Patent Text Reader

Abstract

To provide an image encoding device capable of improving compression efficiency in coding block division information.SOLUTION: An image encoding device is configured to acquire a block from a coding tree unit (CTU), divide the block into multiple subblocks in a first direction by using a first partition mode, and encode the multiple subblocks, and in the block division using the first partition mode, on the basis of partition mode parameters written to the bitstream, when the size of a block is Nx2N pixels, the first direction is along 2N pixels, and N is an integer, select block division into multiple subblocks including at least one subblock of N / 4x2N pixel size, and not select block division into two subblocks of N / 4x2N pixel size.SELECTED DRAWING: Figure 15
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a method and an apparatus for encoding and decoding video and images using block partitioning.

Background Art

[0002] In conventional image and video encoding methods, an image is generally divided into blocks, and encoding and decoding processes are performed at the block level. In recent video standard development, encoding and decoding processes can be performed with various block sizes in addition to typical 8x8 or 16x16 sizes. A range of sizes from 4x4 to 256x256 can be used for encoding and decoding an image.

Prior Art Documents

Non-Patent Documents

[0003]

Non-Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] In order to represent a range of sizes from 4x4 to 256x256, block partitioning information such as block partition modes (e.g., quadtree, binary tree, and ternary tree) and partition flags (e.g., split flag) is determined and signaled for a block. The overhead of that signaling increases as the split depth increases. And the increased overhead reduces the video compression efficiency.

[0005] Therefore, an encoding apparatus according to an aspect of the present disclosure provides an encoding apparatus and the like that can improve compression efficiency in encoding block partitioning information.

Means for Solving the Problems

[0006] An image encoding apparatus according to one aspect of the present disclosure comprises a memory coupled to the circuit, wherein the circuit, in operation, acquires a block from an encoding tree unit (CTU), divides the block into a plurality of subblocks in a first direction using a first partition mode, encodes the plurality of subblocks, and in the division of the block using the first partition mode, based on parameters relating to the partition mode to be written to the bitstream, if the size of the block is Nx2N pixels, the first direction is along 2N pixels, and N is an integer, it selects to divide the block into a plurality of subblocks including at least one subblock of size N / 4x2N pixels, and If the division of the block into two subblocks is not selected, the first partition mode includes dividing the block into two subblocks of size N / 4x2N pixels and one subblock of size N / 2x2N pixels, where the size of the block is 2NxN pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size 2NxN / 4 pixels is selected, and the division of the block into two subblocks of size 2NxN / 2 pixels is not selected, the first partition mode includes dividing the block into two subblocks of size 2NxN / 4 pixels and one subblock of size 2NxN / 2 pixels.

[0007] These comprehensive or specific embodiments may be implemented as a system, method, integrated circuit, computer program, or recording medium such as a computer-readable CD-ROM, or as any combination of a system, method, integrated circuit, computer program, and recording medium. [Effects of the Invention]

[0008] According to this disclosure, it is possible to improve the compression efficiency in encoding block partitioning information. [Brief explanation of the drawing]

[0009] [Figure 1] Figure 1 is a block diagram showing the functional configuration of the encoding device according to Embodiment 1. [Figure 2] Figure 2 shows an example of block division in Embodiment 1. [Figure 3] Figure 3 is a table showing the transformation basis functions corresponding to each transformation type. [Figure 4A] Figure 4A shows an example of the filter shape used in ALF. [Figure 4B] Figure 4B shows another example of the filter shape used in ALF. [Figure 4C] Figure 4C shows another example of the filter shape used in ALF. [Figure 5A] Figure 5A shows the 67 intra-prediction modes in intra-prediction. [Figure 5B] Figure 5B is a flowchart illustrating the overview of the predictive image correction process using OBMC processing. [Figure 5C] Figure 5C is a conceptual diagram illustrating the overview of the predictive image correction process using OBMC processing. [Figure 5D] Figure 5D shows an example of FRUC. [Figure 6] Figure 6 illustrates pattern matching (bilateral matching) between two blocks along a motion trajectory. [Figure 7] Figure 7 illustrates pattern matching (template matching) between a template in the current picture and a block in the referenced picture. [Figure 8] Figure 8 is a diagram illustrating a model that assumes uniform linear motion. [Figure 9A] Figure 9A is a diagram illustrating the derivation of subblock-level motion vectors based on the motion vectors of multiple adjacent blocks. [Figure 9B] Figure 9B is a diagram illustrating the overview of the motion vector derivation process using merge mode. [Figure 9C] FIG. 9C is a conceptual diagram for explaining the outline of the DMVR process. [Figure 9D] FIG. 9D is a diagram for explaining the outline of a predicted image generation method using a luminance correction process by the LIC process. [Figure 10] FIG. 10 is a block diagram showing the functional configuration of the decoding device according to Embodiment 1. [Figure 11] FIG. 11 is a flowchart showing the video encoding process according to Embodiment 2. [Figure 12] FIG. 12 is a flowchart showing the video decoding process according to Embodiment 2. [Figure 13] FIG. 13 is a flowchart showing the video encoding process according to Embodiment 3. [[ID=1#17]] [Figure 14] FIG. 14 is a flowchart showing the video decoding process according to Embodiment 3. [Figure 15] FIG. 15 is a block diagram showing the structure of the video / image encoding device according to Embodiment 2 or 3. [Figure 16] FIG. 16 is a block diagram showing the structure of the video / image decoding device according to Embodiment 2 or 3. [Figure 17] FIG. 17 is a diagram showing an example of a possible position of the first parameter in the compressed video stream in Embodiment 2 or 3. [Figure 18] FIG. 18 is a diagram showing an example of a possible position of the second parameter in the compressed video stream in Embodiment 2 or 3. [Figure 19] [[ID=3#4]]FIG. 19 is a diagram showing an example of the second parameter following the first parameter in Embodiment 2 or 3. [Figure 20] FIG. 20 is a diagram showing an example in Embodiment 2 where the second partition mode is not selected for the division of a 2NxN pixel block as shown in step (2c). [Figure 21] FIG. 21 is a diagram showing an example in Embodiment 2 where the second partition mode is not selected for the division of an Nx2N pixel block as shown in step (2c). [Figure 22] Figure 22 shows an example in Embodiment 2 where the second partition mode is not selected for dividing an NxN pixel block, as shown in step (2c). [Figure 23] Figure 23 shows an example in Embodiment 2 where the second partition mode is not selected for dividing the NxN pixel block, as shown in step (2c). [Figure 24] Figure 24 shows an example in Embodiment 2 where, as shown in step (3), a 2NxN pixel block is divided using the selected partition mode when the second partition mode is not selected. [Figure 25] Figure 25 shows an example in Embodiment 2 where, as shown in step (3), a block of Nx2N pixels is divided using the selected partition mode when the second partition mode is not selected. [Figure 26] Figure 26 shows an example in Embodiment 2 where, as shown in step (3), a block of NxN pixels is divided using the selected partition mode when the second partition mode is not selected. [Figure 27] Figure 27 shows an example in Embodiment 2 where, as shown in step (3), a block of NxN pixels is divided using the selected partition mode when the second partition mode is not selected. [Figure 28] Figure 28 shows examples of partition modes for dividing an NxN pixel block in Embodiment 2. (a) to (h) show different partition modes. [Figure 29]Figure 29 shows an example of partition types and partition directions for dividing an NxN pixel block in Embodiment 3. (1), (2), (3), and (4) are different partition types, (1a), (2a), (3a), and (4a) are partition modes in which the partition type differs in the vertical partition direction, and (1b), (2b), (3b), and (4b) are partition modes in which the partition type differs in the horizontal partition direction. [Figure 30] Figure 30 shows the advantages of encoding the partition type before the partition direction in Embodiment 3, compared to encoding the partition direction before the partition type. [Figure 31A] Figure 31A shows an example of dividing a block into subblocks using a partition mode set with fewer bins in partition mode encoding. [Figure 31B] Figure 31B shows an example of dividing a block into subblocks using a partition mode set with fewer bins in partition mode encoding. [Figure 32A] Figure 32A shows an example of dividing a block into subblocks using the first partition mode set that appears in a predetermined order of multiple partition mode sets. [Figure 32B] Figure 32B shows an example of dividing a block into subblocks using the first partition mode set that appears in a predetermined order of multiple partition mode sets. [Figure 32C] Figure 32C shows an example of dividing a block into subblocks using the first partition mode set that appears in a predetermined order of multiple partition mode sets. [Figure 33] Figure 33 is an overall diagram of the content supply system that enables the content distribution service. [Figure 34] Figure 34 shows an example of an encoding structure during scalable encoding. [Figure 35] Figure 35 shows an example of an encoding structure during scalable encoding. [Figure 36] Figure 36 shows an example of how a web page is displayed. [Figure 37] Figure 37 shows an example of how a web page is displayed. [Figure 38] Figure 38 shows an example of a smartphone. [Figure 39] Figure 39 is a block diagram showing an example of a smartphone configuration. [Modes for carrying out the invention]

[0010] The embodiments will be described in detail below with reference to the drawings.

[0011] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, arrangement and connection configurations of components, steps, and the order of steps shown in the following embodiments are examples only and are not intended to limit the scope of the claims. Furthermore, among the components in the following embodiments, those not described in the independent claim representing the highest-level concept will be described as optional components.

[0012] (Embodiment 1) First, an overview of Embodiment 1 will be given as an example of an encoding and decoding device to which the processes and / or configurations described in each aspect of this disclosure, described later, can be applied. However, Embodiment 1 is merely an example of an encoding and decoding device to which the processes and / or configurations described in each aspect of this disclosure can be applied, and the processes and / or configurations described in each aspect of this disclosure can also be implemented in encoding and decoding devices different from Embodiment 1.

[0013] When applying the processes and / or configurations described in each aspect of this disclosure to Embodiment 1, for example, one of the following may be performed:

[0014] (1) With respect to the encoding or decoding device of Embodiment 1, replace the component corresponding to the component described in each aspect of the disclosure with the component described in each aspect of the disclosure, among the plurality of components constituting the encoding or decoding device. (2) With respect to the encoding or decoding device of Embodiment 1, any modifications such as adding, replacing, or deleting functions or processes performed by some of the multiple components constituting the encoding or decoding device are made, and then the components corresponding to the components described in each aspect of the Disclosure are replaced with the components described in each aspect of the Disclosure. (3) Adding processing to and / or replacing, deleting, or otherwise modifying some of the processing included in the method performed by the encoding or decoding device of Embodiment 1, and then replacing the processing corresponding to the processing described in each aspect of the Disclosure with the processing described in each aspect of the Disclosure. (4) Combining some of the multiple components constituting the encoding or decoding device of Embodiment 1 with a component described in each aspect of the Disclosure, a component that has some of the functions of the component described in each aspect of the Disclosure, or a component that performs some of the processing performed by the component described in each aspect of the Disclosure. (5) A component that has some of the functions of some of the components constituting the encoding or decoding device of Embodiment 1, or a component that performs some of the processing performed by some of the components constituting the encoding or decoding device of Embodiment 1, in combination with a component described in each aspect of this disclosure, a component that has some of the functions of the components described in each aspect of this disclosure, or a component that performs some of the processing performed by the components described in each aspect of this disclosure. (6) With respect to the method performed by the encoding or decoding device of Embodiment 1, replace with the process corresponding to the process described in each aspect of the Disclosure among the multiple processes included in the method with the process described in each aspect of the Disclosure. (7) Performing some of the processes included in the method performed by the encoding or decoding device of Embodiment 1 in combination with the processes described in each aspect of the present disclosure.

[0015] The methods of implementing the processes and / or configurations described in each aspect of this disclosure are not limited to the examples above. For example, they may be implemented in a device used for a purpose other than the video / image encoding device or video / image decoding device disclosed in Embodiment 1, or the processes and / or configurations described in each embodiment may be implemented individually. Furthermore, the processes and / or configurations described in different embodiments may be implemented in combination.

[0016] [Overview of the coding device] First, an overview of the encoding device according to Embodiment 1 will be described. Figure 1 is a block diagram showing the functional configuration of the encoding device 100 according to Embodiment 1. The encoding device 100 is a video / image encoding device that encodes video / images in block units.

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

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

[0019] The following describes each component included in the encoding device 100.

[0020] [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, based on recursive quadtree and / or binary tree block partitioning, the splitting unit 102 divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 or less). These variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transformation units (TUs). In this embodiment, CUs, PUs, and TUs do not need to be distinguished, and some or all of the blocks in the picture may become processing units for CUs, PUs, and TUs.

[0021] Figure 2 shows an example of block partitioning in Embodiment 1. In Figure 2, solid lines represent block boundaries due to quadtree block partitioning, and dashed lines represent block boundaries due to binary tree block partitioning.

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

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

[0024] The 64x64 block in the upper right is horizontally divided into two rectangular 64x32 blocks, 14 and 15 (binary tree block division).

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

[0026] The 64x64 block 23 in the bottom right will not be divided.

[0027] As described above, in Figure 2, 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.

[0028] In Figure 2, one block was divided into four or two blocks (quadrutree or binary tree block partitioning), but the 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.

[0029] [Subtraction Unit] The subtraction unit 104 subtracts the predicted signal (predicted sample) from the original signal (original sample) in block units divided by the division unit 102. In other words, the subtraction unit 104 calculates the prediction error (also called the residual) of the block to be encoded (hereinafter referred to as the current block). The subtraction unit 104 then outputs the calculated prediction error to the conversion unit 106.

[0030] 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 moving image (for example, a luminance (luma) signal and two chroma (chroma) signals). In the following, the signal representing the image may also be called a sample.

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

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

[0033] Multiple transformation types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Figure 3 is a table showing the transformation basis functions corresponding to each transformation type. In Figure 3, 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.

[0034] Information indicating whether or not to apply such EMT or AMT (e.g., called an AMT flag) and information indicating the selected conversion type are 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).

[0035] 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 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, or CTU level).

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

[0037] 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 a transformation on that array using a 16x16 transformation matrix.

[0038] Similarly, the Hypercube Givens Transform, which treats a 4x4 input block as a single array with 16 elements and then performs multiple Givens rotations on that array, is another example of a non-separable transformation.

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

[0040] The predetermined order is the order for quantization / inverse quantization of the transformation coefficients. For example, the predetermined scanning order is defined as ascending frequency (from low frequency to high frequency) or descending frequency (from high frequency to low frequency).

[0041] Quantization parameters are parameters that define 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.

[0042] [Entropy coding unit] The entropy coding unit 110 generates an encoded signal (encoded bitstream) by variable-length encoding the quantization coefficients, which are input from the quantization unit 108. Specifically, the entropy coding unit 110, for example, binarizes the quantization coefficients and arithmetically encodes the binary signal.

[0043] [Dequantization section] The inverse quantization unit 112 inversely quantizes the quantization coefficients, which are 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.

[0044] [Inverse Transformation Section] The inverse transform unit 114 restores the prediction error by inversely transforming the transformation coefficients, which are 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 that corresponds to the transformation by the transformation unit 106. The inverse transform unit 114 then outputs the restored prediction error to the summation unit 116.

[0045] Furthermore, the recovered prediction error does not match the prediction error calculated by the subtraction unit 104 because information is lost due to quantization. In other words, the recovered prediction error includes quantization errors.

[0046] [Addition section] The adder 116 reconstructs the current block by adding the prediction error, which is the input from the inverse transformer 114, and the prediction sample, which is the 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.

[0047] [Block memory] The block memory 118 is a storage unit for storing blocks within the picture to be encoded (hereinafter referred to as the current picture) that are referenced in intra prediction. Specifically, the block memory 118 stores the reconstructed blocks output from the adder 116.

[0048] [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), sample adaptive offset (SAO), and adaptive loop filter (ALF).

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

[0050] 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 (e.g., 15 or 25 classes).

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

[0052] Based on the results of this classification, a filter for the subblock is determined from among multiple filters.

[0053] For example, a circularly symmetric shape is used as the filter shape in ALF. Figures 4A to 4C show several examples of filter shapes used in ALF. Figure 4A shows a 5x5 diamond-shaped filter, Figure 4B shows a 7x7 diamond-shaped filter, and Figure 4C shows a 9x9 diamond-shaped filter. Information indicating the filter shape is 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).

[0054] The on / off status of ALF is determined, for example, at the picture level or CU level. For instance, the decision to apply ALF to luminance is made at the CU level, and the decision to apply ALF to color difference is made at the picture level. Information indicating whether ALF is on or off is 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).

[0055] The coefficient sets of multiple selectable filters (e.g., up to 15 or 25 filters) are signaled at the picture level. However, the 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).

[0056] [Frame memory] The frame memory 122 is a storage unit for storing reference pictures used 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.

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

[0058] 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 includes one or more non-directional prediction modes and multiple directional prediction modes.

[0059] 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 (High-Efficiency Video Coding) standard (Non-Patent Document 1).

[0060] Multiple directional prediction modes include, for example, the 33 directional prediction modes defined in the H.265 / HEVC standard. Note that multiple directional prediction modes may also include 32 additional directional prediction modes (a total of 65 directional prediction modes). Figure 5A shows 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.

[0061] Furthermore, in the intra-prediction of a color difference block, a luminance block may be referenced. That is, the color difference component of the current block may be predicted based on the luminance component of the current block. Such intra-prediction is sometimes called CCLM (cross-component linear model) prediction. Such an intra-prediction mode for a color difference block that references a luminance block (e.g., called the CCLM mode) may be added as one of the intra-prediction modes for a color difference block.

[0062] 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 signaled at, for example, the CU level. Note that the signaling of this information is not limited to the CU level, but may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).

[0063] [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 sub-blocks within the current block (e.g., 4x4 blocks). For example, the inter-prediction unit 126 performs motion estimation within the reference picture for the current block or sub-block. Then, the inter-prediction unit 126 generates an inter-prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., motion vectors) obtained from the motion estimation. Finally, the inter-prediction unit 126 outputs the generated inter-prediction signal to the prediction control unit 128.

[0064] The motion information used for motion compensation is converted into a signal. A motion vector predictor may be used to convert the motion vector into a signal. In other words, the difference between the motion vector and the predicted motion vector may be converted into a signal.

[0065] Furthermore, an inter-prediction signal 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, an inter-prediction signal may be generated for each sub-block within the current block by weighted addition of a prediction signal based on motion information obtained through motion search and a prediction signal based on the motion information of adjacent blocks. Such inter-prediction (motion compensation) is sometimes called OBMC (overlapped block motion compensation).

[0066] In this OBMC mode, information indicating the size of the subblock for OBMC (e.g., called the OBMC block size) is signaled at the sequence level. Information indicating whether or not to apply OBMC mode (e.g., called the OBMC flag) is signaled at the CU level. Note that the signaling levels for this information are not limited to the sequence and CU levels; other levels (e.g., picture level, slice level, tile level, CTU level, or subblock level) may also be used.

[0067] Let's explain the OBMC mode in more detail. Figures 5B and 5C are flowcharts and conceptual diagrams illustrating the overview of the predictive image correction process using OBMC processing.

[0068] First, a predicted image (Pred) is obtained using normal motion compensation with the motion vector (MV) assigned to the block to be encoded.

[0069] Next, the motion vector (MV_L) of the encoded left adjacent block is applied to the block to be encoded to obtain a predicted image (Pred_L), and the first correction of the predicted image is performed by superimposing the predicted image and Pred_L with weights.

[0070] Similarly, the motion vector (MV_U) of the encoded upper adjacent block is applied to the block to be encoded to obtain a predicted image (Pred_U). The predicted image is then corrected a second time by weighting the first corrected predicted image and Pred_U, and this is used as the final predicted image.

[0071] While this explanation describes a two-stage correction method using the left adjacent block and the upper adjacent block, it is also possible to use the right adjacent block and the lower adjacent block to perform corrections more than two times.

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

[0073] Although this explanation describes the predictive image correction process using a single reference picture, the process is similar when correcting predictive images from multiple reference pictures. After obtaining corrected predictive images from each reference picture, the resulting predictive images are superimposed to create the final predictive image.

[0074] The processing target block may be a prediction block unit, or it may be a sub-block unit obtained by further dividing the prediction block.

[0075] One method for determining whether or not to apply OBMC processing is to use an obmc_flag signal, which indicates whether or not to apply OBMC processing. Specifically, in an encoding device, it is determined whether or not the block to be encoded belongs to a region with complex motion. If it belongs to a region with complex motion, the obmc_flag is set to a value of 1 and OBMC processing is applied to perform encoding. If it does not belong to a region with complex motion, the obmc_flag is set to a value of 0 and encoding is performed without applying OBMC processing. On the other hand, in a decoding device, the obmc_flag written in the stream is decoded, and the device switches whether or not to apply OBMC processing depending on its value and performs decoding.

[0076] Furthermore, motion information may be derived by the decoder without being converted into a signal. For example, the merge mode specified in the H.265 / HEVC standard may be used. Alternatively, motion information may be derived by performing a motion search on the decoder side. In this case, the motion search is performed without using the pixel values ​​of the current block.

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

[0078] An example of FRUC processing is shown in Figure 5D. First, a list of multiple candidates (which may be the same as the merge list) is generated, each having a predicted motion vector, by referencing the motion vectors of spatially or temporally adjacent encoded blocks to the current block. Next, the best candidate MV is selected from among the multiple candidate MVs registered in the candidate list. For example, an evaluation value is calculated for each candidate included in the candidate list, and one candidate is selected based on the evaluation value.

[0079] Then, based on the motion vectors of the selected candidates, a motion vector for the current block is derived. 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. That is, a similar search is performed in the area surrounding the best candidate MV, and if an MV with a better evaluation value is found, the best candidate MV may be updated to this MV and used as the final MV for the current block. It is also possible to configure the system so that this process is not performed.

[0080] The same processing method can be used when processing at the sub-block level.

[0081] The evaluation value is calculated by determining the difference value of the reconstructed image through pattern matching between a region in the reference picture corresponding to the motion vector and a predetermined region. Alternatively, the evaluation value may be calculated using other information in addition to the difference value.

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

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

[0084] Figure 6 illustrates an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. As shown in Figure 6, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the best-matching pair of two blocks within 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.

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

[0086] In the second pattern 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.

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

[0088] Information indicating whether or not to apply such a FRUC mode (e.g., called the FRUC flag) is signaled at the CU level. Furthermore, if the FRUC mode is applied (e.g., the FRUC flag is true), information indicating the pattern matching method (first pattern matching or second pattern matching) (e.g., called the FRUC mode flag) is signaled at the CU level. Note that the signaling of this information is not limited to the CU level; it may be at other levels (e.g., sequence level, picture level, slice level, tile level, CTU level, or subblock level).

[0089] Here, we will explain the mode for deriving motion vectors based on a model that assumes uniform linear motion. This mode is called BIO (bi-directional optical). This is sometimes called flow mode.

[0090] Figure 8 is a diagram illustrating a model assuming uniform linear motion. In Figure 8, (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.

[0091] 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 (1) holds.

[0092]

number

[0093] 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., are corrected on a pixel-by-pixel basis.

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

[0095] Here, we will describe a 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.

[0096] Figure 9A illustrates the derivation of subblock-level motion vectors based on the motion vectors of multiple adjacent blocks. In Figure 9A, 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 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, using the two motion vectors v0 and v1, the motion vector (vx, vy) of each subblock within the current block is derived by equation (2) below.

[0097]

number

[0098] Here, x and y represent the horizontal and vertical positions of the subblock, respectively, and w represents a predetermined weighting coefficient.

[0099] Such affine motion compensation prediction modes may include several modes in which the motion vectors of the upper-left and upper-right corner control points are derived. Information indicating such affine motion compensation prediction modes (e.g., called affine flags) is signaled at the CU level. Note that the signaling of this information indicating affine motion compensation prediction 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).

[0100] [Prediction Control Unit] The prediction control unit 128 selects either the intra-prediction signal or the inter-prediction signal and outputs the selected signal as the prediction signal to the subtraction unit 104 and the addition unit 116.

[0101] Here, we will explain an example of deriving the motion vector of a picture to be encoded using merge mode. Figure 9B is a diagram illustrating the overview of the motion vector derivation process using merge mode.

[0102] 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 block to be encoded; temporally adjacent predicted MVs, which are the MVs of nearby blocks projected onto the location of the block to be encoded 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.

[0103] 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 block to be encoded.

[0104] Furthermore, the variable-length coding unit encodes the merge_idx signal, which indicates which predicted MV was selected, by writing it to a stream.

[0105] Note that the predicted MVs registered in the predicted MV list explained in Figure 9B are just an example, 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.

[0106] Alternatively, the final MV may be determined by performing the DMVR process described later using the MV of the target block to be encoded derived by merge mode.

[0107] Here, we will explain an example of determining the MV using DMVR processing.

[0108] Figure 9C is a conceptual diagram illustrating the overview of DMVR processing.

[0109] First, the optimal MVP set for the block to be processed is used as a candidate MV. According to the candidate MV, reference pixels are obtained from the first reference picture, which is a processed picture in the L0 direction, and the second reference picture, which is a processed picture in the L1 direction, and a template is generated by taking the average of each reference pixel.

[0110] Next, using the template, the surrounding regions of candidate MVs for the first and second reference pictures are searched, and the MV with the lowest cost is determined as the final MV. The cost value is calculated using the difference between each pixel value of the template and each pixel value of the search region, as well as the MV value, etc.

[0111] Note that the general outline of the processing described here is basically the same for both the encoding and decoding devices.

[0112] Note that any process that can explore the vicinity of a candidate MV and derive the final MV may be used instead of the exact process described here.

[0113] Here, we will explain the mode for generating predictive images using LIC processing.

[0114] Figure 9D is a diagram illustrating the outline of a predictive image generation method using luminance correction processing by LIC processing.

[0115] First, we derive a Music Model (MV) to obtain the reference image corresponding to the block to be encoded from the reference picture, which is an encoded picture.

[0116] Next, for the block to be encoded, information indicating how the luminance values ​​have changed between the reference picture and the picture to be encoded is extracted using the luminance pixel values ​​of the left-adjacent and top-adjacent encoded surrounding reference regions, and the luminance pixel values ​​at the equivalent positions in the reference picture specified by MV, and a luminance correction parameter is calculated.

[0117] By performing brightness correction processing on the reference image within the reference picture specified in MV using the brightness correction parameter, a predicted image for the encoding target block is generated.

[0118] Note that the shape of the surrounding reference region in Figure 9D is just one example, and other shapes may be used.

[0119] Furthermore, while 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. In this case, the same brightness correction process is applied to each reference image obtained from the respective reference picture before generating the predicted image.

[0120] 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. Specifically, in an encoding device, it is determined whether or not the block to be encoded 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 is decoded, and the device switches whether or not to apply LIC processing according to its value and performs decoding.

[0121] Another way to determine whether to apply LIC processing is, for example, by checking whether LIC processing has been applied to surrounding blocks. A specific example is that if the block to be encoded is in merge mode, during the MV derivation in merge mode processing, it is determined whether the surrounding encoded blocks selected were encoded with LIC processing. Based on this result, the application of LIC processing is switched, and encoding is performed accordingly. In this example, the decoding process is exactly the same.

[0122] [Overview of the decryption device] Next, an overview of a decoding device capable of decoding the encoded signal (encoded bitstream) output from the above-mentioned encoding device 100 will be described. Figure 10 is a block diagram showing the functional configuration of the decoding device 200 according to Embodiment 1. The decoding device 200 is a video / image decoding device that decodes video / images in block units.

[0123] As shown in Figure 10, 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.

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

[0125] The following describes each component included in the decoding device 200.

[0126] [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. As a result, the entropy decoding unit 202 outputs the quantization coefficients in block units to the inverse quantization unit 204.

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

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

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

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

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

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

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

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

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

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

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

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

[0139] [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, and outputs the inter-prediction signal to the prediction control unit 220.

[0140] Furthermore, if the information decoded from the encoded bitstream indicates that 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.

[0141] 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 using the derived motion information.

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

[0143] [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 adder 208.

[0144] (Embodiment 2) The encoding and decoding processes according to Embodiment 2 will be described in detail with reference to Figures 11 and 12, and the encoding and decoding devices according to Embodiment 2 will be described in detail with reference to Figures 15 and 16.

[0145] [Encoding process] Figure 11 shows the video encoding process according to Embodiment 2.

[0146] First, in step S1001, a first parameter is written to the bitstream that identifies a partition mode from among several partition modes for dividing the first block into multiple subblocks. If a partition mode is used, the block is divided into multiple subblocks. If a different partition mode is used, the block is divided into multiple subblocks of different shapes, different heights, or different widths.

[0147] Figure 28 shows examples of partition modes for dividing an NxN pixel block in Embodiment 2. In Figure 28, (a) to (h) represent different partition modes. As shown in Figure 28, using partition mode (a), an NxN pixel block (e.g., 16x16 pixels, where "N" can be any integer multiple of 4 from 8 to 128) is divided into two N / 2xN pixel subblocks (e.g., 8x16 pixels). Using partition mode (b), an NxN pixel block is divided into an N / 4xN pixel subblock (e.g., 4x16 pixels) and a 3N / 4xN pixel subblock (e.g., 12x16 pixels). Using partition mode (c), an NxN pixel block is divided into a 3N / 4xN pixel subblock (e.g., 12x16 pixels) and an N / 4xN pixel subblock (e.g., 4x16 pixels). Using partition mode (d), an NxN pixel block is divided into (N / 4)xN pixel (e.g., 4x16 pixels) subblocks, N / 2xN pixel (e.g., 8x16 pixels) subblocks, and N / 4xN pixel (e.g., 4x16 pixels) subblocks. Using partition mode (e), an NxN pixel block is divided into two NxN / 2 pixel (e.g., 16x8 pixels) subblocks. Using partition mode (f), an NxN pixel block is divided into an NxN / 4 pixel (e.g., 16x4 pixels) subblock and an Nx3N / 4 pixel (e.g., 16x12 pixels) subblock. Using partition mode (g), an NxN pixel block is divided into an Nx3N / 4 pixel (e.g., 16x12 pixels) subblock and an NxN / 4 pixel (e.g., 16x4 pixels) subblock. Using partition mode (h), an NxN pixel block is divided into NxN / 4 pixel (e.g., 16x4 pixel) subblocks, NxN / 2 pixel (e.g., 16x8 pixel) subblocks, and NxN / 4 pixel (e.g., 16x4 pixel) subblocks.

[0148] Next, in step S1002, it is determined whether the first parameter identifies the first partition mode.

[0149] Next, in step S1003, based on the determination of whether or not the first parameter identifies the first partition mode, it is determined whether or not to select the second partition mode as a candidate for dividing the second block.

[0150] Two different partition mode sets may divide a block into subblocks of the same shape and size. For example, as shown in Figure 31A, the subblocks (1b) and (2c) have the same shape and size. One partition mode set can contain at least two partition modes. For example, as shown in (1a) and (1b) of Figure 31A, one partition mode set can include a ternary tree vertical partition followed by a binary tree vertical partition of the central subblock and an unpartitioned subblock. Alternatively, as shown in (2a), (2b), and (2c) of Figure 31A, the other partition mode set can include a binary tree vertical partition followed by a binary tree vertical partition of both subblocks. Both partition mode sets result in subblocks of the same shape and size.

[0151] Two partition mode sets divide a block into subblocks of the same shape and size. When selecting between two partition mode sets with different numbers of bins or bits when encoded within a bitstream, the partition mode set with fewer bins or fewer bits is selected. Note that the number of bins and bits correspond to the amount of code.

[0152] When selecting from two partition mode sets that divide a block into sub-blocks of the same shape and size, and which have the same number of bins or bits when encoded in a bitstream, the partition mode set that appears first in a predetermined order among the multiple partition mode sets is selected. The predetermined order may be, for example, based on the number of partition modes in each partition mode set.

[0153] Figures 31A and 31B illustrate an example of dividing a block into subblocks using a partition mode set with fewer bins in partition mode encoding. In this example, when the left NxN pixel block is vertically divided into two subblocks, a second partition mode is not selected for the right NxN pixel block in step (2c). This is because, in the partition mode encoding method of Figure 31B, the second partition mode set (2a, 2b, 2c) requires more bins for partition mode encoding compared to the first partition mode set (1a, 1b).

[0154] Figures 32A to 32C illustrate an example of dividing a block into subblocks using the first partition mode set that appears in a predetermined order of multiple partition mode sets. In this example, when a 2NxN / 2 pixel block is vertically divided into three subblocks, the second partition mode for the lower 2NxN / 2 pixel block is not selected in step (2c). This is because, in the partition mode encoding method shown in Figure 32B, the second partition mode set (2a, 2b, 2c) has the same number of bins as the first partition mode set (1a, 1b, 1c, 1d), and appears after the first partition mode set (1a, 1b, 1c, 1d) in the predetermined order of partition mode sets shown in Figure 32C. The predetermined order of multiple partition mode sets can be fixed or signaled within the bitstream.

[0155] Figure 20 shows an example in Embodiment 2 where the second partition mode is not selected for dividing a 2NxN pixel block, as shown in step (2c). As shown in Figure 20, using the first division method (i), a 2Nx2N pixel block (e.g., 16x16 pixels) can be equally divided into four NxN pixel (e.g., 8x8 pixel) subblocks, as shown in step (1a). Alternatively, using the second division method (ii), a 2Nx2N pixel block can be horizontally and equally divided into two 2NxN pixel (e.g., 16x8 pixel) subblocks, as shown in step (2a). Here, in the second partitioning method (ii), if the upper 2NxN pixel block (first block) is vertically divided into two NxN pixel subblocks by the first partitioning mode as in step (2b), then in step (2c), the second partitioning mode that vertically divides the lower 2NxN pixel block (second block) into two NxN pixel subblocks is not selected as a candidate for a possible partitioning mode. This is because it generates the same subblock size as the subblock size obtained by the four-part division in the first partitioning method (i).

[0156] As described above, in Figure 20, the second partition mode is not selected as a candidate when, if the first partition mode is used, the first block is equally divided vertically into two sub-blocks, and if the second partition mode is used, the second block, which is vertically adjacent to the first block, is equally divided vertically into two sub-blocks.

[0157] Figure 21 shows an example in Embodiment 2 where the second partition mode is not selected for dividing an Nx2N pixel block, as shown in step (2c). As shown in Figure 21, using the first partitioning method (i), a 2Nx2N pixel block can be equally divided into four NxN pixel subblocks, as shown in step (1a). Alternatively, using the second partitioning method (ii), a 2Nx2N pixel block can be equally divided vertically into two 2NxN pixel (e.g., 8x16 pixel) subblocks, as shown in step (2a). In the second partitioning method (ii), if the left Nx2N pixel block (first block) is horizontally divided into two NxN pixel subblocks by the first partition mode, as shown in step (2b), then in step (2c), the second partition mode, which horizontally divides the right Nx2N pixel block (second block) into two NxN pixel subblocks, is not selected as a candidate for a possible partition mode. This is because the same subblock size as the subblock size obtained by the four-part division in the first division method (i) is generated.

[0158] As described above, in Figure 21, the second partition mode is not selected as a candidate when, if the first partition mode is used, the first block is equally divided horizontally into two sub-blocks, and if the second partition mode is used, the second block, which is horizontally adjacent to the first block, is equally divided horizontally into two sub-blocks.

[0159] Figure 22 shows an example in Embodiment 2 where the second partition mode is not selected for dividing an NxN pixel block, as shown in step (2c). As shown in Figure 22, using the first partitioning method (i), a 2NxN pixel block (for example, 16x8 pixels, where the value of "N" can be any integer multiple of 4 from 8 to 128) can be vertically divided into N / 2xN pixel subblocks, NxN pixel subblocks, and N / 2xN pixel subblocks (for example, 4x8 pixel subblocks, 8x8 pixel subblocks, and 4x8 pixel subblocks), as shown in step (1a). Alternatively, using the second partitioning method (ii), a 2NxN pixel block can also be divided into two NxN pixel subblocks, as shown in step (2a). In the first partitioning method (i), in step (1b), the central NxN pixel block can be vertically divided into two N / 2xN pixel (e.g., 4x8 pixel) subblocks. In the second partitioning method (ii), if the left NxN pixel block (first block) is vertically divided into two N / 2xN pixel subblocks as in step (2b), then in step (2c), the partitioning mode in which the right NxN pixel block (second block) is vertically divided into two N / 2xN pixel subblocks is not selected as a candidate for a possible partitioning mode. This is because it generates subblocks of the same size as those obtained by the first partitioning method (i), i.e., four N / 2xN pixel subblocks.

[0160] As described above, in Figure 22, the second partition mode is not selected as a candidate when, using the first partition mode, the first block is equally divided vertically into two sub-blocks, and using the second partition mode, the second block horizontally adjacent to the first block is equally divided vertically into two sub-blocks.

[0161] Figure 23 shows an example in Embodiment 2 where the second partition mode is not selected for dividing an NxN pixel block, as shown in step (2c). As shown in Figure 23, using the first partitioning method (i), an Nx2N pixel (for example, 8x16 pixels, where the value of "N" can be any integer multiple of 4 from 8 to 128) can be divided into NxN / 2 pixel subblocks, NxN pixel subblocks, and NxN / 2 pixel subblocks (for example, an 8x4 pixel subblock, an 8x8 pixel subblock, and an 8x4 pixel subblock). Alternatively, using the second partitioning method, it can be divided into two NxN pixel subblocks, as shown in step (2a). In the first partitioning method (i), as shown in step (1b), the central NxN pixel block can be divided into two NxN / 2 pixel subblocks. In the second partitioning method (ii), if the upper NxN pixel block (first block) is horizontally divided into two NxN / 2 pixel subblocks as in step (2b), then in step (2c), the partitioning mode in which the lower NxN pixel block (second block) is horizontally divided into two NxN / 2 pixel subblocks is not selected as a candidate for a possible partitioning mode. This is because it generates the same subblock size as the subblock size obtained by the first partitioning method (i), i.e., four NxN / 2 pixel subblocks.

[0162] As described above, in Figure 23, the second partition mode is not selected as a candidate when, using the first partition mode, the first block is equally divided horizontally into two sub-blocks, and using the second partition mode, the second block, which is vertically adjacent to the first block, is equally divided horizontally into two sub-blocks.

[0163] If it is determined that the second partition mode is selected as a candidate for dividing the second block (N in S1003), then in step S1004, a partition mode is selected from a plurality of partition modes, including the second partition mode as a candidate. In step S1005, a second parameter indicating the selection result is written to the bitstream.

[0164] If it is determined that the second partition mode is not selected as a candidate for dividing the second block (Y in S1003), then in step S1006, a partition mode different from the second partition mode is selected to divide the second block. The partition mode selected here divides the block into subblocks that have a different shape or size compared to the subblocks generated by the second partition mode.

[0165] Figure 24 shows an example in Embodiment 2 where, as shown in step (3), a 2NxN pixel block is divided using the selected partition mode when a second partition mode is not selected. As shown in Figure 24, the selected partition mode can divide the current 2NxN pixel block (the bottom block in this example) into three subblocks as shown in Figures 24(c) and (f). The three subblocks may be of different sizes. For example, in the three subblocks, the larger subblock may have twice the width / height of the smaller subblocks. Alternatively, the selected partition mode can also divide the current block into two subblocks of different sizes (asymmetric binary trees) as shown in Figures 24(a), (b), (d), and (e). For example, when an asymmetric binary tree is used, the larger subblock may have three times the width / height of the smaller subblocks.

[0166] Figure 25 shows an example in Embodiment 2 where, as shown in step (3), a second partition mode is not selected, and the selected partition mode is used to divide an Nx2N pixel block. As shown in Figure 25, the selected partition mode can divide the current Nx2N pixel block (the right block in this example) into three subblocks, as shown in Figures 25(c) and (f). The three subblocks may be of different sizes. For example, in the three subblocks, the larger subblock may have twice the width / height of the smaller subblocks. Alternatively, the selected partition mode can also divide the current block into two subblocks of different sizes (asymmetric binary trees), as shown in Figures 25(a), (b), (d), and (e). For example, when an asymmetric binary tree is used, the larger subblock may have three times the width / height of the smaller subblocks.

[0167] Figure 26 shows an example in Embodiment 2 of dividing an NxN pixel block using the selected partition mode when a second partition mode is not selected, as shown in step (3). As shown in Figure 26, in step (1), the 2NxN pixel block is vertically divided into two NxN pixel subblocks, and in step (2), the left NxN pixel block is vertically divided into two N / 2xN pixel subblocks. In step (3), the current block can be divided into three subblocks using the selected partition mode for the current NxN pixel block (the left block in this example), as shown in Figures 26(c) and (f). The three subblocks may be of different sizes. For example, in the three subblocks, the larger subblock may have twice the width / height of the smaller subblocks. Alternatively, the selected partition mode can also divide the current block into two subblocks of different sizes (asymmetric binary trees), as shown in Figures 26(a), (b), (d) and (e). For example, when an asymmetric binary tree is used, a large subblock can have three times the width / height of a small subblock.

[0168] Figure 27 shows an example in Embodiment 2 of dividing an NxN pixel block using the selected partition mode when a second partition mode is not selected, as shown in step (3). As shown in Figure 27, in step (1), the Nx2N pixel block is horizontally divided into two NxN pixel subblocks, and in step (2), the upper NxN pixel block is horizontally divided into two NxN / 2 pixel subblocks. In step (3), the current block can be divided into three subblocks using the selected partition mode for the current NxN pixel block (the lower block in this example), as shown in Figures 27(c) and (f). The three subblocks may be of different sizes. For example, in the three subblocks, the larger subblock may have twice the width / height of the smaller subblocks. Alternatively, the selected partition mode can also divide the current block into two subblocks of different sizes (asymmetric binary trees), as shown in Figures 27(a), (b), (d) and (e). For example, when an asymmetric binary tree is used, a large subblock can have three times the width / height of a small subblock.

[0169] Figure 17 shows possible locations for the first parameter within a compressed video stream. As shown in Figure 17, the first parameter can be located within a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. The first parameter can indicate how a block is divided into multiple subblocks. For example, the first parameter may include a flag indicating whether the block is divided horizontally or vertically. The first parameter may also include a parameter indicating whether the block is divided into two or more subblocks.

[0170] Figure 18 shows possible locations for the second parameter in a compressed video stream. As shown in Figure 18, the second parameter can be located within a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. The second parameter can indicate how a block is divided into multiple subblocks. For example, the second parameter may include a flag indicating whether the block is divided horizontally or vertically. The second parameter may also include a parameter indicating whether the block is divided into two or more subblocks. The second parameter is located following the first parameter in the bitstream, as shown in Figure 19.

[0171] The first block and the second block are different blocks. The first block and the second block may be contained within the same frame. For example, the first block may be a block adjacent to the second block above it. Also, for example, the first block may be a block adjacent to the second block to its left.

[0172] In step S1007, the second block is divided into subblocks using the selected partition mode. In step S1008, the divided blocks are encoded.

[0173] [Encoding device] Figure 15 is a block diagram showing the structure of a video / image encoding device according to Embodiment 2 or 3.

[0174] The video encoding device 5000 is a device for encoding input video / images block by block and generating an encoded output bitstream. As shown in Figure 15, the video encoding device 5000 comprises a conversion unit 5001, a quantization unit 5002, an inverse quantization unit 5003, an inverse conversion unit 5004, a block memory 5005, a frame memory 5006, an intra prediction unit 5007, an inter prediction unit 5008, an entropy encoding unit 5009, and a block division determination unit 5010.

[0175] The input video is fed into the adder, and the added value is output to the conversion unit 5001. Based on the block partition mode derived by the block partition determination unit 5010, the conversion unit 5001 converts the added value into frequency coefficients and outputs the frequency coefficients to the quantization unit 5002. The block partition mode can be associated with the block partition mode, block partition type, or block partition direction. The quantization unit 5002 quantizes the input quantization coefficients and outputs the quantized values ​​to the inverse quantization unit 5003 and the entropy coding unit 5009.

[0176] The inverse quantization unit 5003 inversely quantizes the quantized value output from the quantization unit 5002 and outputs the frequency coefficient to the inverse transform unit 5004. The inverse transform unit 5004 performs an inverse frequency transform on the frequency coefficient based on the block partition mode derived by the block partition determination unit 5010, converts the frequency coefficient into a sample value of the bitstream, and outputs the sample value to the adder.

[0177] The adder adds the sample values ​​of the bitstream output from the inverse transformer 5004 to the predicted video / image values ​​output from the intra / inter prediction units 5007 and 5008, and outputs the added value to the block memory 5005 or frame memory 5006 for further prediction. The block partitioning determination unit 5010 collects block information from the block memory 5005 or frame memory 5006 and derives the block partition mode and parameters related to the block partition mode. Using the derived block partition mode, the block is divided into multiple subblocks. The intra / inter prediction units 5007 and 5008 search among the video / images stored in the block memory 5005, or the video / images in the frame memory 5006 reconstructed with the block partition mode derived by the block partitioning determination unit 5010, and estimate, for example, the video / image region most similar to the input video / image to be predicted.

[0178] The entropy coding unit 5009 encodes the quantized values ​​output from the quantization unit 5002, encodes the parameters from the block partitioning determination unit 5010, and outputs a bitstream.

[0179] [Decryption process] Figure 12 shows the video decoding process according to Embodiment 2.

[0180] First, in step S2001, a first parameter is read from the bitstream to identify the partition mode for dividing the first block into subblocks from among several partition modes. Using a partition mode divides the block into subblocks, and using a different partition mode divides the block into subblocks having different shapes, different heights, or different widths.

[0181] Figure 28 shows examples of partition modes for dividing an NxN pixel block in Embodiment 2. In Figure 28, (a) to (h) represent different partition modes. As shown in Figure 28, using partition mode (a), an NxN pixel block (e.g., 16x16 pixels, where "N" can be any integer multiple of 4 from 8 to 128) is divided into two N / 2xN pixel subblocks (e.g., 8x16 pixels). Using partition mode (b), an NxN pixel block is divided into an N / 4xN pixel subblock (e.g., 4x16 pixels) and a 3N / 4xN pixel subblock (e.g., 12x16 pixels). Using partition mode (c), an NxN pixel block is divided into a 3N / 4xN pixel subblock (e.g., 12x16 pixels) and an N / 4xN pixel subblock (e.g., 4x16 pixels). Using partition mode (d), an NxN pixel block is divided into (N / 4)xN pixel (e.g., 4x16 pixels) subblocks, N / 2xN pixel (e.g., 8x16 pixels) subblocks, and N / 4xN pixel (e.g., 4x16 pixels) subblocks. Using partition mode (e), an NxN pixel block is divided into two NxN / 2 pixel (e.g., 16x8 pixels) subblocks. Using partition mode (f), an NxN pixel block is divided into an NxN / 4 pixel (e.g., 16x4 pixels) subblock and an Nx3N / 4 pixel (e.g., 16x12 pixels) subblock. Using partition mode (g), an NxN pixel block is divided into an Nx3N / 4 pixel (e.g., 16x12 pixels) subblock and an NxN / 4 pixel (e.g., 16x4 pixels) subblock. Using partition mode (h), an NxN pixel block is divided into NxN / 4 pixel (e.g., 16x4 pixel) subblocks, NxN / 2 pixel (e.g., 16x8 pixel) subblocks, and NxN / 4 pixel (e.g., 16x4 pixel) subblocks.

[0182] Next, in step S2002, it is determined whether the first parameter identifies the first partition mode.

[0183] Next, in step S2003, based on the determination of whether or not the first parameter identifies the first partition mode, it is determined whether or not to select the second partition mode as a candidate for dividing the second block.

[0184] Two different partition mode sets may divide a block into subblocks of the same shape and size. For example, as shown in Figure 31A, the subblocks (1b) and (2c) have the same shape and size. One partition mode set can contain at least two partition modes. For example, as shown in (1a) and (1b) of Figure 31A, one partition mode set can include a ternary tree vertical partition followed by a binary tree vertical partition of the central subblock and an unpartitioned subblock. Alternatively, as shown in (2a), (2b), and (2c) of Figure 31A, the other partition mode set can include a binary tree vertical partition followed by a binary tree vertical partition of both subblocks. Both partition mode sets result in subblocks of the same shape and size.

[0185] Two partition mode sets divide a block into sub-blocks of the same shape and size, and when selecting from two partition mode sets with different numbers of bins or bits when encoded in a bitstream, the partition mode set with fewer bins or fewer bits is selected.

[0186] When selecting from two partition mode sets that divide a block into sub-blocks of the same shape and size, and which have the same number of bins or bits when encoded in a bitstream, the partition mode set that appears first in a predetermined order among the multiple partition mode sets is selected. The predetermined order may be, for example, based on the number of partition modes in each partition mode set.

[0187] Figures 31A and 31B illustrate an example of dividing a block into subblocks using a partition mode set with fewer bins in partition mode encoding. In this example, when the left NxN pixel block is vertically divided into two subblocks, a second partition mode is not selected for the right NxN pixel block in step (2c). This is because, in the partition mode encoding method of Figure 31B, the second partition mode set (2a, 2b, 2c) requires more bins for partition mode encoding compared to the first partition mode set (1a, 1b).

[0188] Figure 32A shows an example of dividing a block into subblocks using the first partition mode set that appears in a predetermined order of multiple partition mode sets. In this example, when a 2NxN / 2 pixel block is vertically divided into three subblocks, the second partition mode for the lower 2NxN / 2 pixel block is not selected in step (2c). This is because, in the partition mode encoding method shown in Figure 32B, the second partition mode set (2a, 2b, 2c) has the same number of bins as the first partition mode set (1a, 1b, 1c, 1d), and appears after the first partition mode set (1a, 1b, 1c, 1d) in the predetermined order of partition mode sets shown in Figure 32C. The predetermined order of multiple partition mode sets can be fixed or signaled within the bitstream.

[0189] Figure 20 shows an example in Embodiment 2 where the second partition mode is not selected for dividing a 2NxN pixel block, as shown in step (2c). As shown in Figure 20, using the first division method (i), a 2Nx2N pixel block (e.g., 16x16 pixels) can be equally divided into four NxN pixel (e.g., 8x8 pixel) subblocks, as shown in step (1a). Alternatively, using the second division method (ii), a 2Nx2N pixel block can be horizontally and equally divided into two 2NxN pixel (e.g., 16x8 pixel) subblocks, as shown in step (2a). In the second partitioning method (ii), if the upper 2NxN pixel block (first block) is vertically divided into two NxN pixel subblocks by the first partitioning mode as in step (2b), then in step (2c), the second partitioning mode that vertically divides the lower 2NxN pixel block (second block) into two NxN pixel subblocks is not selected as a candidate for a possible partitioning mode. This is because it generates the same subblock size as the subblock size obtained by the four-part partitioning in the first partitioning method (i).

[0190] As described above, in Figure 20, the second partition mode is not selected as a candidate when, if the first partition mode is used, the first block is equally divided vertically into two sub-blocks, and if the second partition mode is used, the second block, which is vertically adjacent to the first block, is equally divided vertically into two sub-blocks.

[0191] Figure 21 shows an example in Embodiment 2 where the second partition mode is not selected for dividing an Nx2N pixel block, as shown in step (2c). As shown in Figure 21, using the first partitioning method (i), a 2Nx2N pixel block can be equally divided into four NxN pixel subblocks, as shown in step (1a). Alternatively, using the second partitioning method (ii), a 2Nx2N pixel block can be equally divided vertically into two 2NxN pixel (e.g., 8x16 pixel) subblocks, as shown in step (2a). In the second partitioning method (ii), if the left Nx2N pixel block (first block) is horizontally divided into two NxN pixel subblocks by the first partition mode, as shown in step (2b), then in step (2c), the second partition mode, which horizontally divides the right Nx2N pixel block (second block) into two NxN pixel subblocks, is not selected as a candidate for a possible partition mode. This is because the same subblock size as the subblock size obtained by the four-part division in the first division method (i) is generated.

[0192] As described above, in Figure 21, the second partition mode is not selected as a candidate when, if the first partition mode is used, the first block is equally divided horizontally into two sub-blocks, and if the second partition mode is used, the second block, which is horizontally adjacent to the first block, is equally divided horizontally into two sub-blocks.

[0193] Figure 22 shows an example in Embodiment 2 where the second partition mode is not selected for dividing an NxN pixel block, as shown in step (2c). As shown in Figure 22, using the first partitioning method (i), a 2NxN pixel block (for example, 16x8 pixels, where the value of "N" can be any integer multiple of 4 from 8 to 128) can be vertically divided into N / 2xN pixel subblocks, NxN pixel subblocks, and N / 2xN pixel subblocks (for example, 4x8 pixel subblocks, 8x8 pixel subblocks, and 4x8 pixel subblocks), as shown in step (1a). Alternatively, using the second partitioning method (ii), a 2NxN pixel block can also be divided into two NxN pixel subblocks, as shown in step (2a). In the first partitioning method (i), in step (1b), the central NxN pixel block can be vertically divided into two N / 2xN pixel (e.g., 4x8 pixel) subblocks. In the second partitioning method (ii), if the left NxN pixel block (first block) is vertically divided into two N / 2xN pixel subblocks as in step (2b), then in step (2c), the partitioning mode in which the right NxN pixel block (second block) is vertically divided into two N / 2xN pixel subblocks is not selected as a candidate for a possible partitioning mode. This is because it generates subblocks of the same size as those obtained by the first partitioning method (i), i.e., four N / 2xN pixel subblocks.

[0194] As described above, in Figure 22, the second partition mode is not selected as a candidate when, using the first partition mode, the first block is equally divided vertically into two sub-blocks, and using the second partition mode, the second block horizontally adjacent to the first block is equally divided vertically into two sub-blocks.

[0195] Figure 23 shows an example in Embodiment 2 where the second partition mode is not selected for dividing an NxN pixel block, as shown in step (2c). As shown in Figure 23, using the first partitioning method (i), an Nx2N pixel (for example, 8x16 pixels, where the value of "N" can be any integer multiple of 4 from 8 to 128) can be divided into NxN / 2 pixel subblocks, NxN pixel subblocks, and NxN / 2 pixel subblocks (for example, an 8x4 pixel subblock, an 8x8 pixel subblock, and an 8x4 pixel subblock). Alternatively, using the second partitioning method, it can be divided into two NxN pixel subblocks, as shown in step (2a). In the first partitioning method (i), as shown in step (1b), the central NxN pixel block can be divided into two NxN / 2 pixel subblocks. In the second partitioning method (ii), if the upper NxN pixel block (first block) is horizontally divided into two NxN / 2 pixel subblocks as in step (2b), then in step (2c), the partitioning mode in which the lower NxN pixel block (second block) is horizontally divided into two NxN / 2 pixel subblocks is not selected as a candidate for a possible partitioning mode. This is because it generates the same subblock size as the subblock size obtained by the first partitioning method (i), i.e., four NxN / 2 pixel subblocks.

[0196] As described above, in Figure 23, the second partition mode is not selected as a candidate when, using the first partition mode, the first block is equally divided horizontally into two sub-blocks, and using the second partition mode, the second block, which is vertically adjacent to the first block, is equally divided horizontally into two sub-blocks.

[0197] If it is determined that the second partition mode is selected as a candidate for dividing the second block (N in S2003), then in step S2004, the second parameter is read from the bitstream, and a partition mode is selected from multiple partition modes, including the second partition mode as a candidate.

[0198] If it is determined that the second partition mode is not selected as a candidate for dividing the second block (Y in S2003), then in step S2005, a partition mode different from the second partition mode is selected to divide the second block. The partition mode selected here divides the block into subblocks that have a different shape or size compared to the subblocks generated by the second partition mode.

[0199] Figure 24 shows an example in Embodiment 2 where, as shown in step (3), a 2NxN pixel block is divided using the selected partition mode when a second partition mode is not selected. As shown in Figure 24, the selected partition mode can divide the current 2NxN pixel block (the bottom block in this example) into three subblocks as shown in Figures 24(c) and (f). The three subblocks may be of different sizes. For example, in the three subblocks, the larger subblock may have twice the width / height of the smaller subblocks. Alternatively, the selected partition mode can also divide the current block into two subblocks of different sizes (asymmetric binary trees) as shown in Figures 24(a), (b), (d), and (e). For example, when an asymmetric binary tree is used, the larger subblock may have three times the width / height of the smaller subblocks.

[0200] Figure 25 shows an example in Embodiment 2 where, as shown in step (3), a second partition mode is not selected, and the selected partition mode is used to divide an Nx2N pixel block. As shown in Figure 25, the selected partition mode can divide the current Nx2N pixel block (the right block in this example) into three subblocks, as shown in Figures 25(c) and (f). The three subblocks may be of different sizes. For example, in the three subblocks, the larger subblock may have twice the width / height of the smaller subblocks. Alternatively, the selected partition mode can also divide the current block into two subblocks of different sizes (asymmetric binary trees), as shown in Figures 25(a), (b), (d), and (e). For example, when an asymmetric binary tree is used, the larger subblock may have three times the width / height of the smaller subblocks.

[0201] Figure 26 shows an example in Embodiment 2 of dividing an NxN pixel block using the selected partition mode when a second partition mode is not selected, as shown in step (3). As shown in Figure 26, in step (1), the 2NxN pixel block is vertically divided into two NxN pixel subblocks, and in step (2), the left NxN pixel block is vertically divided into two N / 2xN pixel subblocks. In step (3), the current block can be divided into three subblocks using the selected partition mode for the current NxN pixel block (the left block in this example), as shown in Figures 26(c) and (f). The three subblocks may be of different sizes. For example, in the three subblocks, the larger subblock may have twice the width / height of the smaller subblocks. Alternatively, the selected partition mode can also divide the current block into two subblocks of different sizes (asymmetric binary trees), as shown in Figures 26(a), (b), (d) and (e). For example, when an asymmetric binary tree is used, a large subblock can have three times the width / height of a small subblock.

[0202] Figure 27 shows an example in Embodiment 2 of dividing an NxN pixel block using the selected partition mode when a second partition mode is not selected, as shown in step (3). As shown in Figure 27, in step (1), the Nx2N pixel block is horizontally divided into two NxN pixel subblocks, and in step (2), the upper NxN pixel block is horizontally divided into two NxN / 2 pixel subblocks. In step (3), the current block can be divided into three subblocks using the selected partition mode for the current NxN pixel block (the lower block in this example), as shown in Figures 27(c) and (f). The three subblocks may be of different sizes. For example, in the three subblocks, the larger subblock may have twice the width / height of the smaller subblocks. Alternatively, the selected partition mode can also divide the current block into two subblocks of different sizes (asymmetric binary trees), as shown in Figures 27(a), (b), (d) and (e). For example, when an asymmetric binary tree is used, a large subblock can have three times the width / height of a small subblock.

[0203] Figure 17 shows possible locations for the first parameter within a compressed video stream. As shown in Figure 17, the first parameter can be located within a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. The first parameter can indicate how a block is divided into multiple subblocks. For example, the first parameter may include a flag indicating whether the block is divided horizontally or vertically. The first parameter may also include a parameter indicating whether the block is divided into two or more subblocks.

[0204] Figure 18 shows possible locations for the second parameter in a compressed video stream. As shown in Figure 18, the second parameter can be located within a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. The second parameter can indicate how a block is divided into multiple subblocks. For example, the second parameter may include a flag indicating whether the block is divided horizontally or vertically. The second parameter may also include a parameter indicating whether the block is divided into two or more subblocks. The second parameter is located following the first parameter in the bitstream, as shown in Figure 19.

[0205] The first block and the second block are different blocks. The first block and the second block may be contained within the same frame. For example, the first block may be a block adjacent to the second block above it. Also, for example, the first block may be a block adjacent to the second block to its left.

[0206] In step S2006, the second block is divided into subblocks using the selected partition mode. In step S2007, the divided blocks are decrypted.

[0207] [Decoding device] Figure 16 is a block diagram showing the structure of a video / image decoding device according to Embodiment 2 or 3.

[0208] The video decoding device 6000 is a device for decoding an input encoded bitstream block by block and outputting video / images. As shown in Figure 16, the video decoding device 6000 comprises an entropy decoding unit 6001, an inverse quantization unit 6002, an inverse transformation unit 6003, a block memory 6004, a frame memory 6005, an intra prediction unit 6006, an inter prediction unit 6007, and a block division determination unit 6008.

[0209] The input encoded bitstream is input to the entropy decoding unit 6001. After the input encoded bitstream is input to the entropy decoding unit 6001, the entropy decoding unit 6001 decodes the input encoded bitstream, outputs the parameters to the block partitioning determination unit 6008, and outputs the decoded value to the inverse quantization unit 6002.

[0210] The inverse quantization unit 6002 inversely quantizes the decoded value and outputs the frequency coefficient to the inverse transform unit 6003. The inverse transform unit 6003 performs an inverse frequency transform on the frequency coefficient based on the block partition mode derived by the block partition determination unit 6008, converts the frequency coefficient into a sample value, and outputs the sample value to the adder. The block partition mode can be associated with the block partition mode, block partition type, or block partition direction. The adder adds the sample value to the predicted video / image value output from the intra / inter prediction units 6006 and 6007, outputs the added value to the display, and outputs the added value to the block memory 6004 or frame memory 6005 for further prediction. The block partition determination unit 6008 collects block information from the block memory 6004 or frame memory 6005 and derives the block partition mode using the parameters decoded by the entropy decoding unit 6001. Using the derived block partition mode, the block is divided into multiple subblocks. Furthermore, the intra / inter prediction units 6006 and 6007 predict the video / image region of the block to be decoded from the video / image stored in the block memory 6004, or from the video / image in the frame memory 6005 reconstructed in the block partition mode derived by the block partition determination unit 6008.

[0211] [Effects, etc.] As described above, the video encoding device 5000 according to this embodiment is an image encoding device for encoding blocks of an image, and comprises a processor and a memory, wherein the processor uses the memory to write a first parameter to a bitstream that identifies a partition mode for dividing a first block into subblocks from among a plurality of partition modes, determines whether the first parameter identifies a first partition mode, and, based on the determination of whether the first parameter identifies a first partition mode, determines whether to select a second partition mode as a candidate for dividing a second block different from the first block, if it is determined to select a second partition mode as a candidate for dividing a second block, selects a partition mode from among a plurality of partition modes that include the second partition mode as a candidate, and writes a second parameter indicating the selection result to a bitstream, if it is determined not to select a second partition mode as a candidate for dividing a second block, selects a partition mode different from the second partition mode that divides the block into subblocks of a different shape or size compared to the subblocks generated by the second partition mode, divides the second block into subblocks using the selected partition mode, and encodes the divided block.

[0212] According to this, if it is determined that the second partition mode is not to be selected as a candidate for dividing the second block, a partition mode different from the second partition mode can be selected. Therefore, the number of selectable partition modes can be reduced, and the amount of code in each partition mode can be reduced, thereby improving compression efficiency.

[0213] Furthermore, in the video encoding device 5000 according to this embodiment, the selected partition mode, which is different from the second partition mode, may divide the block into more subblocks than the second partition mode, or it may divide the block into the same number of subblocks as the second partition mode but of different sizes.

[0214] According to this, if the second partition mode is not selected as a candidate, the data can be divided into subblocks different from those obtained by the second partition mode.

[0215] Furthermore, in the video encoding device 5000 according to this embodiment, when determining whether or not to select the second partition mode, if the first parameter identifies the first partition mode, the device determines whether or not to select the second partition mode as a candidate based on the first code amount of the first partition mode set including the first partition mode and the second partition mode, and the second code amount of the second partition mode set which is different from the first partition mode set. The second partition mode set may include at least one partition mode for dividing a block into subblocks with the same shape and size as the subblocks obtained by dividing the first block and the second block using the first partition mode and the second partition mode.

[0216] According to this, it is possible to determine whether or not to select a second partition as a candidate based on the sign amount of the partition mode set, thereby reducing the sign amount of the partition mode and improving compression efficiency.

[0217] Furthermore, in the video encoding device 5000 according to this embodiment, when determining whether or not to select the second partition mode, it may be determined not to select the second partition mode if the first code amount is greater than the second code amount.

[0218] This prevents the selection of a partition mode set with a larger code amount, thereby reducing the code amount of the partition mode and improving compression efficiency.

[0219] Furthermore, in the video encoding device 5000 according to this embodiment, when determining whether or not to select the second partition mode, if the first code amount is equal to the second code amount, and the second partition mode set appears before the first partition mode set in a predetermined order of a plurality of partition mode sets including the first partition mode set and the second partition mode set, then it may be determined not to select the second partition mode.

[0220] According to this, when the sign amounts of two partition mode sets are equal, the partition mode set can be selected based on a predetermined order.

[0221] As described above, the video decoding device 6000 according to this embodiment is an image decoding device that decodes blocks of an image, and comprises a processor and a memory, wherein the processor uses the memory to read a first parameter from the bitstream that identifies a partition mode for dividing a first block into subblocks from among a plurality of partition modes, determines whether the first parameter identifies a first partition mode, and, based on the determination of whether the first parameter identifies a first partition mode, determines whether to select a second partition mode as a candidate for dividing a second block different from the first block, and if it is determined that the second partition mode is selected as a candidate for dividing the second block, the processor reads a second parameter from the bitstream that selects a partition mode for dividing the second block from among a plurality of partition modes that include the second partition mode as a candidate, and if it is determined that the second partition mode is not selected as a candidate for dividing the second block, the processor selects a partition mode different from the second partition mode that divides the block into subblocks of a different shape or size compared to the subblocks generated by the second partition mode, and uses the selected partition mode to divide the second block into subblocks and decodes the divided block.

[0222] According to this, if it is determined that the second partition mode is not to be selected as a candidate for dividing the second block, a partition mode different from the second partition mode can be selected. Therefore, the number of selectable partition modes can be reduced, and the amount of code in each partition mode can be reduced, thereby improving compression efficiency.

[0223] Furthermore, in the video decoding device 6000 according to this embodiment, the selected partition mode, which is different from the second partition mode, may divide the block into more subblocks than the second partition mode, or it may divide the block into the same number of subblocks as the second partition mode but of different sizes.

[0224] According to this, if the second partition mode is not selected as a candidate, the data can be divided into subblocks different from those obtained by the second partition mode.

[0225] Furthermore, in the video decoding device 6000 according to this embodiment, when determining whether or not to select the second partition mode, if the first parameter identifies the first partition mode, the device determines whether or not to select the second partition mode as a candidate based on the first code amount of the first partition mode set including the first partition mode and the second partition mode, and the second code amount of the second partition mode set which is different from the first partition mode set. The second partition mode set may include at least one partition mode for dividing a block into subblocks with the same shape and size as the subblocks obtained by dividing the first block and the second block using the first partition mode and the second partition mode.

[0226] According to this, it is possible to determine whether or not to select a second partition as a candidate based on the sign amount of the partition mode set, thereby reducing the sign amount of the partition mode and improving compression efficiency.

[0227] Furthermore, in the video decoding device 6000 according to this embodiment, when determining whether or not to select the second partition mode, it may be determined not to select the second partition mode if the first code amount is greater than the second code amount.

[0228] According to this, it is possible to prevent the selection of a partition mode set with a larger code amount, thereby reducing the code amount of the partition mode and improving compression efficiency.

[0229] Furthermore, in the video decoding device 6000 according to this embodiment, when determining whether or not to select the second partition mode, if the first code amount is equal to the second code amount, and the second partition mode set appears before the first partition mode set in a predetermined order of a plurality of partition mode sets including the first partition mode set and the second partition mode set, then it may be determined not to select the second partition mode.

[0230] According to this, when the sign amounts of two partition mode sets are equal, the partition mode set can be selected based on a predetermined order.

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

[0232] (Embodiment 3) The encoding and decoding processes according to Embodiment 3 will be described in detail with reference to Figures 13 and 14. The encoding and decoding devices according to Embodiment 3 will be described in detail with reference to Figures 15 and 16.

[0233] [Encoding process] Figure 13 shows the video encoding process according to Embodiment 3.

[0234] First, in step S3001, a first parameter is written to the bitstream that identifies the partition type for dividing the first block into subblocks from among several partition types.

[0235] In the next step, S3002, a second parameter indicating the partition direction is written to the bitstream. The second parameter is placed in the bitstream immediately following the first parameter. The partition type, together with the partition direction, may constitute the partition mode. The partition type indicates the number of subblocks and the partition ratio for dividing the block.

[0236] Figure 29 shows an example of partition types and partition directions for dividing an NxN pixel block in Embodiment 3. In Figure 29, (1), (2), (3), and (4) are different partition types, (1a), (2a), (3a), and (4a) are partition modes in which the partition type differs in the vertical partition direction, and (1b), (2b), (3b), and (4b) are partition modes in which the partition type differs in the horizontal partition direction. As shown in Figure 29, when the partition ratio is 1:1 and the block is divided vertically into a symmetric binary tree (i.e., two subblocks), the NxN pixel block is divided using partition mode (1a). When the partition ratio is 1:1 and the block is divided horizontally into a symmetric binary tree (i.e., two subblocks), the block is divided using partition mode (1b). When the partition ratio is 1:3 and the vertical direction is divided into asymmetric binary trees (i.e., two subblocks), an NxN pixel block is partitioned using partition mode (2a). When the partition ratio is 1:3 and the horizontal direction is divided into asymmetric binary trees (i.e., two subblocks), an NxN pixel block is partitioned using partition mode (2b). When the partition ratio is 3:1 and the vertical direction is divided into asymmetric binary trees (i.e., two subblocks), an NxN pixel block is partitioned using partition mode (3a). When the partition ratio is 3:1 and the horizontal direction is divided into asymmetric binary trees (i.e., two subblocks), an NxN pixel block is partitioned using partition mode (3b). When the partition ratio is 1:2:1 and the vertical direction is divided into ternary trees (i.e., three subblocks), an NxN pixel block is partitioned using partition mode (4a). When the partition ratio is 1:2:1 and the data is divided horizontally into a ternary tree (i.e., three subblocks), an NxN pixel block is partitioned using partition mode (4b).

[0237] Figure 17 shows possible locations for the first parameter within a compressed video stream. As shown in Figure 17, the first parameter can be located within a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. The first parameter can indicate how a block is divided into multiple subblocks. For example, the first parameter may include a flag indicating whether the block is divided horizontally or vertically. The first parameter may also include a parameter indicating whether the block is divided into two or more subblocks.

[0238] Figure 18 shows possible locations for the second parameter in a compressed video stream. As shown in Figure 18, the second parameter can be located within a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. The second parameter can indicate how a block is divided into multiple subblocks. For example, the second parameter may include a flag indicating whether the block is divided horizontally or vertically. The second parameter may also include a parameter indicating whether the block is divided into two or more subblocks. The second parameter is located following the first parameter in the bitstream, as shown in Figure 19.

[0239] Figure 30 illustrates the advantages of encoding the partition type before the partition direction compared to encoding the partition direction before the partition type. In this example, there is no need to encode the partition direction when the horizontal partition direction is disabled due to an unsupported size (16x2 pixels). In this example, the partition direction is determined as the vertical partition direction, and the horizontal partition direction is disabled. Encoding the partition type before the partition direction reduces the number of code bits used by encoding the partition direction compared to encoding the partition direction before the partition type.

[0240] Thus, based on the predetermined block division possible or impossible conditions, it may be determined whether each block in the horizontal and vertical directions can be divided. And when it is determined that only one of the horizontal and vertical directions can be divided, writing to the bitstream in the partition direction may be skipped. Further, when it is determined that both the horizontal and vertical directions cannot be divided, writing to the bitstream of the partition type in addition to the partition direction may be skipped.

[0241] The predetermined block division possible or impossible conditions are defined, for example, by size (number of pixels) or number of divisions. These block division possible or impossible conditions may be predefined in a standard specification. Also, the block division possible or impossible conditions may be included in a video parameter set, a sequence parameter set, a picture parameter set, a slice header, or a coding tree unit. The block division possible or impossible conditions may be fixed for all blocks, or may be dynamically switched according to characteristics of the blocks (e.g., luminance and chrominance blocks) or characteristics of the picture (e.g., I, P, B pictures).

[0242] In step S3003, the block is divided into sub-blocks using the identified partition type and the indicated partition direction. In step S3004, the divided block is encoded.

[0243] [Encoding device] FIG. 15 is a block diagram showing the structure of a video / image encoding device according to Embodiment 2 or 3.

[0244] The video encoding device 5000 is a device for encoding an input video / image block by block to generate an encoded output bitstream. As shown in FIG. 15, the video encoding device 5000 includes a conversion unit 5001, a quantization unit 5002, an inverse quantization unit 5003, an inverse conversion unit 5004, a block memory 5005, a frame memory 5006, an intra prediction unit 5007, an inter prediction unit 5008, an entropy encoding unit 5009, and a block partitioning determination unit 5010.

[0245] The input video is input to an adder, and the added value is output to the conversion unit 5001. The conversion unit 5001 converts the added value into frequency coefficients based on the block partition type and direction derived by the block partitioning determination unit 5010, and outputs the frequency coefficients to the quantization unit 5002. The block partition type and direction can be associated with a block partition mode, a block partition type, or a block partition direction. The quantization unit 5002 quantizes the input quantization coefficients and outputs the quantization values to the inverse quantization unit 5003 and the entropy encoding unit 5009.

[0246] The inverse quantization unit 5003 inverse-quantizes the quantization values output from the quantization unit 5002 and outputs the frequency coefficients to the inverse conversion unit 5004. The inverse conversion unit 5004 performs an inverse frequency conversion on the frequency coefficients based on the block partition type and direction derived by the block partitioning determination unit 5010, converts the frequency coefficients into sample values of the bitstream, and outputs the sample values to the adder.

[0247] The adder adds the sample values ​​of the bitstream output from the inverse transformer 5004 to the predicted video / image values ​​output from the intra / inter prediction units 5007 and 5008, and outputs the added value to the block memory 5005 or frame memory 5006 for further prediction. The block partitioning determination unit 5010 collects block information from the block memory 5005 or frame memory 5006 and derives the block partition type and direction, as well as parameters related to the block partition type and direction. Using the derived block partition type and direction, the block is divided into multiple subblocks. The intra / inter prediction units 5007 and 5008 search among the video / images stored in the block memory 5005, or the video / images in the frame memory 5006 reconstructed using the block partition type and direction derived by the block partitioning determination unit 5010, and estimate, for example, the video / image region most similar to the input video / image to be predicted.

[0248] The entropy coding unit 5009 encodes the quantized values ​​output from the quantization unit 5002, encodes the parameters from the block partitioning determination unit 5010, and outputs a bitstream.

[0249] [Decryption process] Figure 14 shows the video decoding process according to Embodiment 3.

[0250] First, in step S4001, the first parameter is read from the bitstream to identify the partition type for dividing the first block into subblocks from among multiple partition types.

[0251] In the next step, S4002, a second parameter indicating the partition direction is read from the bitstream. The second parameter follows the first parameter in the bitstream. The partition type, together with the partition direction, may constitute the partition mode. The partition type indicates the number of subblocks and the partition ratio for dividing the block.

[0252] Figure 29 shows an example of partition types and partition directions for dividing an NxN pixel block in Embodiment 3. In Figure 29, (1), (2), (3), and (4) are different partition types, (1a), (2a), (3a), and (4a) are partition modes in which the partition type differs in the vertical partition direction, and (1b), (2b), (3b), and (4b) are partition modes in which the partition type differs in the horizontal partition direction. As shown in Figure 29, when the partition ratio is 1:1 and the block is divided vertically into a symmetric binary tree (i.e., two subblocks), the NxN pixel block is divided using partition mode (1a). When the partition ratio is 1:1 and the block is divided horizontally into a symmetric binary tree (i.e., two subblocks), the block is divided using partition mode (1b). When the partition ratio is 1:3 and the vertical direction is divided into asymmetric binary trees (i.e., two subblocks), an NxN pixel block is partitioned using partition mode (2a). When the partition ratio is 1:3 and the horizontal direction is divided into asymmetric binary trees (i.e., two subblocks), an NxN pixel block is partitioned using partition mode (2b). When the partition ratio is 3:1 and the vertical direction is divided into asymmetric binary trees (i.e., two subblocks), an NxN pixel block is partitioned using partition mode (3a). When the partition ratio is 3:1 and the horizontal direction is divided into asymmetric binary trees (i.e., two subblocks), an NxN pixel block is partitioned using partition mode (3b). When the partition ratio is 1:2:1 and the vertical direction is divided into ternary trees (i.e., three subblocks), an NxN pixel block is partitioned using partition mode (4a). When the partition ratio is 1:2:1 and the data is divided horizontally into a ternary tree (i.e., three subblocks), an NxN pixel block is partitioned using partition mode (4b).

[0253] Figure 17 shows possible locations for the first parameter within a compressed video stream. As shown in Figure 17, the first parameter can be located within a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. The first parameter can indicate how a block is divided into multiple subblocks. For example, the first parameter may include an identifier for the partition type described above. For example, the first parameter may include a flag indicating whether the block is divided horizontally or vertically. The first parameter may also include a parameter indicating whether the block is divided into two or more subblocks.

[0254] Figure 18 shows possible locations for the second parameter within a compressed video stream. As shown in Figure 18, the second parameter can be located within a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. The second parameter can indicate how a block is divided into multiple subblocks. For example, the second parameter may include a flag indicating whether the block is divided horizontally or vertically. In other words, the second parameter may include a parameter indicating the partition direction. The second parameter may also include a parameter indicating whether the block is divided into two or more subblocks. The second parameter is located following the first parameter in the bitstream, as shown in Figure 19.

[0255] Figure 30 illustrates the advantages of encoding the partition type before the partition direction compared to encoding the partition direction before the partition type. In this example, there is no need to encode the partition direction when the horizontal partition direction is disabled due to an unsupported size (16x2 pixels). In this example, the partition direction is determined as the vertical partition direction, and the horizontal partition direction is disabled. Encoding the partition type before the partition direction reduces the number of code bits used by encoding the partition direction compared to encoding the partition direction before the partition type.

[0256] Thus, it may be determined whether a block is divisible in both the horizontal and vertical directions based on predetermined conditions for block divisibility. If it is determined that a block is divisible only in either the horizontal or vertical direction, reading from the bitstream in the partition direction may be skipped. Furthermore, if it is determined that a block is not divisible in either the horizontal or vertical direction, reading from the bitstream of the partition type may be skipped in addition to reading from the bitstream in the partition direction.

[0257] The predetermined conditions for whether a block can be divided or not are defined, for example, by size (number of pixels) or the number of divisions. These conditions for block division or not may be predefined in a standard. Furthermore, these conditions for block division or not may be included in a video parameter set, sequence parameter set, picture parameter set, slice header, or coding tree unit. These conditions for block division or not may be fixed for all blocks, or they may be dynamically switched depending on the characteristics of the block (e.g., luminance and chrominance blocks) or the characteristics of the picture (e.g., I, P, B pictures).

[0258] In step S4003, the block is divided into subblocks using the identified partition type and indicated partition direction. In step S4004, the divided blocks are decoded.

[0259] [Decoding device] Figure 16 is a block diagram showing the structure of a video / image decoding device according to Embodiment 2 or 3.

[0260] The video decoding device 6000 is a device for decoding an input encoded bitstream block by block and outputting video / images. As shown in Figure 16, the video decoding device 6000 comprises an entropy decoding unit 6001, an inverse quantization unit 6002, an inverse transformation unit 6003, a block memory 6004, a frame memory 6005, an intra prediction unit 6006, an inter prediction unit 6007, and a block division determination unit 6008.

[0261] The input encoded bitstream is input to the entropy decoding unit 6001. After the input encoded bitstream is input to the entropy decoding unit 6001, the entropy decoding unit 6001 decodes the input encoded bitstream, outputs the parameters to the block partitioning determination unit 6008, and outputs the decoded value to the inverse quantization unit 6002.

[0262] The inverse quantization unit 6002 inversely quantizes the decoded value and outputs the frequency coefficient to the inverse transform unit 6003. The inverse transform unit 6003 performs an inverse frequency transform on the frequency coefficient based on the block partition type and direction derived by the block partition determination unit 6008, converts the frequency coefficient into a sample value, and outputs the sample value to the adder. The block partition type and direction can be associated with the block partition mode, block partition type, or block partition direction. The adder adds the sample value to the predicted video / image value output from the intra / inter prediction units 6006 and 6007, outputs the added value to the display, and outputs the added value to the block memory 6004 or frame memory 6005 for further prediction. The block partition determination unit 6008 collects block information from the block memory 6004 or frame memory 6005 and derives the block partition type and direction using the parameters decoded by the entropy decoding unit 6001. Using the derived block partition type and direction, the block is divided into multiple subblocks. Furthermore, the intra / inter prediction units 6006 and 6007 predict the video / image region of the block to be decoded from the video / image stored in the block memory 6004, or from the video / image in the frame memory 6005 reconstructed with the block partition type and direction derived by the block partition determination unit 6008.

[0263] [Effects, etc.] As described above, the video encoding apparatus 5000 according to the present embodiment is an image encoding apparatus that encodes a block of an image, and includes a processor and a memory. The processor uses the memory to write a first parameter for identifying a partition type for dividing a block into two or more sub-blocks from among a plurality of partition types into a bit stream, and writes a second parameter indicating a partition direction, which follows the first parameter in the bit stream, into the bit stream. Using the identified partition type and the indicated partition direction, the block is divided into sub-blocks, and the divided block is encoded.

[0264] According to this, the second parameter indicating the partition direction can be written after the first parameter for identifying the partition type. Therefore, when there is no need to indicate the partition direction, the second parameter can be omitted, and the amount of code for the partition mode can be reduced to improve the compression efficiency.

[0265] Also, in the video encoding apparatus 5000 according to the present embodiment, when used together with the identified partition direction of the partition type, the block is divided into sub-blocks in the identified partition direction, and when different partition types are used together with the partition direction, the block may be divided into sub-blocks having different shapes, different heights or different widths.

[0266] According to this, the shape, height or width of the sub-block can be controlled by the partition type and the partition direction.

[0267] Furthermore, in the video encoding device 5000 according to this embodiment, the processor may further determine whether the block can be divided horizontally and vertically using the partition type identified by the first parameter, and if it is determined that only one of the horizontal and vertical directions can be divided, it may skip writing the second parameter to the bitstream and divide the block into subblocks using the identified partition type and the other of the horizontal and vertical directions.

[0268] According to this method, if block division is impossible in either the horizontal or vertical direction, the writing of the second parameter indicating the partition direction can be skipped. In other words, the second parameter can be omitted within the bitstream, reducing the amount of code related to the block division method and improving compression efficiency.

[0269] As described above, the video decoding device 6000 according to this embodiment is an image decoding device for decoding blocks of an image, comprising a processor and a memory, wherein the processor uses the memory to read from the bitstream a first parameter that identifies a partition type for dividing a block into two or more subblocks from among a plurality of partition types, reads from the bitstream a second parameter that indicates the partition direction and follows the first parameter in the bitstream, divides the block into subblocks using the identified partition type and the indicated partition direction, and decodes the divided block.

[0270] According to this, a second parameter indicating the partition direction can be written after the first parameter that identifies the partition type. Therefore, the second parameter can be omitted when it is not necessary to indicate the partition direction, thereby reducing the amount of code in the partition mode and improving compression efficiency.

[0271] Furthermore, in the video decoding device 6000 according to this embodiment, if a partition type is used together with an identified partition direction, the block is divided into subblocks along the identified partition direction, and if a different partition type is used together with a partition direction, the block may be divided into subblocks of different shapes, different heights, or different widths.

[0272] According to this, the shape, height, or width of the subblock can be controlled by the partition type and partition direction.

[0273] Furthermore, in the video decoding device 6000 according to this embodiment, the processor may further determine whether the block can be divided horizontally and vertically using the partition type identified by the first parameter, and if it is determined that only one of the horizontal and vertical directions can be divided, it may skip reading the second parameter from the bitstream and divide the block into subblocks using the identified partition type and the other of the horizontal and vertical directions as the partition direction.

[0274] According to this method, if block division is impossible in either the horizontal or vertical direction, the interpretation of the second parameter indicating the partition direction can be skipped. In other words, the second parameter can be omitted within the bitstream, reducing the amount of code related to the block division method and improving compression efficiency.

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

[0276] (Embodiment 4) In each of the above embodiments, each functional block can typically be implemented by an MPU and memory, etc. Furthermore, the processing performed by each functional block is typically implemented by a program execution unit such as a processor reading and executing software (program) recorded on a recording medium such as ROM. This software may be distributed by download, etc., or it may be recorded on a recording medium such as semiconductor memory and distributed. Of course, it is also possible to implement each functional block by hardware (dedicated circuitry).

[0277] Furthermore, the processing described in each embodiment may be implemented by centralized processing using a single device (system), or by distributed processing using multiple devices. Also, 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.

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

[0279] 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 a system using the same. The system is characterized by having an image encoding device using the image encoding method, an image decoding device using the image decoding method, and an image encoding and decoding device that includes both. Other configurations in the system can be appropriately modified as needed.

[0280] [Usage example] Figure 33 shows the overall configuration of the content supply system ex100 that realizes the content distribution service. The service area for the communication service is divided into cells of a desired size, and fixed radio stations, base stations ex106, ex107, ex108, ex109, and ex110, are installed in each cell.

[0281] 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 connect any combination of the above elements. Each device may be directly or indirectly connected to each other via a telephone network or short-range radio, etc., without going through the base stations ex106~ex110, which are fixed radio stations. In addition, the streaming server ex103 is 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. Furthermore, the streaming server ex103 is connected to terminals in a hotspot on an airplane ex117 via satellite ex116.

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

[0283] Camera ex113 is a device capable of taking still images and videos, such as a digital camera. Smartphone ex115 is a smartphone, mobile phone, or PHS (Personal Handyphone System) that supports mobile communication systems generally known as 2G, 3G, 3.9G, 4G, and the upcoming 5G.

[0284] Home appliance ex118 refers to appliances such as refrigerators or equipment included in household fuel cell cogeneration systems.

[0285] 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, the terminal (computer ex111, game console ex112, camera ex113, home appliance ex114, smartphone ex115, and terminal inside an airplane ex117, etc.) performs the encoding process described in each of the above embodiments on still images or video content captured by the user using the terminal, multiplexes the video data obtained by encoding with sound data encoded from the sound corresponding to the video, and transmits 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.

[0286] 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 functions as an image decoding device according to one aspect of this disclosure.

[0287] [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 an error occurs or the communication state changes due to an increase in 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.

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

[0289] 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 of the image, for example, by determining the importance of an object 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.

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

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

[0292] 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, or convert H.264 to H.265.

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

[0294] [3D, Multi-angle] In recent years, it has become increasingly common to integrate and utilize images or videos of different scenes, or the same scene, captured from different angles, using 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.

[0295] The server may not only encode 2D video but also encode still images automatically based on scene analysis of the video, or at a time specified by the user, and send them to the receiving terminal. Furthermore, if the server can obtain the relative positional relationship between the shooting terminals, it can generate a 3D shape of the scene based not only on 2D video but also on video of the same scene taken from different angles. The server may also separately encode 3D data generated by a point cloud, or it may select or reconstruct video to send to the receiving terminal from video taken by multiple terminals based on the results of recognizing or tracking a person or object using the 3D data.

[0296] In this way, users can enjoy scenes by arbitrarily selecting each video corresponding to each shooting terminal, or they can enjoy content in which video from an arbitrary viewpoint is extracted from 3D data reconstructed using multiple images or videos. Furthermore, just like the video, sound can also be collected from multiple different angles, and the server may multiplex and transmit sound from a specific angle or space in conjunction with the video.

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

[0298] 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 three-dimensional position or the user's viewpoint movement. The decoding device may acquire or store the virtual object information and three-dimensional data, generate a two-dimensional image according to the user's viewpoint movement, and create superimposed data by smoothly stitching them together. Alternatively, the decoding device may send the user's viewpoint movement to the server in addition to requesting virtual object information, and the server may create superimposed data from the three-dimensional data held by the server according to the received viewpoint movement, 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 three-dimensional 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.

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

[0300] In the future, it is expected that content will be seamlessly received by switching appropriate data for the connected communication, using distribution system standards such as MPEG-DASH, in situations where multiple short-range, medium-range, or long-range wireless communications are available both indoors and outdoors. This will allow users to freely select and switch in real time between decoding devices or display devices, such as displays installed indoors or outdoors, as well as their own terminals. Furthermore, decoding can be performed while switching between the decoding terminal and the display terminal based on the user's location information. This will make it possible to display map information on the wall or part of the ground of an adjacent building with a displayable device embedded, while traveling to a destination. It will also be 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.

[0301] [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 34. 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 characteristics of a temporally / spatially scalable 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 you want to watch the rest of a video that you were watching on your smartphone ex115 while traveling, on a device such as an internet TV when you get home, that device only needs to decode the same stream to a different layer, thus reducing the burden on the server.

[0302] Furthermore, in addition to the configuration described above, in which pictures are encoded for each layer and an enhancement layer exists above the base layer to achieve scalability, the enhancement layer may include metadata based on statistical information of the image, and the decoding side may generate high-quality content by super-resolution the picture in the base layer based on the metadata. Super-resolution may refer to either an improvement in the signal-to-noise ratio at the same resolution or an increase in 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.

[0303] Alternatively, the picture may be divided into tiles or similar structures according to the meaning of objects within the image, and the decoding side may select tiles to decode, thereby decoding only a portion of the area. Furthermore, by storing the attributes of objects (people, cars, balls, etc.) and their positions within the image (coordinate positions within the same image, etc.) as metadata, the decoding side can identify the location of a desired object based on the metadata and determine the tile containing that object. For example, as shown in Figure 35, the metadata is stored using a data storage structure different from pixel data, such as the SEI message in HEVC. This metadata indicates, for example, the position, size, or color of the main object.

[0304] Furthermore, metadata may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units. This allows the decryption side to obtain information such as the time when a specific person appears in the video, and by combining this with the picture-level information, it can identify the picture in which the object exists and the object's position within that picture.

[0305] [Web page optimization] Figure 36 shows an example of a web page display screen on a computer ex111, etc. Figure 37 shows an example of a web page display screen on a smartphone ex115, etc. As shown in Figures 36 and 37, 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) will display still images or iPictures from each content as linked images, display video such as a GIF animation using multiple still images or iPictures, or receive only the base layer and decode and display the video, until the user explicitly selects a linked image, or until the linked image approaches the center of the screen or the entire linked image is within the screen.

[0306] When a linked image is selected by the user, the display device prioritizes decoding 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 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 display time of the first picture (the delay from the start of content decoding to the start of display). Alternatively, the display device may deliberately ignore the reference relationships between pictures and roughly decode all B-pictures and P-pictures using forward references, then perform normal decoding as time passes and more pictures are received.

[0307] [Autonomous driving] Furthermore, when transmitting and receiving still images 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.

[0308] In this case, since the vehicle, drone, or airplane containing the receiving terminal is in motion, the receiving terminal can transmit its location information when a reception request is made, 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, or the state of the communication bandwidth.

[0309] As described above, the content supply system ex100 allows the client to receive, decode, and play back encoded information transmitted by the user in real time.

[0310] [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 also 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, with the following configuration.

[0311] 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 images 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 changing 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.

[0312] Furthermore, 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. The server may also 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- or post-processing step before encoding, the user can specify a person or background area that they want to process from a copyright perspective, and the server can replace the specified area with a different 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 their face.

[0313] Furthermore, because 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 can receive 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, it is possible to provide an experience where the video is rough when unselected or at the beginning of viewing, but gradually the stream becomes smarter and the image quality improves. In addition to scalable encoding, a similar experience can be provided even if the rough stream played the first time and the second stream encoded by referencing the first video are configured as a single stream.

[0314] [Other usage examples] Furthermore, these encoding or decoding processes are generally performed by the LSIex500 present in each terminal. The LSIex500 may be a single chip or a multi-chip configuration. 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.

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

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

[0317] [Hardware configuration] Figure 38 shows the smartphone ex115. Figure 39 shows an example of the 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, which is a touch panel, an audio output unit ex457, which is a speaker for outputting voice or sound, an audio input unit ex456, which is 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.

[0318] Furthermore, the main control unit ex460, which comprehensively controls the display unit ex458 and the operation unit ex466, is connected via the bus ex470 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.

[0319] The power supply circuit unit ex461, when the power key is turned on by the user, supplies power from the battery pack to each component, thereby starting up the smartphone ex115 and making it operational.

[0320] The smartphone ex115 performs tasks such as phone 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 audio signal picked up by the audio input unit ex456 is converted into a digital audio signal by the audio signal processing unit ex454, which is then subjected to spread spectrum processing by the modulation / demodulation unit ex452, and after digital-to-analog conversion and frequency conversion processing by the transmission / reception unit ex451, it is transmitted via the antenna ex450. Similarly, received data is amplified, subjected to frequency conversion and analog-to-digital conversion processing, despread spectrum processing by the modulation / demodulation unit ex452, converted into an analog audio signal by the audio signal processing unit ex454, and then output from the audio 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 by the operation unit ex466 of the main unit, and transmission and reception processing is performed in the same manner. 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 of the above embodiments, 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.

[0321] 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 to decode the multiplexed data, 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 embodiment above, and displays the video or still image contained in the linked video file from the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal, and audio is output from the audio output unit ex457. However, since real-time streaming is widespread, there may be situations where audio playback is socially inappropriate depending on the user's circumstances. Therefore, as an initial setting, it is preferable to have a configuration that plays only video data and not audio signals. Audio may be synchronized and played only when the user performs an action, such as clicking on video data.

[0322] Furthermore, although the smartphone ex115 was used as an example here, there are three possible implementation formats for terminals: a transceiver-type terminal that has both an encoder and a decoder, a transmitting terminal that has only an encoder, and a receiving terminal that has only a decoder. In addition, although it was explained that multiplexed data, in which audio data etc. is multiplexed with video data, is received or transmitted in a digital broadcasting system, the multiplexed data may also include text data related to the video in addition to audio data, or the video data itself may be received or transmitted instead of multiplexed data.

[0323] Although it was explained that the main control unit ex460, including the CPU, controls the encoding or decoding process, terminals often also 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]

[0324] It can be used in multimedia data encoding / decoding devices, particularly image and video encoding / decoding devices that use block encoding / decoding. [Explanation of Symbols]

[0325] 100 Encoding device 102 Division 104 Subtraction Unit 106, 5001 Conversion Unit 108, 5002 Quantization section 110, 5009 Entropy coding unit 112, 5003, 6002 Inverse quantization section 114, 5004, 6003 Inverse Transformer 116 Addition section 118, 5005, 6004 block memory 120 Loop filter section 122, 5006, 6005 frame memory 124, 5007, 6006 Intra Prediction Unit 126, 5008, 6007 Interpretation Unit 128 Prediction Control Unit 200 Decoders 202, 6001 Entropy Decoding Unit 204 Inverse quantization section 206 Inverse Transform Section 208 Addition section 210 block memory 212 Loop filter section 214 frame memory 216 Intra Prediction Unit 218 Interpretation Section 220 Prediction Control Unit 5000 Video Encoding Devices 5010, 6008 Block division determination section 6000 Video Decoder

Claims

1. Circuits and, The circuit comprises a memory coupled to the aforementioned circuit, In operation, the aforementioned circuit Take a block from the coding tree unit (CTU), Using the first partition mode, the block is divided into a plurality of subblocks in the first direction, Encode the aforementioned multiple subblocks, In the block division using the first partition mode, based on the parameters placed within the encoding tree unit relating to the partition mode to be written to the bitstream, If the size of the block is N x 2N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size N / 4 x 2N pixels is selected, and the division of the block into two subblocks of size N / 2 x 2N pixels is not selected. The first partition mode includes dividing the block into two subblocks of N / 4x2N pixel size and one subblock of N / 2x2N pixel size, If the size of the block is 2N x N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size 2N x N / 4 pixels is selected, and the division of the block into two subblocks of size 2N x N / 2 pixels is not selected. The first partition mode includes dividing the block into two subblocks of size 2NxN / 4 pixels and one subblock of size 2NxN / 2 pixels. Image encoding device.

2. Take a block from the coding tree unit (CTU), Using the first partition mode, the block is divided into a plurality of subblocks in the first direction, Encode the aforementioned multiple subblocks, In the block division using the first partition mode, based on the parameters placed within the encoding tree unit relating to the partition mode to be written to the bitstream, If the size of the block is N x 2N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size N / 4 x 2N pixels is selected, and the division of the block into two subblocks of size N / 2 x 2N pixels is not selected. The first partition mode includes dividing the block into two subblocks of N / 4x2N pixel size and one subblock of N / 2x2N pixel size, If the size of the block is 2N x N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size 2N x N / 4 pixels is selected, and the division of the block into two subblocks of size 2N x N / 2 pixels is not selected. The first partition mode includes dividing the block into two subblocks of size 2NxN / 4 pixels and one subblock of size 2NxN / 2 pixels. Encoding method.

3. Circuits and, The circuit comprises a memory coupled to the aforementioned circuit, In operation, the aforementioned circuit Take a block from the coding tree unit (CTU), Using the first partition mode, the block is divided into a plurality of subblocks in the first direction, The plurality of subblocks are decoded, In the block division using the first partition mode, based on the parameters located within the coding tree unit relating to the partition mode read from the bitstream, If the size of the block is N x 2N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size N / 4 x 2N pixels is selected, and the division of the block into two subblocks of size N / 2 x 2N pixels is not selected. The first partition mode includes dividing the block into two subblocks of N / 4x2N pixel size and one subblock of N / 2x2N pixel size, If the size of the block is 2N x N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size 2N x N / 4 pixels is selected, and the division of the block into two subblocks of size 2N x N / 2 pixels is not selected. The first partition mode includes dividing the block into two subblocks of size 2NxN / 4 pixels and one subblock of size 2NxN / 2 pixels. Image decoding device.

4. Take a block from the coding tree unit (CTU), Using the first partition mode, the block is divided into a plurality of subblocks in the first direction, The plurality of subblocks are decoded, In the block division using the first partition mode, based on the parameters located within the coding tree unit relating to the partition mode read from the bitstream, If the size of the block is N x 2N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size N / 4 x 2N pixels is selected, and the division of the block into two subblocks of size N / 2 x 2N pixels is not selected. The first partition mode includes dividing the block into two subblocks of N / 4x2N pixel size and one subblock of N / 2x2N pixel size, If the size of the block is 2N x N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size 2N x N / 4 pixels is selected, and the division of the block into two subblocks of size 2N x N / 2 pixels is not selected. The first partition mode includes dividing the block into two subblocks of size 2NxN / 4 pixels and one subblock of size 2NxN / 2 pixels. Decryption method.

5. Circuits and, The circuit comprises a memory coupled to the aforementioned circuit, In operation, the aforementioned circuit Take a block from the coding tree unit (CTU), Using the first partition mode, the block is divided into a plurality of subblocks in the first direction, Encode the aforementioned multiple subblocks, In the block division using the first partition mode, based on the parameters placed within the encoding tree unit relating to the partition mode to be written to the bitstream, If the size of the block is N x 2N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size N / 4 x 2N pixels is selected, and the division of the block into two subblocks of size N / 2 x 2N pixels is not selected. The first partition mode includes dividing the block into two subblocks of N / 4x2N pixel size and one subblock of N / 2x2N pixel size, If the size of the block is 2N x N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size 2N x N / 4 pixels is selected, and the division of the block into two subblocks of size 2N x N / 2 pixels is not selected. The first partition mode includes dividing the block into two subblocks of size 2NxN / 4 pixels and one subblock of size 2NxN / 2 pixels, A bitstream containing parameters related to the partition mode is transmitted. Bitstream transmitter.

6. Take a block from the coding tree unit (CTU), Using the first partition mode, the block is divided into a plurality of subblocks in the first direction, Encode the aforementioned multiple subblocks, In the block division using the first partition mode, based on the parameters placed within the encoding tree unit relating to the partition mode to be written to the bitstream, If the size of the block is N x 2N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size N / 4 x 2N pixels is selected, and the division of the block into two subblocks of size N / 2 x 2N pixels is not selected. The first partition mode includes dividing the block into two subblocks of N / 4x2N pixel size and one subblock of N / 2x2N pixel size, If the size of the block is 2N x N pixels, the first direction is along 2N pixels, and N is an integer, then the division of the block into a plurality of subblocks including at least one subblock of size 2N x N / 4 pixels is selected, and the division of the block into two subblocks of size 2N x N / 2 pixels is not selected. The first partition mode includes dividing the block into two subblocks of size 2NxN / 4 pixels and one subblock of size 2NxN / 2 pixels, A bitstream containing parameters related to the partition mode is transmitted. Bitstream transmission method.