Encoding device and decoding device
The encoding and decoding devices optimize filter processing to enhance efficiency and reduce circuit scale by strategically selecting filters for deblocking, addressing challenges in H.265/HEVC encoding methods.
Patent Information
- Application Number
- JP2025079177
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-05-23
- Filing Date
- 2025-05-12
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2039-05-16
AI Technical Summary
Existing encoding methods, such as H.265/HEVC, face challenges in improving encoding efficiency, image quality, and reducing circuit scale while managing processing amounts.
An encoding and decoding device that determines a filter for deblocking filter processing from multiple filters, including a first filter using M pixels above and below the block boundary, a second filter using N pixels above and below, and a third filter using a first and second pixel, to reduce the number of pixels required for processing, thereby reducing memory data.
This approach enhances encoding efficiency, reduces processing and circuit scale, and improves encoding/decoding speed by optimizing filter selection and usage.
Smart Images

Figure 2025109813000001_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an encoding device, a decoding device, an encoding method, and a decoding method.
Background Art
[0002] Conventionally, H.265 exists as a standard for encoding moving images. H.265 is also called HEVC (High Efficiency Video Coding).
Prior Art Documents
Non-Patent Documents
[0003]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In such an encoding method, a new method is desired for improving encoding efficiency, improving image quality, reducing circuit scale, etc.
[0005] Each of the configurations or methods disclosed in the embodiments or parts thereof in the present disclosure can contribute to at least any one of, for example, improvement of encoding efficiency, reduction of encoding / decoding processing amount, reduction of circuit scale, improvement of encoding / decoding speed, and appropriate selection of components / operations such as filters, blocks, sizes, motion vectors, reference pictures, reference blocks, etc. in encoding and decoding.
[0006] Note that the present disclosure also includes disclosure of configurations or methods that can provide benefits other than those described above. For example, a configuration or method for improving encoding efficiency while suppressing an increase in processing amount.
Means for Solving the Problems
[0007] An encoding device according to an aspect of the present disclosure includes a circuit and a memory. The circuit determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter, a second filter, and a third filter by using the memory, and performs the deblocking filter processing at a block boundary by using the determined filter. The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses N (N is an integer larger than M) pixels above the block boundary and N pixels below the block boundary. The third filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a first plurality of candidate values, and the number of the second pixels is any one of a second plurality of candidate values. Each of the first plurality of candidate values and each of the second plurality of candidate values is N or a value larger than N. When the block boundary is at a predetermined position, N is used for the number of the first pixels.
[0008] The decoding device according to one aspect of the present disclosure includes a circuit and a memory. The circuit uses the memory to determine a filter to be used for deblocking filter processing from a plurality of filters including a first filter, a second filter, and a third filter, and performs the deblocking filter processing at a block boundary using the determined filter. The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses N (N is an integer greater than M) pixels above the block boundary and N pixels below the block boundary. The third filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a first plurality of candidate values, and the number of the second pixels is any one of a second plurality of candidate values. Each of the first plurality of candidate values and each of the second plurality of candidate values is N or a value greater than N. When the block boundary is at a predetermined position, N is used for the number of the first pixels.
[0009] Note that these general or specific aspects may be implemented by a system, an apparatus, a method, an integrated circuit, a computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, or may be implemented by any combination of a system, an apparatus, a method, an integrated circuit, a computer program, and a recording medium.
Advantages of the Invention
[0010] The present disclosure can provide, for example, an encoding device, a decoding device, an encoding method, or a decoding method that can contribute to at least any one of improving encoding efficiency, reducing encoding / decoding processing amount, reducing circuit scale, improving encoding / decoding speed, and appropriately selecting components / operations such as filters, blocks, sizes, motion vectors, reference pictures, and reference blocks in encoding and decoding.
[0011] Note that the present disclosure also includes disclosure of configurations or methods that can provide benefits other than those described above. For example, a configuration or method that improves coding efficiency while suppressing an increase in throughput, and the like.
Brief Description of Drawings
[0012]
Figure 1
Figure 2
Figure 3
Figure 4A
Figure 4B
Figure 4C
Figure 5A
Figure 5B
Figure 5C
Figure 5D
Figure 6
Figure 7
Figure 8
Figure 9A
Figure 9B
Figure 9C
Figure 9D
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
DETAILED DESCRIPTION OF THE INVENTION
[0013] An encoding apparatus according to an aspect of the present disclosure includes a circuit and a memory. The circuit determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter and a second filter using the memory, and performs the deblocking filter processing at a block boundary using the determined filter. The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a first plurality of candidate values, the number of the second pixels is any one of a second plurality of candidate values, and each of the first plurality of candidate values and each of the second plurality of candidate values is M or a value greater than M.
[0014] According to this, the encoding apparatus can reduce the number of pixels above or to the left of the block boundary used for deblocking filter processing, so there is a possibility of reducing the amount of data held in the memory. Note that the left pixels may be used instead of the upper pixels, and the right pixels may be used instead of the lower pixels.
[0015] For example, the second filter may be such that the number of the first pixels and the number of the second pixels may be the same or different.
[0016] For example, each of the first plurality of candidate values and each of the second plurality of candidate values may be a value of 4 or greater than 4.
[0017] For example, among the plurality of filters, filters other than the second filter may use the same number of pixels above and below the block boundary.
[0018] For example, the maximum value of the possible values of the number of the first pixels may be limited according to whether the position of the block boundary is a predetermined position.
[0019] For example, the predetermined position may be the upper end of a coding tree unit (CTU).
[0020] Note that when applying the second filter to vertical and horizontal boundaries, the limitation on the number of pixels used for the second filter may be performed only for the vertical boundary, or may be performed for both the vertical and horizontal boundaries. In other words, the predetermined position may be only the upper end of the CTU, or may be the upper end or the lower end of the CTU.
[0021] For example, the predetermined position may be the upper end of a coding unit (CU).
[0022] Note that when applying the second filter to vertical and horizontal boundaries, the limitation on the number of pixels used for the second filter may be performed only for the vertical boundary, or may be performed for both the vertical and horizontal boundaries. In other words, the predetermined position may be only the upper end of the CU, or may be the upper end or the lower end of the CU.
[0023] For example, the maximum value of the possible values of the number of the first pixels may be equal to or less than the number of pixels above the block boundary used by a filter that uses a larger number of pixels than the second filter among the plurality of filters.
[0024] For example, the maximum value that the number of the first pixels can take may be equal to or less than the number of pixels above the block boundary in the process that uses the most pixels above the block boundary among the processes included in the loop filter process including the deblocking filter process, excluding the second filter.
[0025] For example, when the number of the first pixels is different from the number of the second pixels, the filter tap length across the block boundary of the second filter may be different.
[0026] For example, when the number of the first pixels is different from the number of the second pixels, the second filter generates third pixels consecutive to the upper side of the first pixel using the first pixel, and is a filter that uses the first pixel, the second pixel, and the third pixel, and the sum of the number of the first pixels and the number of the third pixels may be equal to the number of the second pixels.
[0027] The decoding device according to one aspect of the present disclosure includes a circuit and a memory. The circuit determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter and a second filter using the memory, and performs the deblocking filter processing on a block boundary using the determined filter. The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a first plurality of candidate values, and the number of the second pixels is any one of a second plurality of candidate values. Each of the first plurality of candidate values and each of the second plurality of candidate values are values equal to or greater than M.
[0028] According to this, the decoding device can reduce the number of pixels above or to the left of the block boundary used for deblocking filter processing, so there is a possibility of reducing the amount of data held in the memory.
[0029] For example, the second filter may be applicable whether the number of the first pixels is the same as the number of the second pixels or different from the number of the second pixels.
[0030] For example, each of the first plurality of candidate values and each of the second plurality of candidate values may be 4 or a value greater than 4.
[0031] For example, among the plurality of filters, filters other than the second filter may use the same number of pixels above and below the block boundary.
[0032] For example, the maximum value of the possible values of the number of the first pixels may be limited according to whether the position of the block boundary is a predetermined position or not.
[0033] For example, the predetermined position may be the upper end of a coding tree unit (CTU).
[0034] Note that when applying the second filter to the vertical boundary and the horizontal boundary, the limitation on the number of pixels used for the second filter may be performed only for the vertical boundary or for both the vertical boundary and the horizontal boundary. In other words, the predetermined position may be only the upper end of the CTU or the upper end or the lower end of the CTU.
[0035] For example, the predetermined position may be the upper end of a coding unit (CU).
[0036] Note that when applying the second filter to the vertical boundary and the horizontal boundary, the limitation on the number of pixels used for the second filter may be performed only for the vertical boundary or for both the vertical boundary and the horizontal boundary. In other words, the predetermined position may be only the upper end of the CU or the upper end or the lower end of the CU.
[0037] For example, the maximum value that the number of the first pixels can take may be equal to or less than the number of pixels above the block boundary used by a filter that uses a larger number of pixels next to the second filter among the plurality of filters.
[0038] For example, the maximum value that the number of the first pixels can take may be equal to or less than the number of pixels above the block boundary of the process that uses the largest number of pixels above the block boundary among the processes excluding the second filter from the processes included in the loop filter process including the deblocking filter process.
[0039] For example, when the number of the first pixels and the number of the second pixels are different, the filter tap lengths on both sides of the block boundary of the second filter may be different.
[0040] For example, when the number of the first pixels and the number of the second pixels are different, the second filter generates third pixels continuous above the first pixels using the first pixels, and is a filter that uses the first pixels, the second pixels, and the third pixels, and the sum of the number of the first pixels and the number of the third pixels may be equal to the number of the second pixels.
[0041] An encoding method according to an aspect of the present disclosure determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter and a second filter, and performs the deblocking filter processing on a block boundary using the determined filter. The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a first plurality of candidate values, and the number of the second pixels is any one of a second plurality of candidate values. Each of the first plurality of candidate values and each of the second plurality of candidate values is a value equal to or greater than M.
[0042] According to this, since the encoding method can reduce the number of pixels above or to the left of the block boundary used for deblocking filter processing, there is a possibility of reducing the amount of data held in the memory.
[0043] A decoding method according to an aspect of the present disclosure determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter and a second filter, and performs the deblocking filter processing on a block boundary using the determined filter. The first filter is a filter that uses M (where M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a first plurality of candidate values, the number of the second pixels is any one of a second plurality of candidate values, and each of the first plurality of candidate values and each of the second plurality of candidate values is a value equal to or greater than M.
[0044] According to this, since the decoding method can reduce the number of pixels above or to the left of the block boundary used for deblocking filter processing, there is a possibility of reducing the amount of data held in the memory.
[0045] Furthermore, these general or specific aspects may be implemented by a system, apparatus, method, integrated circuit, computer program, or a non-transitory recording medium such as a computer-readable CD-ROM, and may be implemented by any combination of a system, apparatus, method, integrated circuit, computer program, and recording medium.
[0046] Hereinafter, embodiments will be specifically described with reference to the drawings.
[0047] Note that all the embodiments described below show comprehensive or specific examples. The numerical values, shapes, materials, components, the arrangement positions and connection forms of the components, steps, the order of steps, etc. shown in the following embodiments are merely examples and are not intended to limit the scope of the claims. Also, among the components in the following embodiments, the components not described in the independent claims indicating the top-level concept are described as optional components.
[0048] (Embodiment 1) First, as an example of an encoding device and a decoding device to which the processes and / or configurations described in each aspect of the present disclosure to be described later are applicable, an overview of Embodiment 1 will be described. However, Embodiment 1 is merely an example of an encoding device and a decoding device to which the processes and / or configurations described in each aspect of the present disclosure are applicable, and the processes and / or configurations described in each aspect of the present disclosure can also be implemented in encoding devices and decoding devices different from Embodiment 1.
[0049] When applying the processes and / or configurations described in each aspect of the present disclosure to Embodiment 1, for example, any of the following may be performed.
[0050] (1) For the encoding device or the decoding device of Embodiment 1, among the plurality of components constituting the encoding device or the decoding device, replacing the component corresponding to the component described in each aspect of the present disclosure with the component described in each aspect of the present disclosure (2) After making arbitrary changes such as addition, replacement, deletion, etc. of the functions or processes implemented for some of the components among the plurality of components constituting the encoding device or the decoding device of Embodiment 1, replacing the component corresponding to the component described in each aspect of the present disclosure with the component described in each aspect of the present disclosure For the method implemented by the encoding device or decoding device of Embodiment 1, after adding processing and / or making any changes such as replacement or deletion to some of the multiple processes included in the method, replace the process corresponding to the process described in each aspect of the present disclosure with the process described in each aspect of the present disclosure. (4) Combine and implement some of the components that make up the encoding device or decoding device of Embodiment 1 with the components described in each aspect of the present disclosure, components that have some of the functions of the components described in each aspect of the present disclosure, or components that implement some of the processes implemented by the components described in each aspect of the present disclosure. (5) Combine and implement components that have some of the functions of some of the components that make up the encoding device or decoding device of Embodiment 1, or components that implement some of the processes implemented by some of the components that make up the encoding device or decoding device of Embodiment 1, with the components described in each aspect of the present disclosure, components that have some of the functions of the components described in each aspect of the present disclosure, or components that implement some of the processes implemented by the components described in each aspect of the present disclosure. (6) For the method implemented by the encoding device or decoding device of Embodiment 1, replace the process corresponding to the process described in each aspect of the present disclosure with the process described in each aspect of the present disclosure among the multiple processes included in the method. (7) Implement some of the multiple processes included in the method implemented by the encoding device or decoding device of Embodiment 1 in combination with the processes described in each aspect of the present disclosure.
[0051] Note that the implementation manners of the processes and / or configurations described in each aspect of the present disclosure are not limited to the above examples. For example, it may be implemented in a device used for a purpose different from the moving image / image encoding device or moving image / image decoding device disclosed in Embodiment 1, or the processes and / or configurations described in each aspect may be implemented alone. Also, the processes and / or configurations described in different aspects may be implemented in combination.
[0052] [Overview of the Encoding Device] First, an overview of the encoding device according to Embodiment 1 will be described. FIG. 1 is a block diagram showing the functional configuration of an encoding device 100 according to Embodiment 1. The encoding device 100 is a moving image / image encoding device that encodes moving images / images in block units.
[0053] As shown in FIG. 1, the encoding device 100 is a device that encodes an image in block units, and includes a division unit 102, a subtraction unit 104, a conversion unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse conversion unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.
[0054] The encoding device 100 is realized, for example, by a general-purpose processor and a memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the division unit 102, the subtraction unit 104, the conversion unit 106, the quantization unit 108, the entropy encoding unit 110, the inverse quantization unit 112, the inverse conversion unit 114, the addition unit 116, the loop filter unit 120, the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128. Further, the encoding device 100 may be realized as one or more dedicated electronic circuits corresponding to the division unit 102, the subtraction unit 104, the conversion unit 106, the quantization unit 108, the entropy encoding unit 110, the inverse quantization unit 112, the inverse conversion unit 114, the addition unit 116, the loop filter unit 120, the intra prediction unit 124, the inter prediction unit 126, and the prediction control unit 128.
[0055] Next, each component included in the encoding device 100 will be described.
[0056] [Division Unit] The splitting unit 102 splits each picture included in the input moving image into a plurality of blocks and outputs each block to the subtraction unit 104. For example, the splitting unit 102 first splits the picture into blocks of a fixed size (for example, 128x128). Such blocks of a fixed size are sometimes referred to as Coding Tree Units (CTUs). Then, the splitting unit 102 splits each of the blocks of a fixed size into blocks of a variable size (for example, 64x64 or less) based on recursive quadtree and / or binary tree block splitting. Such blocks of a variable size are sometimes referred to as Coding Units (CUs), Prediction Units (PUs), or Transformation Units (TUs). Note that in this embodiment, it is not necessary to distinguish between CUs, PUs, and TUs, and some or all of the blocks in the picture may be processing units for CUs, PUs, and TUs.
[0057] FIG. 2 is a diagram showing an example of block splitting in Embodiment 1. In FIG. 2, solid lines represent block boundaries by quadtree block splitting, and dashed lines represent block boundaries by binary tree block splitting.
[0058] Here, the block 10 is a square block of 128x128 pixels (128x128 block). This 128x128 block 10 is first split into four square 64x64 blocks (quadtree block splitting).
[0059] The upper-left 64x64 block is further vertically split into two rectangular 32x64 blocks, and the left 32x64 block is further vertically split into two rectangular 16x64 blocks (binary tree block splitting). As a result, the upper-left 64x64 block is split into two 16x64 blocks 11, 12 and a 32x64 block 13.
[0060] The upper-right 64x64 block is horizontally split into two rectangular 64x32 blocks 14, 15 (binary tree block splitting).
[0061] The bottom-left 64x64 block is divided into four square 32x32 blocks (quad-tree block division). Among the four 32x32 blocks, the top-left block and the bottom-right block are further divided. The top-left 32x32 block is vertically divided into two rectangular 16x32 blocks, and the right 16x32 block is further horizontally divided into two 16x16 blocks (binary-tree block division). The 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 16 16x32 blocks, two 16x16 blocks 17 and 18, two 32x32 blocks 19 and 20, and two 32x16 blocks 21 and 22.
[0062] The bottom-right 64x64 block 23 is not divided.
[0063] As described above, in FIG. 2, block 10 is divided into 13 variable-size blocks 11 to 23 based on recursive quad-tree and binary-tree block division. Such division is sometimes called QTBT (quad-tree plus binary tree) division.
[0064] Note that in FIG. 2, one block is divided into four or two blocks (quad-tree or binary-tree block division), but the division is not limited to this. For example, one block may be divided into three blocks (ternary-tree block division). Such division including ternary-tree block division is sometimes called MBT (multi type tree) division.
[0065] [Subtraction unit] The subtraction unit 104 subtracts the predicted signal (predicted sample) from the original signal (original sample) in units of the blocks divided by the division unit 102. That is, 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). Then, the subtraction unit 104 outputs the calculated prediction error to the conversion unit 106.
[0066] The original signal is the input signal of the encoding device 100 and is a signal representing the images of each picture constituting a moving image (for example, a luma signal and two chroma signals). Hereinafter, the signal representing an image may also be referred to as a sample.
[0067] [Conversion unit] The conversion unit 106 converts the prediction error in the spatial domain into conversion coefficients in the frequency domain and outputs the conversion coefficients to the quantization unit 108. Specifically, the conversion unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the prediction error in the spatial domain.
[0068] Note that the conversion unit 106 may adaptively select a conversion type from a plurality of conversion types and convert the prediction error into conversion coefficients using a transform basis function corresponding to the selected conversion type. Such a conversion may be called EMT (explicit multiple core transform) or AMT (adaptive multiple transform).
[0069] The plurality of conversion types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. FIG. 3 is a table showing the conversion basis functions corresponding to each conversion type. In FIG. 3, N indicates the number of input pixels. The selection of the conversion type from among these plurality of conversion types may depend on, for example, the type of prediction (intra prediction and inter prediction), or may depend on the intra prediction mode.
[0070] Information indicating whether to apply such EMT or AMT (for example, called an AMT flag) and information indicating the selected conversion type are signaled at the CU level. Note that the signaling of this information does not have to be limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).
[0071] Further, the conversion unit 106 may re-convert the conversion coefficient (conversion result). Such re-conversion may be referred to as AST (adaptive secondary transform) or NSST (non-separable secondary transform). For example, the conversion unit 106 performs re-conversion for each sub-block (e.g., 4x4 sub-block) included in the block of conversion coefficients corresponding to the intra prediction error. Information indicating whether to apply NSST and information regarding the conversion matrix used for NSST are signaled at the CU level. Note that the signaling of these pieces of information is not necessarily limited to the CU level and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).
[0072] Here, separable conversion is a method of performing multiple conversions by separating for each direction by the number of dimensions of the input, and non-separable conversion is a method of treating two or more dimensions as one dimension when the input is multi-dimensional and performing the conversion collectively.
[0073] For example, as an example of non-separable conversion, when the input is a 4×4 block, it is regarded as an array having 16 elements, and a conversion process is performed on the array with a 16×16 conversion matrix.
[0074] Similarly, after regarding a 4×4 input block as an array having 16 elements, a method of performing a plurality of Givens rotations on the array (Hypercube Givens Transform) is also an example of non-separable conversion.
[0075] [Quantization Unit] The quantization unit 108 quantizes the transform coefficients output from the conversion unit 106. Specifically, the quantization unit 108 scans the transform coefficients of the current block in a predetermined scanning order, and quantizes the scanned transform coefficients based on the quantization parameter (QP) corresponding to the scanned transform coefficients. Then, the quantization unit 108 outputs the quantized transform coefficients (hereinafter referred to as quantization coefficients) of the current block to the entropy encoding unit 110 and the inverse quantization unit 112.
[0076] The predetermined order is an order for quantization / inverse quantization of transform coefficients. For example, the predetermined scanning order is defined in ascending order of frequency (from low frequency to high frequency) or descending order of frequency (from high frequency to low frequency).
[0077] The quantization parameter is a parameter that defines the quantization step (quantization width). For example, as the value of the quantization parameter increases, the quantization step also increases. That is, as the value of the quantization parameter increases, the quantization error increases.
[0078] [Entropy Encoding Unit] The entropy encoding unit 110 generates an encoded signal (encoded bit stream) by performing variable-length encoding on the quantization coefficients that are inputs from the quantization unit 108. Specifically, the entropy encoding unit 110, for example, binarizes the quantization coefficients and performs arithmetic encoding on the binary signal.
[0079] [Inverse Quantization Unit] The inverse quantization unit 112 inverse-quantizes the quantization coefficients that are inputs from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse-quantizes the quantization coefficients of the current block in a predetermined scanning order. Then, the inverse quantization unit 112 outputs the inverse-quantized transform coefficients of the current block to the inverse conversion unit 114.
[0080] [Inverse Conversion Unit] The inverse transform unit 114 restores the prediction error by inversely transforming the transform coefficients that are the input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 performs an inverse transform corresponding to the transform by the transform unit 106 on the transform coefficients, thereby restoring the prediction error of the current block. Then, the inverse transform unit 114 outputs the restored prediction error to the addition unit 116.
[0081] Note that since information is lost due to quantization, the restored prediction error does not match the prediction error calculated by the subtraction unit 104. That is, the restored prediction error includes a quantization error.
[0082] [Addition unit] The addition unit 116 reconstructs the current block by adding the prediction error that is the input from the inverse transform unit 114 and the prediction sample that is the input from the prediction control unit 128. Then, the addition unit 116 outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block may also be called a local decoding block.
[0083] [Block memory] The block memory 118 is a storage unit for storing blocks within the coded target picture (hereinafter referred to as the current picture), which are blocks referred to in intra prediction. Specifically, the block memory 118 stores the reconstructed block output from the addition unit 116.
[0084] [Loop filter unit] The loop filter unit 120 applies a loop filter to the block reconstructed by the addition unit 116 and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (in-loop filter) used within the coding loop, and includes, for example, a deblocking filter (DF), a sample adaptive offset (SAO), and an adaptive loop filter (ALF).
[0085] In ALF, a least-squares error filter for removing encoding distortion is applied, and for example, for each 2x2 sub-block within a current block, one filter selected from a plurality of filters is applied based on the direction and activity of the local gradient.
[0086] Specifically, first, sub-blocks (for example, 2x2 sub-blocks) are classified into a plurality of classes (for example, 15 or 25 classes). The classification of sub-blocks is performed based on the direction and activity of the gradient. For example, a classification value C (for example, C = 5D + A) is calculated using the gradient direction value D (for example, 0 to 2 or 0 to 4) and the gradient activity value A (for example, 0 to 4). Then, based on the classification value C, the sub-blocks are classified into a plurality of classes (for example, 15 or 25 classes).
[0087] The gradient direction value D is derived, for example, by comparing the gradients in a plurality of directions (for example, horizontal, vertical, and two diagonal directions). Also, the gradient activity value A is derived, for example, by adding the gradients in a plurality of directions and quantizing the addition result.
[0088] Based on the results of such classification, a filter for the sub-block is determined from among a plurality of filters.
[0089] As the shape of the filter used in ALF, for example, a circularly symmetric shape is utilized. FIGS. 4A to 4C are diagrams showing a plurality of examples of the shape of the filter used in ALF. FIG. 4A shows a 5x5 diamond-shaped filter, FIG. 4B shows a 7x7 diamond-shaped filter, and FIG. 4C shows a 9x9 diamond-shaped filter. Information indicating the shape of the filter is signaled at the picture level. Note that the signaling of information indicating the shape of the filter is not necessarily limited to the picture level and may be at other levels (for example, sequence level, slice level, tile level, CTU level, or CU level).
[0090] The on / off of ALF is determined at, for example, the picture level or the CU level. For example, for luminance, it is determined whether to apply ALF at the CU level, and for chrominance difference, it is determined whether to apply ALF at the picture level. The information indicating the on / off of ALF is signaled at the picture level or the CU level. Note that the signaling of the information indicating the on / off of ALF does not necessarily have to be limited to the picture level or the CU level, and it may be at other levels (e.g., sequence level, slice level, tile level, or CTU level).
[0091] The coefficient sets of a plurality of selectable filters (e.g., filters up to 15 or 25) are signaled at the picture level. Note that the signaling of the coefficient sets does not necessarily have to be limited to the picture level, and it may be at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).
[0092] [Frame Memory] The frame memory 122 is a storage unit for storing reference pictures used for inter prediction, and may also be called a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120.
[0093] [Intra Prediction Unit] The intra prediction unit 124 generates a prediction signal (intra prediction signal) by performing intra prediction (also called in-picture prediction) of the current block with reference to the block in the current picture stored in the block memory 118. Specifically, the intra prediction unit 124 generates an intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance difference values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 128.
[0094] For example, the intra prediction unit 124 performs intra prediction using one of a plurality of predefined intra prediction modes. The plurality of intra prediction modes includes one or more non-directional prediction modes and a plurality of directional prediction modes.
[0095] The one or more non-directional prediction modes include, for example, the Planar prediction mode and the DC prediction mode defined in the H.265 / HEVC (High-Efficiency Video Coding) standard (Non-Patent Document 1).
[0096] The plurality of directional prediction modes includes, for example, the 33-direction prediction mode defined in the H.265 / HEVC standard. Note that the plurality of directional prediction modes may further include a 32-direction prediction mode (a total of 65 directional prediction modes) in addition to the 33 directions. FIG. 5A is a diagram showing 67 intra prediction modes (2 non-directional prediction modes and 65 directional prediction modes) in intra prediction. The solid arrows represent the 33 directions defined in the H.265 / HEVC standard, and the dashed arrows represent the additional 32 directions.
[0097] In addition, in the intra prediction of a chrominance block, a luminance block may be referred to. That is, based on the luminance component of the current block, the chrominance component of the current block may be predicted. Such intra prediction is sometimes called CCLM (cross-component linear model) prediction. An intra prediction mode of a chrominance block that refers to such a luminance block (for example, called the CCLM mode) may be added as one of the intra prediction modes of the chrominance block.
[0098] The intra prediction unit 124 may correct the pixel value after intra prediction based on the gradients of the reference pixels in the horizontal / vertical directions. Such intra prediction with such correction is sometimes called PDPC (position dependent intra prediction combination). Information indicating the presence or absence of the application of PDPC (for example, called a PDPC flag) is signaled at, for example, the CU level. Note that the signaling of this information does not have to be limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, or CTU level).
[0099] [Inter prediction unit] The inter prediction unit 126 generates a prediction signal (inter prediction signal) by performing inter prediction (also called inter-picture prediction) of the current block with reference to a reference picture stored in the frame memory 122 that is different from the current picture. Inter prediction is performed in units of the current block or sub-blocks (for example, 4x4 blocks) within the current block. 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 the motion information (for example, motion vector) obtained by the motion estimation. Then, the inter prediction unit 126 outputs the generated inter prediction signal to the prediction control unit 128.
[0100] The motion information used for motion compensation is signaled. A motion vector predictor may be used for the signaling of the motion vector. That is, the difference between the motion vector and the predicted motion vector may be signaled.
[0101] Note that an inter prediction signal may be generated using not only the motion information of the current block obtained by motion search but also the motion information of adjacent blocks. Specifically, an inter prediction signal may be generated in units of sub-blocks within the current block by weighted addition of a prediction signal based on the motion information obtained by 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).
[0102] In such an OBMC mode, information indicating the size of sub-blocks for OBMC (for example, called OBMC block size) is signaled at the sequence level. Also, information indicating whether to apply the OBMC mode (for example, called OBMC flag) is signaled at the CU level. Note that the signaling levels of these pieces of information do not necessarily have to be limited to the sequence level and the CU level, and may be other levels (for example, picture level, slice level, tile level, CTU level, or sub-block level).
[0103] The OBMC mode will be described in more detail. FIGS. 5B and 5C are a flowchart and a conceptual diagram for explaining the outline of the prediction image correction process by OBMC processing.
[0104] First, a prediction image (Pred) by normal motion compensation is obtained using the motion vector (MV) assigned to the block to be coded.
[0105] Next, the motion vector (MV_L) of the encoded left adjacent block is applied to the block to be coded to obtain a prediction image (Pred_L), and the first correction of the prediction image is performed by weighting and superimposing the prediction image and Pred_L.
[0106] 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 after the first correction and Pred_U are weighted and superimposed to perform the second correction of the predicted image, which is used as the final predicted image.
[0107] Here, a two-stage correction method using the left adjacent block and the upper adjacent block has been described. However, it is also possible to configure to perform more corrections than two stages using the right adjacent block or the lower adjacent block.
[0108] Note that the area for superimposition may be only a partial area near the block boundary, rather than the pixel area of the entire block.
[0109] Here, the prediction image correction process from a single reference picture has been described. However, the same applies when correcting the prediction image from multiple reference pictures. After obtaining the prediction images corrected from each reference picture, the obtained prediction images are further superimposed to obtain the final prediction image.
[0110] Note that the block to be processed may be in units of prediction blocks or in units of sub-blocks obtained by further dividing the prediction blocks.
[0111] As a method for determining whether to apply OBMC processing, for example, there is a method using an obmc_flag, which is a signal indicating whether to apply OBMC processing. As a specific example, in an encoding device, it is determined whether the block to be encoded belongs to a region with complex motion. If it belongs to a region with complex motion, the value 1 is set as the obmc_flag and encoding is performed by applying OBMC processing. If it does not belong to a region with complex motion, the value 0 is set as the obmc_flag and encoding is performed without applying OBMC processing. On the other hand, in a decoding device, the obmc_flag described in the stream is decoded, and decoding is performed by switching whether to apply OBMC processing according to the value.
[0112] Note that the motion information may be derived on the decoder side without being signaled. For example, the merge mode defined in the H.265 / HEVC standard may be used. Also for example, the motion information may be derived by performing motion search on the decoder side. In this case, the motion search is performed without using the pixel values of the current block.
[0113] Here, a mode in which motion search is performed on the decoder side will be described. This mode in which motion search is performed on the decoder side may be referred to as the PMMVD (pattern matched motion vector derivation) mode or the FRUC (frame rate up-conversion) mode.
[0114] An example of the FRUC process is shown in FIG. 5D. First, by referring to the motion vectors of the encoded blocks spatially or temporally adjacent to the current block, a list of a plurality of candidates (which may be common to the merge list) each having a predicted motion vector is generated. Next, the best candidate MV is selected from among the plurality of candidate MVs registered in the candidate list. For example, an evaluation value of each candidate included in the candidate list is calculated, and one candidate is selected based on the evaluation value.
[0115] Then, based on the motion vector of the selected candidate, 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. Also for example, by performing pattern matching in the peripheral region of the position in the reference picture corresponding to the motion vector of the selected candidate, a motion vector for the current block may be derived. That is, search is performed in the same manner for the region around the best candidate MV, and if there is an MV with a better evaluation value, the best candidate MV may be updated to the MV, and that may be used as the final MV of the current block. Note that it is also possible to adopt a configuration in which the said process is not performed.
[0116] The same processing may be performed even when processing is carried out in sub-block units.
[0117] Note that the evaluation value is calculated by obtaining the difference value of the reconstructed image by pattern matching between the region in the reference picture corresponding to the motion vector and a predetermined region. Note that the evaluation value may be calculated using information other than the difference value.
[0118] As the pattern matching, first pattern matching or second pattern matching is used. The first pattern matching and the second pattern matching may be called bilateral matching and template matching, respectively.
[0119] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures, which are two blocks along the motion trajectory of the current block. Therefore, in the first pattern matching, as the predetermined region for calculating the evaluation value of the candidate described above, a region in another reference picture along the motion trajectory of the current block is used.
[0120] FIG. 6 is a diagram for explaining an example of pattern matching (bilateral matching) between two blocks along a motion trajectory. As shown in FIG. 6, in the first pattern matching, two motion vectors (MV0, MV1) are derived by searching for the most matching pair among pairs of two blocks in two different reference pictures (Ref0, Ref1) that are two blocks along the motion trajectory of the current block (Cur block). Specifically, for the current block, the difference between the reconstructed image at the specified position in the first encoded reference picture (Ref0) specified by the candidate MV and the reconstructed image at the specified position in the second encoded reference picture (Ref1) specified by the symmetric MV obtained by scaling the candidate MV by the display time interval is derived, and an evaluation value is calculated using the obtained difference value. It is advisable to select the candidate MV with the best evaluation value among a plurality of candidate MVs as the final MV.
[0121] Under the assumption of a continuous motion trajectory, the motion vectors (MV0, MV1) indicating the two reference blocks are proportional to the temporal distances (TD0, TD1) between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1). For example, when the current picture is temporally located between the two reference pictures and the temporal distances from the current picture to the two reference pictures are equal, in the first pattern matching, mirror-symmetric bidirectional motion vectors are derived.
[0122] In the second pattern matching, pattern matching is performed between a template in the current picture (a block adjacent to the current block in the current picture (e.g., the upper and / or left adjacent block)) and a block in the reference picture. Therefore, in the second pattern matching, a block adjacent to the current block in the current picture is used as the predetermined region for calculating the evaluation value of the above-described candidate.
[0123] FIG. 7 is a diagram for explaining an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. As shown in FIG. 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 between the reconstructed image of the encoded region of both or either of the left and upper adjacent blocks and the reconstructed image at the equivalent position in the encoded reference picture (Ref0) specified by the candidate MV is derived, an evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value among the plurality of candidate MVs is selected as the best candidate MV.
[0124] Information indicating whether or not to apply such a FRUC mode (for example, called a FRUC flag) is signaled at the CU level. Also, when the FRUC mode is applied (for example, when the FRUC flag is true), information indicating the pattern matching method (the first pattern matching or the second pattern matching) (for example, called a FRUC mode flag) is signaled at the CU level. Note that the signaling of this information does not necessarily have to be limited to the CU level and may be at other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0125] Here, a mode for deriving a motion vector based on a model assuming uniform linear motion will be described. This mode may be called the BIO (bi - directional optical flow) mode.
[0126] FIG. 8 is a diagram for explaining a model assuming uniform linear motion. In FIG. 8, (v x ,v yindicates the velocity vector, where τ0 and τ1 indicate the temporal distances between the current picture (Cur Pic) and the two reference pictures (Ref0, Ref1), respectively. (MVx0, MVy0) indicates the motion vector corresponding to the reference picture Ref0, and (MVx1, MVy1) indicates the motion vector corresponding to the reference picture Ref1.
[0127] At this time, under the assumption of uniform linear motion of the velocity vector (v x , v y ), (MVx0, MVy0) and (MVx1, MVy1) are represented by (v x τ0, v y τ0) and (-v x τ1, -v y τ1), respectively, and the following optical flow equation (1) holds.
[0128]
Equation
[0129] Here, I (k) represents the luminance value of the reference image k (k = 0, 1) after motion compensation. This optical flow equation indicates that the sum of (i) the temporal derivative of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference image, and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference image is equal to zero. Based on the combination of this optical flow equation and Hermite interpolation, the motion vectors in block units obtained from the merge list etc. are corrected in pixel units.
[0130] Note that the motion vector may be derived on the decoder side by a method different from the derivation of the motion vector based on the model assuming uniform linear motion. For example, the motion vector may be derived in sub-block units based on the motion vectors of a plurality of adjacent blocks.
[0131] Here, a mode of deriving a motion vector in units of sub-blocks based on motion vectors of a plurality of adjacent blocks will be described. This mode may be called an affine motion compensation prediction mode.
[0132] FIG. 9A is a diagram for explaining the derivation of a motion vector in units of sub-blocks based on motion vectors of a plurality of adjacent blocks. In FIG. 9A, a current block includes 16 4x4 sub-blocks. Here, based on the motion vectors of adjacent blocks, a motion vector v0 of the upper left control point of the current block is derived, and based on the motion vectors of adjacent sub-blocks, a motion vector v1 of the upper right control point of the current block is derived. Then, using the two motion vectors v0 and v1, the motion vector (v x , v y ) of each sub-block within the current block is derived according to the following formula (2).
[0133] [Equation]
[0134] Here, x and y indicate the horizontal position and vertical position of the sub-block, respectively, and w indicates a predetermined weight coefficient.
[0135] Such an affine motion compensation prediction mode may include several modes in which the methods for deriving the motion vectors of the upper left and upper right control points are different. Information indicating such an affine motion compensation prediction mode (for example, called an affine flag) is signaled at the CU level. Note that the signaling of the information indicating this affine motion compensation prediction mode is not necessarily limited to the CU level, and may be at other levels (for example, sequence level, picture level, slice level, tile level, CTU level, or sub-block level).
[0136] [Prediction control unit] The prediction control unit 128 selects either an intra prediction signal or an inter prediction signal, and outputs the selected signal as a prediction signal to the subtraction unit 104 and the addition unit 116.
[0137] Here, an example of deriving the motion vector of the picture to be coded in the merge mode will be described. FIG. 9B is a diagram for explaining the outline of the motion vector derivation process in the merge mode.
[0138] First, a prediction MV list in which candidates for the prediction MV are registered is generated. Examples of candidates for the prediction MV include a spatial adjacent prediction MV which is an MV possessed by a plurality of coded blocks located spatially adjacent to the block to be coded, a temporal adjacent prediction MV which is an MV possessed by a nearby block obtained by projecting the position of the block to be coded in the coded reference picture, a combined prediction MV which is an MV generated by combining the MV values of the spatial adjacent prediction MV and the temporal adjacent prediction MV, and a zero prediction MV which is an MV with a value of zero.
[0139] Next, one prediction MV is selected from among the plurality of prediction MVs registered in the prediction MV list, and is determined as the MV of the block to be coded.
[0140] Furthermore, in the variable length coding unit, a merge_idx which is a signal indicating which prediction MV has been selected is described in the stream and coded.
[0141] Note that the prediction MVs registered in the prediction MV list described in FIG. 9B are only examples, and the number may be different from that in the figure, the configuration may not include some of the types of prediction MVs in the figure, or the configuration may include prediction MVs other than the types of prediction MVs in the figure.
[0142] Note that the final MV may be determined by performing the DMVR process described later using the MV of the block to be coded derived in the merge mode.
[0143] Here, an example of determining the MV using the DMVR process will be described.
[0144] FIG. 9C is a conceptual diagram for explaining the outline of the DMVR process.
[0145] First, using the optimal MVP set for the processing target block as a candidate MV, according to the candidate MV, reference pixels are respectively obtained from the first reference picture which is the processed picture in the L0 direction and the second reference picture which is the processed picture in the L1 direction, and a template is generated by taking the average of each reference pixel.
[0146] Next, using the template, the peripheral areas of the candidate MVs of the first reference picture and the second reference picture are respectively searched, and the MV with the minimum cost is determined as the final MV. Note that the cost value is calculated using the difference value between each pixel value of the template and each pixel value of the search area, the MV value, etc.
[0147] Note that in the encoding device and the decoding device, the outline of the processing described here is basically common.
[0148] Note that even if it is not the processing itself described here, other processing may be used as long as it is a processing capable of searching the periphery of the candidate MV to derive the final MV.
[0149] Here, the mode of generating a predicted image using the LIC process will be described.
[0150] FIG. 9D is a diagram for explaining the outline of a predicted image generation method using the luminance correction process by the LIC process.
[0151] First, an MV for obtaining a reference image corresponding to the encoding target block is derived from the reference picture which is the encoded picture.
[0152] Next, for the block to be encoded, using the luminance pixel values of the left and upper adjacent encoded peripheral reference regions and the luminance pixel values at the equivalent positions in the reference picture specified by the MV, information indicating how the luminance values change between the reference picture and the picture to be encoded is extracted to calculate the luminance correction parameter.
[0153] By performing luminance correction processing on the reference image in the reference picture specified by the MV using the luminance correction parameter, a predicted image for the block to be encoded is generated.
[0154] Note that the shape of the peripheral reference region in FIG. 9D is an example, and other shapes may be used.
[0155] Also, although the process of generating a predicted image from one reference picture has been described here, the same applies when generating a predicted image from multiple reference pictures. Luminance correction processing is performed on the reference images obtained from each reference picture in the same way, and then the predicted image is generated.
[0156] As a method for determining whether to apply the LIC process, for example, there is a method that uses lic_flag, which is a signal indicating whether to apply the LIC process. As a specific example, in the encoding device, it is determined whether the block to be encoded belongs to a region where a luminance change has occurred. If it belongs to a region where a luminance change has occurred, the value 1 is set as lic_flag and the LIC process is applied for encoding. If it does not belong to a region where a luminance change has occurred, the value 0 is set as lic_flag and encoding is performed without applying the LIC process. On the other hand, in the decoding device, by decoding the lic_flag described in the stream, decoding is performed by switching whether to apply the LIC process according to the value.
[0157] As another method for determining whether to apply the LIC process, for example, there is also a method of determining according to whether the LIC process is applied to peripheral blocks. As a specific example, when the block to be encoded is in the merge mode, it is determined whether the peripheral encoded blocks selected during the derivation of the MV in the merge mode process are encoded by applying the LIC process, and encoding is performed by switching whether to apply the LIC process according to the result. In the case of this example, the processing in decoding is exactly the same.
[0158] [Overview of Decoder] Next, an overview of a decoder capable of decoding the encoded signal (encoded bit stream) output from the above-described encoder 100 will be described. FIG. 10 is a block diagram showing the functional configuration of a decoder 200 according to Embodiment 1. The decoder 200 is a moving image / image decoder that decodes moving images / images in units of blocks.
[0159] As shown in FIG. 10, the decoder 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.
[0160] The decoder 200 is realized by, for example, a general-purpose processor and a memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. Further, the decoder 200 may be realized as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.
[0161] Each component included in the decoder 200 will be described below.
[0162] [Entropy Decoding Unit] The entropy decoding unit 202 entropy-decodes the encoded bit stream. Specifically, the entropy decoding unit 202, for example, arithmetically decodes the encoded bit stream into a binary signal. Then, the entropy decoding unit 202 de-binarizes the binary signal. As a result, the entropy decoding unit 202 outputs quantization coefficients in block units to the inverse quantization unit 204.
[0163] [Inverse Quantization Unit] The inverse quantization unit 204 inverse-quantizes the quantization coefficients of the block to be decoded (hereinafter referred to as the current block), which is the input from the entropy decoding unit 202. Specifically, for each of the quantization coefficients of the current block, the inverse quantization unit 204 inverse-quantizes the quantization coefficient based on the quantization parameter corresponding to the quantization coefficient. Then, the inverse quantization unit 204 outputs the inverse-quantized quantization coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.
[0164] [Inverse Transform Unit] The inverse transform unit 206 restores the prediction error by inverse-transforming the transform coefficients that are the input from the inverse quantization unit 204.
[0165] For example, when the information decoded from the encoded bit stream indicates that EMT or AMT is to be applied (for example, the AMT flag is true), the inverse transform unit 206 inverse-transforms the transform coefficients of the current block based on the information indicating the decoded transform type.
[0166] Also, for example, when the information decoded from the encoded bit stream indicates that NSST is to be applied, the inverse transform unit 206 applies inverse inverse-transform to the transform coefficients.
[0167] [Addition Unit] The adder 208 reconstructs the current block by adding the prediction error which is the input from the inverse transform unit 206 and the prediction sample which is the input from the predictive control unit 220. Then, the adder 208 outputs the reconstructed block to the block memory 210 and the loop filter unit 212.
[0168] [Block Memory] The block memory 210 is a storage unit for storing blocks within the decoded target picture (hereinafter referred to as the current picture) which are blocks referred to in intra prediction. Specifically, the block memory 210 stores the reconstructed block output from the adder 208.
[0169] [Loop Filter Unit] The loop filter unit 212 applies a loop filter to the block reconstructed by the adder 208, and outputs the filtered reconstructed block to the frame memory 214 and a display device or the like.
[0170] When the information indicating the on / off of the ALF read from the encoded bitstream indicates that the ALF is on, one filter is selected from a plurality of filters based on the local gradient direction and activity, and the selected filter is applied to the reconstructed block.
[0171] [Frame Memory] The frame memory 214 is a storage unit for storing reference pictures used in inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 214 stores the reconstructed block filtered by the loop filter unit 212.
[0172] [Intra Prediction Unit] The intra prediction unit 216 generates a prediction signal (intra prediction signal) by performing intra prediction with reference to a block within the current picture stored in the block memory 210 based on the intra prediction mode decoded from the encoded bit stream. Specifically, the intra prediction unit 216 generates an intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance difference values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 220.
[0173] Note that when an intra prediction mode that refers to a luminance block in the intra prediction of a chrominance block is selected, the intra prediction unit 216 may predict the chrominance component of the current block based on the luminance component of the current block.
[0174] Also, when the information decoded from the encoded bit stream indicates the application of PDPC, the intra prediction unit 216 corrects the pixel value after intra prediction based on the gradient of the reference pixels in the horizontal / vertical direction.
[0175] [Inter prediction unit] The inter prediction unit 218 predicts the current block with reference to the reference pictures stored in the frame memory 214. The prediction is performed in units of the current block or sub-blocks (e.g., 4x4 blocks) within the current block. For example, the inter prediction unit 218 generates an inter prediction signal for the current block or sub-block by performing motion compensation using the motion information (e.g., motion vector) decoded from the encoded bit stream, and outputs the inter prediction signal to the prediction control unit 220.
[0176] Note that when the information decoded from the encoded bit stream indicates the application of the OBMC mode, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion search but also the motion information of adjacent blocks.
[0177] Also, when the information decoded from the encoded bitstream indicates that the FRUC mode is to be applied, the inter prediction unit 218 derives motion information by performing motion search according to the pattern matching method (bilateral matching or template matching) decoded from the encoded stream. Then, the inter prediction unit 218 performs motion compensation using the derived motion information.
[0178] Also, when the BIO mode is applied, the inter prediction unit 218 derives a motion vector based on a model assuming uniform linear motion. Further, when the information decoded from the encoded bitstream indicates that the affine motion compensation prediction mode is to be applied, the inter prediction unit 218 derives a motion vector in sub-block units based on the motion vectors of a plurality of adjacent blocks.
[0179] [Prediction control unit] The prediction control unit 220 selects either the intra prediction signal or the inter prediction signal, and outputs the selected signal to the addition unit 208 as the prediction signal.
[0180] [Deblocking filter processing] Next, the deblocking filter processing performed in the encoding device 100 and the decoding device 200 configured as described above will be specifically described with reference to the drawings. Hereinafter, the operation of the loop filter unit 120 included in the encoding device 100 will be mainly described, but the operation of the loop filter unit 212 included in the decoding device 200 is the same.
[0181] As described above, when encoding an image, the encoding device 100 calculates a prediction error by subtracting a prediction signal generated by the intra prediction unit 124 or the inter prediction unit 126 from the original signal. The encoding device 100 generates quantization coefficients by performing orthogonal transformation processing, quantization processing, and the like on the prediction error. Further, the encoding device 100 restores the prediction error by performing inverse quantization and inverse orthogonal transformation on the obtained quantization coefficients. Here, since the quantization process is an irreversible process, the restored prediction error has an error (quantization error) with respect to the prediction error before conversion.
[0182] The deblocking filter processing performed by the loop filter unit 120 is a kind of filter processing performed for the purpose of reducing this quantization error. The deblocking filter processing is applied to the block boundary to remove block noise.
[0183] FIG. 11 is a flowchart showing an outline of the deblocking filter processing according to the present embodiment. First, the loop filter unit 120 determines whether to perform deblocking filter processing on a target boundary that is a block boundary to be processed, for example, using pixel values of pixels in the block or quantization parameters (S101). If it is determined to perform deblocking filter processing (Yes in S101), the loop filter unit 120 determines filter characteristics (S102), and performs deblocking filter processing on the target boundary using the determined filter characteristics (S103).
[0184] For example, in determining the filter characteristics, the loop filter unit 120 selects a filter to be used from several filter candidates having different numbers of pixels used for the filter. For example, there may be filter candidates such as a weak filter that is a filter with a small number of pixels used for the filter, a strong filter that is a filter with a larger number of pixels used for the filter than the weak filter, and a super-strong filter that is a filter with an even larger number of pixels used for the filter than the strong filter.
[0185] FIG. 12 is a diagram showing an example of this filter candidate. For example, as shown in FIG. 12, as the number of pixels used for each filter, for a weak filter, three pixels are used on each side of the boundary, for a strong filter, four pixels are used on each side of the boundary, and for a very strong filter, eight pixels are used on each side of the boundary. Alternatively, different numbers of pixels may be used. Here, an example of the upper and lower block boundaries is shown, but the same applies to the left and right block boundaries.
[0186] Further, the plurality of filter candidates may include a plurality of filters having the same number of pixels used for the filter but different filter characteristics due to different filter coefficients.
[0187] Note that the number of pixels used for the filter and the number of pixels of the pixel to be filtered do not have to be the same. For example, in the case of a strong filter, the loop filter unit 120 calculates the displacement using four pixels on each side of the boundary, but may perform the filtering process using three pixels on each side of the boundary. That is, the number of pixels used for the filter may be larger than the number of pixels of the pixel to be filtered.
[0188] [First Aspect of Filter Candidate Determination Process] In the determination of the filter characteristics (S102) described above, the loop filter unit 120 determines a plurality of filter candidates and selects a filter to be used for the deblocking filter process from the determined plurality of filter candidates. Hereinafter, the first aspect of this filter candidate determination process will be described. FIG. 13 is a flowchart showing the first aspect of the filter candidate determination process included in the deblocking filter process by the encoding apparatus 100 of the present embodiment.
[0189] First, the loop filter unit 120 acquires the position of the target boundary, which is the block boundary to be filtered (S111). Hereinafter, among the two blocks adjacent to the target boundary, the lower or right block is referred to as the target block, and the upper or left block is referred to as the adjacent block.
[0190] Next, the loop filter unit 120 determines whether the position of the target boundary is a predetermined position (S112). Here, the predetermined position may be, for example, the upper end of the CTU to which the target block belongs, or the upper end or left end of the CTU to which the target block belongs, or the upper end of the CU to which the target block belongs, or the upper end or left end of the CU to which the target block belongs. That is, the predetermined position is a unit block (CTU or CU) including a plurality of blocks, and may be the upper end of the unit block to which the target block belongs, or the upper end or left end.
[0191] When the position of the target boundary is a predetermined position (Yes in S112), the loop filter unit 120 adds an asymmetric filter to the filter candidates (S113). Specifically, the loop filter unit 120 adds an asymmetric filter to the filter candidates in place of the filter candidate with the largest number of pixels used in the filter among the initial plurality of filter candidates. Here, the asymmetric filter is a filter in which the number of pixels used in the filter is asymmetric across the boundary. In other words, the asymmetric filter is a filter in which the number of pixels in the target block used in the filter is different from the number of pixels in the adjacent block. Specifically, the asymmetric filter is a filter with different filter tap lengths across the target boundary.
[0192] For example, as shown in FIG. 12, when there are an initial filter candidate of a weak filter using 3 pixels across the boundary, a strong filter using 4 pixels across the boundary, and a very strong filter using 8 pixels across the boundary, the loop filter unit 120 replaces the very strong filter with an asymmetric filter. That is, the loop filter unit 120 determines which filter among the plurality of candidates to use, and when the filter to be used is a very strong filter, it may determine whether to replace the very strong filter with an asymmetric filter.
[0193] FIG. 14 is a diagram showing an example of a filter candidate after replacement. For example, as shown in FIG. 14, a very strong filter is replaced with a filter that asymmetrically uses 4 pixels and 12 pixels across the boundary. For example, in an asymmetric filter, the number of pixels used on the adjacent block side is less than the number of pixels used on the target block side.
[0194] In addition, the number of pixels on the adjacent block side used in the very strong filter shown in FIG. 14 is less than the number of pixels on the adjacent block side used in the very strong filter shown in FIG. 12. Also, the number of pixels on the target block side used in the very strong filter shown in FIG. 14 is more than the number of pixels on the target block side used in the very strong filter shown in FIG. 12. Further, the sum of the number of pixels on the adjacent block side and the number of pixels on the target block side used in the very strong filter shown in FIG. 14 is equal to the sum of the number of pixels on the adjacent block side and the number of pixels on the target block side used in the very strong filter shown in FIG. 12.
[0195] Note that the number of pixels on the target block side of the asymmetric filter may be the same as the number of pixels on the target block side of the filter before replacement. Also, the total number of pixels used in the asymmetric filter may be different from the total number of pixels used in the filter before replacement.
[0196] On the other hand, when the position of the target boundary is not a predetermined position (No in S112), the loop filter unit 120 does not add an asymmetric filter to the filter candidates, and for example, selects a filter to be used from the initial filter candidates. For example, the loop filter unit 120 selects a filter to be used from a plurality of filter candidates that do not include the asymmetric filter shown in FIG. 12.
[0197] [Effect of the First Aspect] As described above, according to the configuration of the first aspect, there is a possibility of reducing the amount of data held in the line memory. Specifically, by using an asymmetric filter, the number of pixels used for the filter can be changed, and the number of pixels stored in the memory can be changed. Therefore, there is a possibility of reducing the capacity of the memory for storing the pixel values of the blocks.
[0198] [Second Mode of Filter Candidate Determination Processing] Hereinafter, the second mode of the filter candidate determination processing will be described. In the first mode, as an asymmetric filter, an example was described in which a filter having different tap lengths on the target block side and the adjacent block side was used. In this mode, a filter including extrapolation processing is used as the asymmetric filter.
[0199] FIG. 15 is a flowchart showing a second mode of the filter candidate determination processing included in the deblocking filter processing by the encoding apparatus 100 according to the present embodiment.
[0200] First, the loop filter unit 120 acquires the position of the target boundary, which is the block boundary to be filtered (S121). Next, the loop filter unit 120 determines whether the position of the target boundary is a predetermined position (S122). Here, the predetermined position may be, for example, the upper end of the CTU to which the target block belongs, or the upper end or the left end of the CTU to which the target block belongs, or the upper end of the CU to which the target block belongs, or the upper end or the left end of the CU to which the target block belongs. That is, the predetermined position is a unit block (CTU or CU) including a plurality of blocks, and may be the upper end of the unit block to which the target block belongs, or the upper end or the left end.
[0201] When the position of the target boundary is the predetermined position (Yes in S122), the loop filter unit 120 generates a pixel value of a predetermined pixel by extrapolation processing, and adds a filter including the extrapolation processing, which performs filter processing using the generated pixel value, to the filter candidates (S123). Specifically, the loop filter unit 120 adds a filter including extrapolation processing to the filter candidates instead of the filter candidate having the largest number of pixels to be used among the plurality of filter candidates. Also, the predetermined pixel is a pixel included in the adjacent block and is a pixel located near the target boundary.
[0202] Here, for example, when there exist, as initial filter candidates, a weak filter that uses three pixels on each side of the boundary as shown in FIG. 12, a strong filter that uses four pixels on each side of the boundary, and a very strong filter that uses eight pixels on each side of the boundary, the loop filter unit 120 replaces the very strong filter with a filter including an extrapolation process.
[0203] FIG. 16 is a diagram showing an example of the filter candidates after replacement. For example, as shown in FIG. 16, in the filter including the extrapolation process, the loop filter unit 120 generates, by means of extrapolation process, the pixel values of four pixels above the four pixels above the target boundary using the pixel values of the four pixels above the target boundary. Next, the loop filter unit 120 performs a filtering process using the pixel values of the four pixels above the target boundary, the four pixels generated by the extrapolation process, and the pixel values of eight pixels below the target boundary.
[0204] Here, the extrapolation process is, for example, a padding process or a mirroring process. In the padding process, the pixel value of the pixel to be extrapolated is generated, for example, by copying the pixel values of the pixels adjacent to the pixel. For example, in the example shown in FIG. 16, the pixel value of the fourth pixel above the target boundary is copied. Also, in the mirroring process, at the boundary between the plurality of pixel values used for the extrapolation process and the plurality of pixel values to be extrapolated, the plurality of pixel values used for the extrapolation process are arranged in an inverted manner, whereby the plurality of pixel values to be extrapolated are generated. For example, in the example shown in FIG. 16, the four pixel values above the target boundary are vertically inverted to generate the four pixel values to be extrapolated. Here, in order to make the number of pixels used for the filter symmetric across the boundary, the process of supplementing the insufficient pixels is called the extrapolation process, but it may also be called an extrapolation process, an interpolation process, a pixel generation process, or the like.
[0205] In addition, the number of pixels on the adjacent block side used in the very strong filter shown in FIG. 16 is smaller than the number of pixels on the adjacent block side used in the very strong filter shown in FIG. 12. Also, the number of pixels on the target block side used in the very strong filter shown in FIG. 16 is equal to the number of pixels on the target block side used in the very strong filter shown in FIG. 12. Further, the pixels to be interpolated are one or more pixels adjacent to the pixels on the adjacent block side used, on the side opposite to the target boundary (upper side or left side).
[0206] Also, the filter that uses the pixel value generated by the interpolation process may be the same as the filter before replacement. That is, the filter that uses the pixel value generated by the interpolation process may be a filter that uses the pixel values of the same number of pixels sandwiching the block boundary. For example, in this example, the very strong filter shown in FIG. 12 that uses 8 pixels on each side across the boundary may be used.
[0207] On the other hand, when the position of the target boundary is not at a predetermined position (No in S122), the loop filter unit 120 does not add a filter including an interpolation process to the filter candidates, and for example, selects a filter to be used from the initial filter candidates. For example, the loop filter unit 120 selects a filter to be used from a plurality of filter candidates that do not include the asymmetric filter shown in FIG. 12.
[0208] [Effect of the Second Aspect] As described above, according to the configuration of the second aspect, there is a possibility of reducing the amount of data held in the line memory. Specifically, the number of pixels used in the filter can be changed by using a filter including an interpolation process. Therefore, there is a possibility of reducing the capacity of the memory for storing the pixel values of the blocks.
[0209] Also, compared with the first aspect, since it is not necessary to change the filter itself, the processing may be simplified.
[0210] [Modification Example] In the asymmetric filters described in the first and second aspects, the number of pixels used on the adjacent block side (upper side or left side) of the block boundary may be made smaller than the number of pixels used on the target block side (right side or lower side) of the block boundary.
[0211] For example, the number of pixels required for the asymmetric filter on the adjacent block side of the block boundary may be equal to or less than the number of pixels on the adjacent block side of the block boundary used by a filter candidate (e.g., the strong filters shown in FIGS. 12, 14, and 16) having a smaller number of pixels to be used next than the filter candidate to be replaced (e.g., the very strong filter shown in FIG. 12) included in the initial filter candidates. For example, in the examples shown in FIGS. 12, 14, and 16, since the strong filter uses four pixels on each side straddling the boundary, the number of pixels used by the asymmetric filter on the left or upper side of the filter boundary is four pixels, which is equal to the number of pixels used by the strong filter.
[0212] Also, for example, the number of pixels required for the asymmetric filter on the adjacent block side of the block boundary may be equal to or less than the number of pixels on the adjacent block side used in the process that uses the largest number of adjacent block side pixels among all the processes included in the loop filter processing, excluding the filter candidate before replacement (e.g., the very strong filter shown in FIG. 12). For example, when six pixels are required from the filter target pixel to a position in the ALF process, the number of pixels used by the asymmetric filter on the adjacent block side of the block boundary may be six pixels or less.
[0213] The above processing may have its On / Off controlled by luminance (Luma) and color difference (Chroma). For example, the above processing may be applied to one of luminance and color difference and not applied to the other. Also, the behavior may be switched between luminance and color difference.
[0214] Also, information indicating whether to perform the above processing may be written in the syntax. That is, the encoding device may generate a bitstream including information indicating whether to perform the above processing. The decoding device may decode the information indicating whether to perform the above processing from the bitstream and switch whether to perform the above processing according to the decoded information.
[0215] Also, in the above description, when the position of the target boundary is a predetermined position determined in advance, it is determined whether to use an asymmetric filter, but it may be determined whether to use an asymmetric filter by other methods. For example, the loop filter unit 120 may calculate an evaluation value for each of the image obtained using the asymmetric filter and the image obtained when not using it based on a predetermined criterion, and select a method with a high evaluation value. For example, RD (rate distortion) optimization or the like can be used for this evaluation.
[0216] Also, in the present embodiment, the "number of pixels used for the filter" may be all the pixels used for the filter process, or may be the pixels located on one side of the boundary of the filter target among the pixels used for the filter process.
[0217] Also, when the pixels used for the filter process satisfy a predetermined condition, the loop filter unit 120 may replace at least one of the predetermined filter candidates with a different filter candidate, or may add a different filter candidate to the predetermined filter candidates. That is, in the present embodiment, the loop filter unit 120 may set a predetermined filter as a candidate instead of a very strong filter, or may add a predetermined filter to the filter candidates in addition to the very strong filter.
[0218] Also, the pixels used for the filter process may be, for example, the pixels used for filter application determination, the pixels used for determining filter characteristics, or the pixels to which the filter process is applied.
[0219] In the above description, the operation of the loop filter unit 120 included in the encoding apparatus 100 has been mainly described. However, the same operation is also performed in the loop filter unit 212 included in the decoding apparatus 200.
[0220] Also, not all of the processes described in the present embodiment are always necessary, and only some of the processes of the present embodiment may be performed.
[0221] [Summary] As described above, the encoding apparatus 100 according to the present embodiment determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter and a second filter (S102), and performs deblocking filter processing on a block boundary using the determined filter (S103). The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a plurality of first candidate values, and the number of the second pixels is any one of a plurality of second candidate values. Each of the plurality of first candidate values and each of the plurality of second candidate values is M or a value greater than M.
[0222] Thereby, the encoding apparatus 100 can reduce the number of pixels above or to the left of the block boundary used for deblocking filter processing, so there is a possibility of reducing the amount of data held in the memory.
[0223] For example, the second filter may be such that the number of the first pixels and the number of the second pixels are the same, or the number of the first pixels and the number of the second pixels are different.
[0224] For example, each of the plurality of first candidate values and each of the plurality of second candidate values is 4 or a value greater than 4.
[0225] For example, among the plurality of filters, filters other than the second filter use the same number of pixels above and below the block boundary.
[0226] For example, the encoding device 100 restricts the maximum value of the possible values of the number of first pixels according to whether the position of the block boundary is a predetermined position.
[0227] For example, the predetermined position is the upper end of the coding tree unit (CTU). For example, the predetermined position is the upper end and the left end of the coding tree unit (CTU). For example, the predetermined position is the upper end of the coding unit (CU). For example, the predetermined position is the upper end and the left end of the coding unit (CU).
[0228] For example, the maximum value of the possible values of the number of first pixels is less than or equal to the number of pixels above the block boundary used by a filter (for example, the strong filter shown in FIG. 12) that uses a larger number of pixels next to the second filter (for example, the very strong filter shown in FIG. 12) among a plurality of filters.
[0229] For example, the maximum value of the possible values of the number of first pixels is less than or equal to the number of pixels above the block boundary of the process that uses the largest number of pixels above the block boundary among the processes excluding the second filter (for example, the very strong filter shown in FIG. 12) from the processes included in the loop filter process including the deblocking filter process.
[0230] For example, as described in the first aspect, when the number of first pixels and the number of second pixels are different, the filter tap lengths sandwiching the block boundary are different for the second filter.
[0231] For example, as described in the second aspect, when the number of first pixels and the number of second pixels are different, the second filter generates a third pixel consecutive to the upper side of the first pixel using the first pixel, and is a filter that uses the first pixel, the second pixel, and the third pixel, and the sum of the number of first pixels and the number of third pixels is equal to the number of second pixels.
[0232] Further, the decoding apparatus 200 according to the present embodiment determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter and a second filter (S102), and performs deblocking filter processing on a block boundary using the determined filter (S103). The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of first pixels is any one of a plurality of first candidate values, and the number of second pixels is any one of a plurality of second candidate values. Each of the plurality of first candidate values and each of the plurality of second candidate values are M or a value greater than M.
[0233] Thereby, the decoding apparatus 200 can reduce the number of pixels above or to the left of the block boundary used for deblocking filter processing, so there is a possibility of reducing the amount of data to be held in the memory.
[0234] For example, in the second filter, the number of first pixels and the number of second pixels may be the same or different.
[0235] For example, each of the plurality of first candidate values and each of the plurality of second candidate values are 4 or a value greater than 4.
[0236] For example, among the plurality of filters, filters other than the second filter use the same number of pixels above and below the block boundary.
[0237] For example, the decoding apparatus 200 limits the maximum value of the possible values of the number of first pixels according to whether the position of the block boundary is a predetermined position.
[0238] For example, the predetermined position is the upper end of a Coding Tree Unit (CTU). For example, the predetermined position is the upper end and the left end of a Coding Tree Unit (CTU). For example, the predetermined position is the upper end of a Coding Unit (CU). For example, the predetermined position is the upper end and the left end of a Coding Unit (CU).
[0239] For example, the maximum value that the number of the first pixels can take is not more than the number of pixels above the block boundary used by a filter (e.g., the strong filter shown in FIG. 12) that uses a larger number of pixels next to the second filter (e.g., the very strong filter shown in FIG. 12) among the plurality of filters.
[0240] For example, the maximum value that the number of the first pixels can take is not more than the number of the pixels above the block boundary of the process that uses the largest number of pixels above the block boundary among the processes excluding the second filter (e.g., the very strong filter shown in FIG. 12) from the processes included in the loop filter process including the deblocking filter process.
[0241] For example, as described in the first aspect, when the number of the first pixels and the number of the second pixels are different, the second filter has different filter tap lengths across the block boundary.
[0242] For example, as described in the second aspect, when the number of the first pixels and the number of the second pixels are different, the second filter is a filter that generates a third pixel continuous above the first pixel using the first pixel, and uses the first pixel, the second pixel, and the third pixel, and the sum of the number of the first pixels and the number of the third pixels is equal to the number of the second pixels.
[0243] Also, the encoding device 100 according to the present embodiment includes a division unit 102 that divides an image into a plurality of blocks, an intra prediction unit 124 that predicts a block included in the image using a reference picture included in the image, an inter prediction unit 126 that predicts a block included in the image using a reference block included in another image different from the image, a loop filter unit 120 that applies a filter to a block included in the image, a conversion unit 106 that converts a prediction error between a prediction signal generated by the intra prediction unit 124 or the inter prediction unit 126 and an original signal to generate a conversion coefficient, a quantization unit 108 that quantizes the conversion coefficient to generate a quantization coefficient, and an entropy encoding unit 110 that generates an encoded bit stream by performing variable-length encoding on the quantization coefficient. The loop filter unit 120 determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter and a second filter (S102), and performs deblocking filter processing on a block boundary using the determined filter (S103). The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary, and the second filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a plurality of first candidate values, the number of the second pixels is any one of a plurality of second candidate values, and each of the plurality of first candidate values and each of the plurality of second candidate values are values equal to or greater than M.
[0244] Further, the decoding apparatus 200 according to the present embodiment includes a decoding unit (entropy decoding unit 202) that decodes an encoded bit stream and outputs quantization coefficients, an inverse quantization unit 204 that inverse quantizes the quantization coefficients and outputs transform coefficients, an inverse transform unit 206 that inverse transforms the transform coefficients and outputs prediction errors, an intra prediction unit 216 that predicts a block included in the image using a reference picture included in the image, an inter prediction unit 218 that predicts a block included in the image using a reference block included in another image different from the image, and a loop filter unit 212 that applies a filter to a block included in the image. The loop filter unit 212 determines a filter to be used for deblocking filter processing from a plurality of filters including a first filter and a second filter (S102), and performs deblocking filter processing on a block boundary using the determined filter (S103). The first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary. The second filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary. The number of the first pixels is any one of a plurality of first candidate values, and the number of the second pixels is any one of a plurality of second candidate values. Each of the plurality of first candidate values and each of the plurality of second candidate values are values equal to or greater than M.
[0245] [Implementation Example of Encoding Apparatus] FIG. 17 is a block diagram showing an implementation example of the encoding apparatus 100 according to Embodiment 1. The encoding apparatus 100 includes a circuit 160 and a memory 162. For example, a plurality of components of the encoding apparatus 100 shown in FIG. 1 are implemented by the circuit 160 and the memory 162 shown in FIG. 17.
[0246] Circuit 160 is a circuit that performs information processing and is a circuit that can access memory 162. For example, circuit 160 is a dedicated or general-purpose electronic circuit that encodes moving images. Circuit 160 may be a processor such as a CPU. Also, circuit 160 may be an aggregate of multiple electronic circuits. Further, for example, circuit 160 may play the roles of multiple components among the multiple components of the encoding device 100 shown in FIG. 1 etc., excluding the components for storing information.
[0247] Memory 162 is a dedicated or general-purpose memory in which information for circuit 160 to encode moving images is stored. Memory 162 may be an electronic circuit and may be connected to circuit 160. Also, memory 162 may be included in circuit 160. Also, memory 162 may be an aggregate of multiple electronic circuits. Also, memory 162 may be a magnetic disk or an optical disk etc., or may be expressed as a storage or a recording medium etc. Also, memory 162 may be a non-volatile memory or a volatile memory.
[0248] For example, memory 162 may store the moving image to be encoded, or may store the bit string corresponding to the encoded moving image. Also, memory 162 may store a program for circuit 160 to encode moving images.
[0249] Also, for example, memory 162 may play the role of a component for storing information among the multiple components of the encoding device 100 shown in FIG. 1 etc. Specifically, memory 162 may play the roles of block memory 118 and frame memory 122 shown in FIG. 1. More specifically, memory 162 may store reconstructed blocks and reconstructed pictures etc.
[0250] Note that in the encoding apparatus 100, not all of the plurality of components shown in FIG. 1 and the like need to be implemented, and not all of the plurality of processes described above need to be performed. A part of the plurality of components shown in FIG. 1 and the like may be included in another apparatus, and a part of the plurality of processes described above may be executed by another apparatus.
[0251] [Implementation Example of Decoding Apparatus] FIG. 18 is a block diagram showing an implementation example of the decoding apparatus 200 according to Embodiment 1. The decoding apparatus 200 includes a circuit 260 and a memory 262. For example, a plurality of components of the decoding apparatus 200 shown in FIG. 10 are implemented by the circuit 260 and the memory 262 shown in FIG. 18.
[0252] The circuit 260 is a circuit that performs information processing and is a circuit that can access the memory 262. For example, the circuit 260 is a dedicated or general-purpose electronic circuit that decodes a moving image. The circuit 260 may be a processor such as a CPU. Also, the circuit 260 may be an aggregate of a plurality of electronic circuits. Further, for example, the circuit 260 may play the roles of a plurality of components of the decoding apparatus 200 shown in FIG. 10 and the like, excluding the components for storing information.
[0253] The memory 262 is a dedicated or general-purpose memory in which information for the circuit 260 to decode a moving image is stored. The memory 262 may be an electronic circuit and may be connected to the circuit 260. Also, the memory 262 may be included in the circuit 260. Also, the memory 262 may be an aggregate of a plurality of electronic circuits. Also, the memory 262 may be a magnetic disk, an optical disk, or the like, or may be expressed as a storage or a recording medium. Also, the memory 262 may be a non-volatile memory or a volatile memory.
[0254] For example, the memory 262 may store a bit string corresponding to the encoded moving image, or may store a moving image corresponding to the decoded bit string. Also, the memory 262 may store a program for the circuit 260 to decode a moving image.
[0255] Also, for example, the memory 262 may serve as a component for storing information among the plurality of components of the decoding device 200 shown in FIG. 10 and the like. Specifically, the memory 262 may serve as the block memory 210 and the frame memory 214 shown in FIG. 10. More specifically, the memory 262 may store the reconstructed blocks, the reconstructed pictures, and the like.
[0256] Note that in the decoding device 200, not all of the plurality of components shown in FIG. 10 and the like need to be implemented, and not all of the plurality of processes described above need to be performed. A part of the plurality of components shown in FIG. 10 and the like may be included in another device, and a part of the plurality of processes described above may be executed by another device.
[0257] [Supplement] Also, the encoding device 100 and the decoding device 200 in the present embodiment may be used as an image encoding device and an image decoding device, respectively, or may be used as a moving image encoding device and a moving image decoding device.
[0258] Also, in the present embodiment, each component may be configured by dedicated hardware or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.
[0259] Specifically, each of the encoding device 100 and the decoding device 200 may include a processing circuit and a storage device electrically connected to the processing circuit and accessible from the processing circuit. For example, the processing circuit corresponds to the circuit 160 or 260, and the storage device corresponds to the memory 162 or 262.
[0260] The processing circuit includes at least one of dedicated hardware and a program execution unit, and executes processing using a storage device. Further, when the processing circuit includes a program execution unit, the storage device stores a software program executed by the program execution unit.
[0261] Here, the software that realizes the encoding device 100 or the decoding device 200 in the present embodiment is the following program.
[0262] Also, as described above, each component may be a circuit. These circuits may constitute one circuit as a whole, or may be separate circuits respectively. Further, each component may be realized by a general-purpose processor or a dedicated processor.
[0263] Also, a different component may execute the processing executed by a specific component. Also, the order in which the processing is executed may be changed, or a plurality of processes may be executed in parallel. Further, the encoding / decoding device may include the encoding device 100 and the decoding device 200.
[0264] As described above, the aspects of the encoding device 100 and the decoding device 200 have been described based on the embodiment, but the aspects of the encoding device 100 and the decoding device 200 are not limited to this embodiment. As long as the gist of the present disclosure is not deviated from, various modifications conceived by those skilled in the art applied to this embodiment or forms constructed by combining components in different embodiments may also be included within the scope of the aspects of the encoding device 100 and the decoding device 200.
[0265] This aspect may be implemented in combination with at least a part of other aspects in the present disclosure. Also, a part of the processing described in the flowchart of this aspect, a part of the configuration of the device, a part of the syntax, etc. may be implemented in combination with other aspects.
[0266] (Embodiment 2) In each of the above embodiments, each of the functional blocks can generally be realized by an MPU, a memory, and the like. Further, the processing by each of the functional blocks is generally realized by a program execution unit such as a processor reading and executing software (program) recorded on a recording medium such as a ROM. The software may be distributed by download or the like, or may be recorded on a recording medium such as a semiconductor memory and distributed. Of course, it is also possible to realize each functional block by hardware (a dedicated circuit).
[0267] Also, the processing described in each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using a plurality of devices. Further, the processor that executes the above program may be singular or plural. That is, centralized processing may be performed, or distributed processing may be performed.
[0268] Aspects of the present disclosure are not limited to the above embodiments, and various modifications are possible, and these are also included within the scope of the aspects of the present disclosure.
[0269] Furthermore, here, an application example of the moving image encoding method (image encoding method) or the moving image decoding method (image decoding method) shown in each of the above embodiments and a system using the same will be described. The system is characterized by having an image encoding device using an image encoding method, an image decoding device using an image decoding method, and an image encoding / decoding device having both. Other configurations in the system can be appropriately changed as the case may be.
[0270] [Usage Example] FIG. 19 is a diagram showing the overall configuration of a content supply system ex100 that realizes a content distribution service. The communication service providing area is divided into a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed radio stations, are installed in each cell.
[0271] In this content supply system ex100, devices such as computer ex111, game console ex112, camera ex113, home appliance ex114, and smartphone ex115 are connected to the Internet ex101 via an Internet service provider ex102 or a communication network ex104 and base stations ex106 to ex110. The content supply system ex100 may be configured to connect by combining any of the above elements. The devices may be directly or indirectly connected to each other via a telephone network or short-range wireless communication without passing through the base stations ex106 to ex110 which are fixed radio stations. Also, the streaming server ex103 is connected to devices such as computer ex111, game console ex112, camera ex113, home appliance ex114, and smartphone ex115 via the Internet ex101 or the like. Further, the streaming server ex103 is connected to terminals within a hotspot in an airplane ex117 via a satellite ex116.
[0272] Note that a wireless access point, a hotspot, or the like may be used instead of the base stations ex106 to ex110. Also, the streaming server ex103 may be directly connected to the communication network ex104 without passing through the Internet ex101 or the Internet service provider ex102, or may be directly connected to the airplane ex117 without passing through the satellite ex116.
[0273] The camera ex113 is a device capable of taking still images and videos such as a digital camera. Also, the smartphone ex115 is a smartphone device, mobile phone, or PHS (Personal Handyphone System) etc. that generally supports the mobile communication system standards known as 2G, 3G, 3.9G, 4G, and in the future 5G.
[0274] The home appliance ex118 is a device such as a refrigerator or a device included in a household fuel cell cogeneration system.
[0275] In the content supply system ex100, a terminal having a photographing function is connected to a streaming server ex103 through a base station ex106 or the like, enabling live distribution and the like. In live distribution, terminals (such as a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, a smartphone ex115, and a terminal in an airplane ex117) perform the encoding process described in each of the above embodiments on still image or moving image content photographed by the user using the terminal, multiplex the video data obtained by encoding with the audio data obtained by encoding the sound corresponding to the video, and transmit the obtained data to the streaming server ex103. That is, each terminal functions as an image encoding device according to one aspect of the present disclosure.
[0276] On the other hand, the streaming server ex103 stream-distributes the content data transmitted to the requested client. The client is a computer ex111, a game machine ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal in an airplane ex117 that can decode the encoded data. Each device that has received 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 the present disclosure.
[0277] [Distributed processing] In addition, the streaming server ex103 may be a plurality of servers or a plurality of computers that distribute, process, record, and deliver data. For example, the streaming server ex103 may be implemented by a CDN (Content Delivery Network), and content delivery may be realized by a network connecting a large number of edge servers distributed around the world and between the edge servers. In a CDN, a physically closer edge server is dynamically assigned according to the client. Then, by caching and delivering the content to the edge server, the delay can be reduced. Also, when some error occurs or the communication state changes due to an increase in traffic, etc., the processing can be distributed among multiple edge servers, the delivery entity can be switched to another edge server, or the part of the network with a failure can be bypassed to continue the delivery, so high-speed and stable delivery can be realized.
[0278] In addition to just the distributed processing of the delivery itself, the encoding process of the captured data may be performed on each terminal, on the server side, or they may be shared between each other. As an example, generally in the encoding process, the processing loop is performed twice. In the first loop, the complexity of the image in units of frames or scenes, or the amount of codes, is detected. Also, in the second loop, a process to improve the encoding efficiency while maintaining the image quality is performed. For example, by having the terminal perform the first encoding process and the server side that receives the content perform the second encoding process, it is possible to improve the quality and efficiency of the content while reducing the processing load on each terminal. In this case, if there is a requirement to receive and decode in almost real time, since the data encoded for the first time by the terminal can be received and played back by other terminals, more flexible real-time delivery becomes possible.
[0279] As another example, cameras such as ex113 perform feature extraction from an image, compress data related to the feature amount as metadata, and transmit it to a server. The server performs compression according to the meaning of the image, such as determining the importance of an object from the feature amount and switching the quantization accuracy. Feature amount data is particularly effective in improving the accuracy and efficiency of motion vector prediction during re-compression on the server. Also, simple encoding such as VLC (Variable Length Coding) may be performed on the terminal, and encoding with a large processing load such as CABAC (Context Adaptive Binary Arithmetic Coding) may be performed on the server.
[0280] As yet another example, in a stadium, shopping mall, factory, etc., there may be a plurality of video data in which substantially the same scene is captured by a plurality of terminals. In this case, using a plurality of terminals that have performed shooting, and other terminals and servers that have not performed shooting as necessary, encoding processing is respectively assigned in units such as GOP (Group of Picture), picture unit, or tile unit obtained by dividing a picture, and distributed processing is performed. Thereby, delay can be reduced and more real-time performance can be realized.
[0281] Also, since the plurality of video data is of substantially the same scene, the server may manage and / or give instructions so that the video data captured by each terminal can refer to each other. Alternatively, the encoded data from each terminal may be received by the server, and the reference relationship may be changed among the plurality of data, or the picture itself may be corrected or replaced and re-encoded. Thereby, a stream with improved quality and efficiency of each piece of data can be generated.
[0282] Also, the server may perform transcoding to change the encoding method of the video data and then distribute the video data. For example, the server may convert an MPEG-based encoding method to a VP-based method, or convert H.264 to H.265.
[0283] In this way, the encoding process can be performed by the terminal or one or more servers. Therefore, hereinafter, descriptions such as "server" or "terminal" will be used as the entity performing the process. However, part or all of the processes performed by the server may be performed by the terminal, or part or all of the processes performed by the terminal may be performed by the server. Also, regarding these, the same applies to the decoding process.
[0284] [3D, Multi-angle] In recent years, it has become increasingly common to integrate and utilize different scenes photographed by terminals such as a plurality of cameras ex113 and / or smartphones ex115 that are substantially synchronized with each other, or images or videos of the same scene photographed from different angles. The videos photographed by each terminal are integrated based on the relative positional relationship between the terminals obtained separately or the regions where the feature points included in the videos match.
[0285] The server may not only encode a two-dimensional moving image, but also automatically or at a time specified by the user encode a still image based on scene analysis of the moving image and transmit it to the receiving terminal. If the server can obtain the relative positional relationship between the photographing terminals, it can generate the three-dimensional shape of the scene based not only on the two-dimensional moving image but also on videos of the same scene photographed from different angles. Note that the server may separately encode the three-dimensional data generated by a point cloud or the like, or select or reconstruct the video to be transmitted to the receiving terminal from the videos photographed by a plurality of terminals based on the results of recognizing or tracking a person or an object using the three-dimensional data.
[0286] In this way, the user can arbitrarily select each video corresponding to each photographing terminal to enjoy the scene, or can also enjoy the content obtained by cutting out a video from an arbitrary viewpoint from the three-dimensional data reconstructed using a plurality of images or videos. Furthermore, similar to the video, sound is also collected from a plurality of different angles, and the server may multiplex and transmit the sound from a specific angle or space with the video according to the video.
[0287] In recent years, content that associates the real world with the virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become widespread. In the case of VR images, the server may create viewpoint images for the right eye and the left eye respectively, and perform coding that allows reference between each viewpoint video by means of Multi-View Coding (MVC) or the like, or may perform coding as separate streams without referring to each other. At the time of decoding the separate streams, it is advisable to synchronize and play them so that a virtual three-dimensional space is reproduced according to the user's viewpoint.
[0288] In the case of AR images, the server superimposes virtual object information on the virtual space on the camera information of the real space based on the three-dimensional position or the movement of the user's viewpoint. The decoding device may acquire or hold the virtual object information and the three-dimensional data, generate a two-dimensional image according to the movement of the user's viewpoint, and create superimposed data by smoothly connecting them. Alternatively, in addition to requesting the virtual object information, the decoding device may transmit the movement of the user's viewpoint to the server, and the server may create superimposed data according to the movement of the viewpoint received from the three-dimensional data held by the server, encode the superimposed data, and distribute it to the decoding device. Note that the superimposed data has an α value indicating transparency in addition to RGB, and the server may set the α value of the part other than the object created from the three-dimensional data to 0 or the like and encode it in a state where the part is transparent. Or, the server may set an RGB value of a predetermined value as the background like chroma key and generate data with the part other than the object being the background color.
[0289] The decoding process of the data delivered in the same way may be performed on each client terminal, on the server side, or they may be shared. As an example, a certain terminal may once send a reception request to the server, and the content corresponding to the request may be received by another terminal and decoded, and the decoded signal may be transmitted to a device having a display. By dispersing the processing regardless of the performance of the communicable terminals themselves and selecting appropriate content, it is possible to reproduce high-quality data. As another example, while receiving large-size image data on a TV or the like, only a part of the area such as a tile in which the picture is divided may be decoded and displayed on the viewer's personal terminal. As a result, while sharing the overall image, it is possible to check at hand the area in one's own field of responsibility or the area to be confirmed in more detail.
[0290] In the future, regardless of indoors or outdoors, in a situation where multiple short-range, medium-range, or long-range wireless communications can be used, by using a delivery system standard such as MPEG-DASH, it is expected to receive content seamlessly while switching appropriate data for the ongoing communication. As a result, the user can switch in real time while freely selecting not only their own terminal but also decoding devices or display devices such as displays installed indoors and outdoors. Also, based on their own location information and the like, it is possible to perform decoding while switching the terminal to be decoded and the terminal to be displayed. As a result, it is also possible to move while displaying map information on a part of the wall surface or ground of the adjacent building where a displayable device is embedded during the movement to the destination. Also, based on the ease of access to the encoded data on the network, such as the encoded data being cached in a server that can be accessed from the receiving terminal in a short time, or being copied to an edge server in a content delivery service, it is also possible to switch the bit rate of the received data.
[0291] [Scalable Encoding] Regarding content switching, an explanation will be given using a scalable stream that is compression-encoded by applying the moving image encoding method shown in each of the above embodiments and shown in FIG. 20. The server may have a plurality of streams with the same content but different qualities as individual streams, but as shown in the figure, by taking advantage of the characteristics of a temporally / spatially scalable stream realized by performing encoding by dividing into layers, a configuration for switching content may be adopted. That is, by determining up to which layer to decode according to internal factors such as performance and external factors such as the state of the communication bandwidth on the decoding side, the decoding side can freely switch between low-resolution content and high-resolution content for decoding. For example, when you want to watch the continuation of a video that you were watching on your smartphone ex115 while moving on a device such as an Internet TV after returning home, the device only needs to decode the same stream to a different layer, thus reducing the burden on the server side.
[0292] Furthermore, as described above, in addition to the configuration that realizes scalability in which pictures are encoded layer by layer and an enhancement layer exists above the base layer, the enhancement layer may include meta information based on statistical information of the image, and the decoding side may generate high-quality content by super-resolving the pictures of the base layer based on the meta information. Super-resolution may be either an improvement in the signal-to-noise ratio at the same resolution or an increase in the resolution. The meta information includes information for specifying linear or non-linear filter coefficients used in the super-resolution process, or information for specifying parameter values in filter processing, machine learning, or least squares operation used in the super-resolution process.
[0293] Alternatively, the picture may be divided into tiles or the like according to the meaning such as an object in the image, and the decoding side may decode only a part of the area by selecting the tile to be decoded. Further, by storing the attributes of the object (such as a person, a car, a ball, etc.) and the position in the video (such as the coordinate position in the same image) as meta information, the decoding side can specify the position of the desired object based on the meta information and determine the tile including the object. For example, as shown in FIG. 21, the meta information is stored using a data storage structure different from pixel data such as the SEI message in HEVC. This meta information indicates, for example, the position, size, or color of the main object.
[0294] Further, the meta information may be stored in a unit composed of a plurality of pictures such as a stream, a sequence, or a random access unit. Thereby, the decoding side can obtain the time when a specific person appears in the video, etc., and by combining it with the information in picture units, it can specify the picture in which the object exists and the position of the object in the picture.
[0295] [Optimization of Web Page] FIG. 22 is a diagram showing an example of a display screen of a web page on a computer ex111 or the like. FIG. 23 is a diagram showing an example of a display screen of a web page on a smartphone ex115 or the like. As shown in FIGS. 22 and 23, a web page may include a plurality of link images that are links to image contents, and the appearance thereof may be different depending on the device for viewing. When a plurality of link images are visible on the screen, until the user explicitly selects a link image, or until the link image approaches the vicinity of the center of the screen or the entire link image enters the screen, the display device (decoding device) displays a still image or an I picture that each content has as a link image, displays a video like a gif animation with a plurality of still images or I pictures, etc., or receives only the base layer and decodes and displays the video.
[0296] When a user selects a linked image, the display device decodes the base layer with the highest priority. If there is information indicating that the HTML constituting the web page is scalable content, the display device may decode up to the enhancement layer. Also, in order to ensure real-time performance, before being selected or when the communication bandwidth is extremely tight, the display device can reduce the delay (the delay from the start of content decoding to the start of display) between the decoding time and the display time of the leading picture by decoding and displaying only forward-reference pictures (I pictures, P pictures, B pictures with only forward reference). Further, the display device may deliberately ignore the reference relationship of the pictures, coarsely decode all B pictures and P pictures with forward reference, and perform normal decoding as the received pictures increase over time.
[0297] [Autonomous Driving] Also, when transmitting and receiving still image or video data such as two-dimensional or three-dimensional map information for the autonomous driving or driving assistance of a vehicle, the receiving terminal may receive, in addition to the image data belonging to one or more layers, weather or construction information, etc. as meta information, and decode them in association with each other. Note that the meta information may belong to a layer or may simply be multiplexed with the image data.
[0298] In this case, since a vehicle, drone, airplane, etc. including the receiving terminal moves, the receiving terminal can achieve seamless reception and decoding by transmitting the position information of the receiving terminal at the time of receiving a request, while switching between the base stations ex106 to ex110. Also, the receiving terminal can dynamically switch how much meta information to receive or how much to update the map information according to the user's selection, the user's situation, or the state of the communication bandwidth.
[0299] In the above manner, in the content supply system ex100, the client can receive, decode, and play back the encoded information transmitted by the user in real time.
[0300] [Delivery of Personal Content] In addition, in the content supply system ex100, not only high-quality and long-duration content by video distributors but also unicast or multicast distribution of low-quality and short-duration content by individuals is possible. Also, it is considered that such individual content will increase in the future. In order to make individual content into better content, the server may perform encoding processing after performing editing processing. This can be realized, for example, with the following configuration.
[0301] At the time of shooting in real time or accumulating and after shooting, the server performs recognition processing such as shooting error, scene search, semantic analysis, and object detection from the original image or encoded data. Then, based on the recognition result, the server manually or automatically corrects out-of-focus or camera shake, deletes less important scenes such as scenes with lower brightness or out-of-focus compared to other pictures, emphasizes the edges of objects, or changes the color tone, etc. The server encodes the edited data based on the editing result. Also, it is known that the viewing rate decreases if the shooting time is too long. The server may automatically clip not only less important scenes but also scenes with little movement, etc., so that the content is within a specific time range according to the shooting time, based on the image processing result. Or, the server may generate and encode a digest based on the result of semantic analysis of the scene.
[0302] Note that there are cases where personal content may contain elements that, as they are, would infringe copyright, moral rights of the author, or the right of portrait, etc., and there may be inconvenient situations for individuals, such as the sharing scope exceeding the intended scope. Therefore, for example, the server may deliberately change the image to be out of focus, such as the face of a person in the peripheral part of the screen or the inside of a house, and then encode it. Also, the server may recognize whether a face of a person different from the pre-registered person is reflected in the image to be encoded, and if so, perform processing such as applying a mosaic to the face part. Alternatively, as pre-processing or post-processing of encoding, from the perspective of copyright, etc., the user designates a person or background area that the user wants to process the image, and the server can perform processing such as replacing the designated area with another video or blurring the focus. In the case of a person, the video of the face part can be replaced while tracking the person in the moving image.
[0303] Also, since the viewing of personal content with a small data volume has a strong requirement for real-time performance, depending on the bandwidth, the decoding device first receives the base layer with the highest priority and decodes and plays it. During this period, the decoding device may receive the enhancement layer and, when the playback is looped or played more than twice, play a high-quality video including the enhancement layer. For a stream encoded in a scalable manner like this, the video is rough when not selected or at the beginning of viewing, but it can provide an experience where the stream gradually becomes smarter and the image quality improves. In addition to scalable encoding, a similar experience can be provided even if a rough stream played for the first time and a second stream encoded with reference to the first video are configured as one stream.
[0304] [Other Usage Examples] Also, these encoding or decoding processes are generally processed in the LSIex500 that each terminal has. The LSIex500 may be a one-chip configuration or a configuration consisting of multiple chips. Note that software for video encoding or decoding may be incorporated into some recording medium (such as a CD-ROM, flexible disk, or hard disk) that can be read by a computer ex111 or the like, and encoding or decoding processing may be performed using that software. Further, when the smartphone ex115 has a camera, video data acquired by the camera may be transmitted. The video data at this time is data encoded by the LSIex500 that the smartphone ex115 has.
[0305] Note that the LSIex500 may be configured to download and activate application software. In this case, the terminal first determines whether the terminal supports the encoding method of the content or has the ability to execute a specific service. If the terminal does not support the encoding method of the content or does not have the ability to execute a specific service, the terminal downloads a codec or application software and then acquires and plays the content.
[0306] Also, not limited to the content supply system ex100 via the Internet ex101, at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) of the above embodiments can be incorporated into a digital broadcast system. Since multiplexed data in which video and audio are multiplexed is carried on broadcast radio waves using a satellite or the like for transmission and reception, there is a difference in that it is more suitable for multicast compared to the unicast-friendly configuration of the content supply system ex100, but similar applications are possible for encoding and decoding processing.
[0307] [Hardware Configuration] FIG. 24 is a diagram showing the smartphone ex115. Further, FIG. 25 is a diagram showing a configuration example of the smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex465 capable of capturing video and still images, and a display unit ex458 for displaying data obtained by decoding the video captured by the camera unit ex465 and the video received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting audio or sound, an audio input unit ex456 such as a microphone for inputting audio, a memory unit ex467 capable of storing the captured video or still image, the recorded audio, the received video or still image, the encoded data such as e-mail, or the decoded data, and a slot unit ex464 which is an interface unit with the SIM ex468 for identifying the user and authenticating access to various data including the network. Note that an external memory may be used instead of the memory unit ex467.
[0308] Further, a main control unit ex460 that comprehensively controls the display unit ex458, the operation unit ex466, etc., a power supply circuit unit ex461, an operation input control unit ex462, a video signal processing unit ex455, a camera interface unit ex463, a display control unit ex459, a modulation / demodulation unit ex452, a multiplexing / demultiplexing unit ex453, an audio signal processing unit ex454, a slot unit ex464, and a memory unit ex467 are connected via a bus ex470.
[0309] When the power key is turned on by the user's operation, the power supply circuit unit ex461 starts the smartphone ex115 in an operable state by supplying power from the battery pack to each unit.
[0310] The smartphone ex115 performs processes such as calls and data communications based on the control of the main control unit ex460 having a CPU, ROM, RAM, etc. During a call, the voice signal picked up by the voice input unit ex456 is converted into a digital voice signal by the voice signal processing unit ex454, spectrally spread by the modulation / demodulation unit ex452, and after performing digital-to-analog conversion processing and frequency conversion processing by the transmission / reception unit ex451, it is transmitted via the antenna ex450. Also, the received data is amplified, frequency conversion processing and analog-to-digital conversion processing are performed, spectral despreading processing is performed by the modulation / demodulation unit ex452, and after converting it into an analog voice signal by the voice signal processing unit ex454, it is output from the voice output unit ex457. In the data communication mode, text, still images, or video data is sent to the main control unit ex460 via the operation input control unit ex462 by operating the operation unit ex466 of the main body unit, and the same transmission and reception processing is performed. When transmitting video, still images, or video and voice in the data communication mode, the video signal processing unit ex455 compresses and encodes the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 by the moving image encoding method shown in each of the above embodiments, and sends the encoded video data to the multiplexing / demultiplexing unit ex453. Also, the voice signal processing unit ex454 encodes the voice signal picked up by the voice input unit ex456 while the camera unit ex465 is capturing video or still images, etc., and sends the encoded voice data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and the encoded voice data in a predetermined manner, performs modulation processing and conversion processing by the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451, and transmits it via the antenna ex450.
[0311] When receiving a video attached to an email or chat, or a video linked to a web page or the like, in order to decode the multiplexed data received via the antenna ex450, the multiplexing / demultiplexing unit ex453 separates the multiplexed data into a bit stream of video data and a bit stream of audio data by separating the multiplexed data, supplies the encoded video data to the video signal processing unit ex455 via the synchronization bus ex470, and supplies the encoded audio data to the audio signal processing unit ex454. The video signal processing unit ex455 decodes the video signal by a video decoding method corresponding to the moving image encoding method shown in each of the above embodiments, and the video or still image included in the linked moving image file is displayed from the display unit ex458 via the display control unit ex459. Also, the audio signal processing unit ex454 decodes the audio signal, and audio is output from the audio output unit ex457. Since real-time streaming is widespread, there may be a situation where it is not socially appropriate to play audio depending on the user's situation. Therefore, as an initial value, it is desirable to have a configuration that plays only the video data without playing the audio signal. The audio may be played synchronously only when the user performs an operation such as clicking on the video data.
[0312] Also, although the smartphone ex115 has been described as an example here, as the terminal, in addition to the transceiver type terminal having both an encoder and a decoder, there are three possible implementation forms: a transmission terminal having only an encoder and a reception terminal having only a decoder. Furthermore, in the digital broadcast system, although it has been described as receiving or transmitting multiplexed data in which audio data and the like are multiplexed in video data, the multiplexed data may include character data related to the video in addition to the audio data, or the video data itself may be received or transmitted instead of the multiplexed data.
[0313] Although the main control unit ex460 including the CPU has been described as controlling the encoding or decoding process, the terminal often has a GPU. Therefore, a configuration in which a wide area is processed in a batch by taking advantage of the performance of the GPU using a memory shared by the CPU and the GPU or a memory whose address is managed so as to be commonly used may be adopted. As a result, the encoding time can be shortened, real-time performance can be ensured, and low latency can be realized. In particular, it is efficient to perform the processes of motion search, deblocking filter, SAO (Sample Adaptive Offset), and transform / quantization in units such as pictures using the GPU instead of the CPU.
[0314] This aspect may be implemented in combination with at least a part of other aspects in the present disclosure. Also, a part of the processes described in the flowchart of this aspect, a part of the configuration of the device, a part of the syntax, etc. may be implemented in combination with other aspects.
Industrial Applicability
[0315] The present disclosure can be used, for example, in a television receiver, a digital video recorder, a car navigation system, a mobile phone, a digital camera, a digital video camera, a video conferencing system, or an electronic mirror.
Description of Signs
[0316] 100 Encoding device 102 Splitting unit 104 Subtraction unit 106 Transformation unit 108 Quantization unit 110 Entropy encoding unit 112, 204 Inverse quantization unit 114, 206 Inverse transformation unit 116, 208 Addition unit 118, 210 Block memory 120, 212 Loop filter unit 122, 214 Frame memory 124, 216 Intra prediction unit 126, 218 Inter prediction unit 128 and 220 Prediction and Control Unit 160 and 260 Circuits 162 and 262 Memories 200 Decoder 202 Entropy Decoding Unit
Claims
1. A circuit, a memory, and comprising: the circuit uses the memory to determine a filter to be used for deblocking filter processing from a plurality of filters including a first filter, a second filter, and a third filter, perform the deblocking filter processing at a block boundary using the determined filter, the first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary, the second filter is a filter that uses N (N is an integer greater than M) pixels above the block boundary and N pixels below the block boundary, the third filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary, the number of the first pixels is any one of a first plurality of candidate values, the number of the second pixels is any one of a second plurality of candidate values, each of the first plurality of candidate values and each of the second plurality of candidate values are N or a value greater than N, when the block boundary is at a predetermined position, N is used for the number of the first pixels, An encoding device.
2. A circuit, a memory, and comprising: the circuit uses the memory to determine a filter to be used for deblocking filter processing from a plurality of filters including a first filter, a second filter, and a third filter, perform the deblocking filter processing at a block boundary using the determined filter, the first filter is a filter that uses M (M is an integer of 2 or more) pixels above the block boundary and M pixels below the block boundary, the second filter is a filter that uses N (N is an integer greater than M) pixels above the block boundary and N pixels below the block boundary, the third filter is a filter that uses a first pixel above the block boundary and a second pixel below the block boundary, the number of the first pixels is any one of a first plurality of candidate values, the number of the second pixels is any one of a second plurality of candidate values, each of the first plurality of candidate values and each of the second plurality of candidate values are N or a value greater than N, when the block boundary is at a predetermined position, N is used for the number of the first pixels, A decoding device.
Citation Information
Patent Citations
Video processing apparatus and video processing method
JP2017050766A
Image processing device and image processing method
WO2013001957A1