Encoding device, decoding device, and bitstream generating device

By employing asymmetric deblocking filter characteristics based on pixel values and prediction modes, the encoding and decoding devices enhance error reduction in H.265/HEVC, addressing the inefficiencies of symmetric filtering in discontinuous error distributions.

JP7723822B2Active Publication Date: 2025-08-14PANASONIC INTELLECTUAL PROPERTY CORP OF AMERICA
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
JP2024192616
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2017-05-30
Filing Date
2024-11-01
Publication Date
2025-08-14
Estimated Expiration
2038-04-04

AI Technical Summary

Technical Problem

The deblocking filter process in H.265/HEVC video coding standard applies symmetric filter characteristics across block boundaries, leading to reduced error reduction efficiency when error distribution is discontinuous.

Method used

The encoding and decoding devices determine asymmetric filter characteristics across block boundaries to perform deblocking filter processing, adjusting filter coefficients, weights, and offset values based on pixel values, prediction modes, and quantization parameters to enhance error reduction.

Benefits of technology

The asymmetric filtering approach effectively reduces errors in pixels with large discrepancies while minimizing smoothing effects on pixels with smaller errors, improving overall filtering efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007723822000003
    Figure 0007723822000003
  • Figure 0007723822000004
    Figure 0007723822000004
  • Figure 0007723822000005
    Figure 0007723822000005
Patent Text Reader

Abstract

To provide a coding device to which a filter that nips a block boundary and has an asymmetrical characteristic is applied.SOLUTION: The coding device includes: performing multiplication for a first block by using a plurality of first brightness filter coefficients as a multiplication value and multiplication for a second block by using a plurality of second brightness filter coefficients as a multiplication value, and thereby performing filter processing to a first boundary between the first block and the second block (S112); performing multiplication for a third block by using a plurality of first color difference filter coefficient as a multiplication value and multiplication for a fourth block by using a plurality of second collor difference filter coefficient as a multiplication value, and thereby performing the filtering processing to a second boundary between the third block and the fourth block, and selecting the plurality of first brightness filter coefficients and the plurality of second brightness filter coefficients asymmetrically with respect to the first boundary (S111); and selecting the plurality of first color difference filter coefficients and the plurality of second color difference filter coefficient symmetrically with respect to a second boundary.SELECTED DRAWING: Figure 13
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to an encoding device, a decoding device, an encoding method, and a decoding method. [Background technology]

[0002] A video coding standard called HEVC (High-Efficiency Video Coding) has been standardized by the Joint Collaborative Team on Video Coding (JCT-VC). [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] H.265(ISO / IEC 23008-2 HEVC(High Efficiency Video Coding)) Summary of the Invention [Problem to be solved by the invention]

[0004] Further improvements in such encoding and decoding techniques are required.

[0005] Therefore, an object of the present disclosure is to provide an encoding device, a decoding device, an encoding method, or a decoding method that can achieve further improvements. [Means for solving the problem]

[0006] An encoding device according to an aspect of the present disclosure includes a processing circuit and a memory connected to the processing circuit, wherein the processing circuit uses the memory to perform multiplication for a first block using a plurality of first luma filter coefficients as multipliers and multiplication for a second block using a plurality of second luma filter coefficients as multipliers, thereby changing values of a plurality of luma pixels in the first block and the second block, thereby performing a filter process on a first boundary between the first block and the second block, and to perform multiplication for a third block using a plurality of first chroma filter coefficients as multipliers and multiplication for a fourth block using a plurality of second chroma filter coefficients as multipliers. a filtering process is performed on a second boundary between the third block and the fourth block by changing values of a plurality of chrominance pixels in the third block and the fourth block by performing a filtering process on the second boundary between the third block and the fourth block, wherein the plurality of first luma filter coefficients and the plurality of second luma filter coefficients are selected asymmetrically with respect to the first boundary, the plurality of first luma filter coefficients and the plurality of second luma filter coefficients are selected based on a prediction mode of the first block, a prediction mode of the second block, and a quantization parameter, and the plurality of first chrominance filter coefficients and the plurality of second chrominance filter coefficients are selected symmetrically with respect to the second boundary.

[0007] A decoding device according to an aspect of the present disclosure includes a processing circuit and a memory connected to the processing circuit, wherein the processing circuit uses the memory to perform multiplication for a first block using a plurality of first luma filter coefficients as multipliers and to perform multiplication for a second block using a plurality of second luma filter coefficients as multipliers, thereby changing values of a plurality of luma pixels in the first block and the second block, and performs filtering on a first boundary between the first block and the second block; and performs multiplication for a third block using a plurality of first chroma filter coefficients as multipliers and a fourth block using a plurality of second chroma filter coefficients as multipliers. a filtering process is performed on a second boundary between the third block and the fourth block by changing values of a plurality of chrominance pixels in the third block and the fourth block, wherein the plurality of first luma filter coefficients and the plurality of second luma filter coefficients are selected asymmetrically with respect to the first boundary, the plurality of first luma filter coefficients and the plurality of second luma filter coefficients are selected based on a prediction mode of the first block, a prediction mode of the second block, and a quantization parameter, and the plurality of first chrominance filter coefficients and the plurality of second chrominance filter coefficients are selected symmetrically with respect to the second boundary.

[0008] These general or specific aspects may be realized as a system, a method, an integrated circuit, a computer program, or a computer-readable recording medium such as a CD-ROM, or may be realized as any combination of a system, a method, an integrated circuit, a computer program, and a recording medium. [Effects of the Invention]

[0009] The present disclosure can provide an encoding device, a decoding device, an encoding method, or a decoding method that can achieve further improvements. [Brief explanation of the drawings]

[0010] [Figure 1] FIG. 1 is a block diagram showing a functional configuration of a coding device according to the first embodiment. [Figure 2] FIG. 2 is a diagram showing an example of block division according to the first embodiment. [Figure 3] FIG. 3 is a table showing the transformation basis functions corresponding to each transformation type. [Figure 4A] FIG. 4A is a diagram showing an example of the shape of a filter used in ALF. [Figure 4B] FIG. 4B is a diagram showing another example of the shape of the filter used in ALF. [Figure 4C] FIG. 4C is a diagram showing another example of the shape of the filter used in ALF. [Figure 5A] FIG. 5A is a diagram showing 67 intra prediction modes in intra prediction. [Figure 5B] FIG. 5B is a flowchart for explaining an outline of the predicted image correction process using the OBMC process. [Figure 5C] FIG. 5C is a conceptual diagram for explaining an outline of the predicted image correction process using the OBMC process. [Figure 5D] FIG. 5D is a diagram showing an example of FRUC. [Figure 6] FIG. 6 is a diagram for explaining pattern matching (bilateral matching) between two blocks along a motion trajectory. [Figure 7] FIG. 7 is a diagram for explaining pattern matching (template matching) between a template in a current picture and a block in a reference picture. [Figure 8] FIG. 8 is a diagram for explaining a model assuming uniform linear motion. [Figure 9A] FIG. 9A is a diagram for explaining derivation of a motion vector for each sub-block based on motion vectors of a plurality of adjacent blocks. [Figure 9B] FIG. 9B is a diagram for explaining an outline of the motion vector derivation process in the merge mode. [Figure 9C] FIG. 9C is a conceptual diagram for explaining an outline of the DMVR process. [Figure 9D]FIG. 9D is a diagram for explaining an outline of a predicted image generation method using luminance correction processing by LIC processing. [Figure 10] FIG. 10 is a block diagram showing a functional configuration of a decoding device according to the first embodiment. [Figure 11] FIG. 11 is a flowchart of the deblocking filtering process according to the first embodiment. [Figure 12] FIG. 12 is a diagram showing an example of pixel arrangement at a block boundary according to the first embodiment. [Figure 13] FIG. 13 is a flowchart of the deblocking filtering process according to the first embodiment. [Figure 14] FIG. 14 is a flowchart of the deblocking filtering process according to the second embodiment. [Figure 15] FIG. 15 is a diagram showing the relationship between pixel positions in a block and errors according to the second embodiment. [Figure 16] FIG. 16 is a flowchart of the deblocking filtering process according to the third embodiment. [Figure 17] FIG. 17 is a diagram illustrating the transform bases of DCT-II according to the third embodiment. [Figure 18] FIG. 18 is a diagram illustrating the transformation bases of the DST-VII according to the third embodiment. [Figure 19] FIG. 19 is a flowchart of the deblocking filtering process according to the fourth embodiment. [Figure 20] FIG. 20 is a flowchart of the deblocking filtering process according to the fifth embodiment. [Figure 21] FIG. 21 is a diagram showing an example of weights based on the intra-prediction direction and the direction of a block boundary according to the fifth embodiment. [Figure 22] FIG. 22 is a flowchart of the deblocking filtering process according to the sixth embodiment. [Figure 23] FIG. 23 is a diagram showing an example of weights based on quantization parameters according to the sixth embodiment. [Figure 24]FIG. 24 is a diagram showing the overall configuration of a content supply system that realizes a content distribution service. [Figure 25] FIG. 25 is a diagram showing an example of a coding structure for scalable coding. [Figure 26] FIG. 26 is a diagram showing an example of a coding structure for scalable coding. [Figure 27] FIG. 27 is a diagram showing an example of a display screen of a web page. [Figure 28] FIG. 28 is a diagram showing an example of a display screen of a web page. [Figure 29] FIG. 29 is a diagram illustrating an example of a smartphone. [Figure 30] FIG. 30 is a block diagram showing an example of the configuration of a smartphone. DETAILED DESCRIPTION OF THE INVENTION

[0011] The deblocking filter process in H.265 / HEVC, an image coding standard, applies a filter with symmetric characteristics across block boundaries. This can result in a decrease in error reduction efficiency due to symmetric filtering when the error distribution is discontinuous, such as when pixels on one side of a block boundary have small errors and pixels on the other side have large errors. Here, the error refers to the difference in pixel values between the original image and the reconstructed image.

[0012] An encoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary and perform deblocking filter processing using the determined filter characteristics.

[0013] According to this, the encoding device may be able to reduce errors by performing filtering with asymmetric filter characteristics across block boundaries.

[0014] For example, in determining the filter characteristics, the asymmetric filter characteristics may be determined so that the effect of the deblocking filter processing is greater for pixels that are more likely to have a larger error from the original image.

[0015] This allows the encoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0016] For example, in determining the filter characteristics, the asymmetric filter characteristics may be determined by changing the filter coefficients of a reference filter asymmetrically across the block boundary.

[0017] For example, in determining the filter characteristics, asymmetric weights may be determined across the block boundary, and in the deblocking filter processing, a filter operation using filter coefficients may be performed, and the amount of change in pixel value before and after the filter operation may be weighted by the determined asymmetric weights.

[0018] For example, in determining the filter characteristics, an asymmetric offset value may be determined across the block boundary, and in the deblocking filter processing, a filter operation using a filter coefficient may be performed, and the determined asymmetric offset value may be added to the pixel value after the filter operation.

[0019] For example, in determining the filter characteristics, an asymmetric reference value is determined across the block boundary, and in the deblocking filter processing, a filter operation is performed using a filter coefficient, and if the amount of change in pixel value before and after the filter operation exceeds the reference value, the amount of change may be clipped to the reference value.

[0020] For example, in determining the filter characteristics, the conditions for determining whether or not to perform the deblocking filter processing may be set asymmetrically across the block boundary.

[0021] A decoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary and perform deblocking filter processing using the determined filter characteristics.

[0022] According to this, the decoding device may be able to reduce errors by performing filtering with asymmetric filter characteristics across the block boundary.

[0023] For example, in determining the filter characteristics, the asymmetric filter characteristics may be determined so that the effect of the deblocking filter processing is greater for pixels that are more likely to have a larger error from the original image.

[0024] This allows the decoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0025] For example, in determining the filter characteristics, the asymmetric filter characteristics may be determined by changing the filter coefficients of a reference filter asymmetrically across the block boundary.

[0026] For example, in determining the filter characteristics, asymmetric weights may be determined across the block boundary, and in the deblocking filter processing, a filter operation using filter coefficients may be performed, and the amount of change in pixel value before and after the filter operation may be weighted by the determined asymmetric weights.

[0027] For example, in determining the filter characteristics, an asymmetric offset value may be determined across the block boundary, and in the deblocking filter processing, a filter operation using a filter coefficient may be performed, and the determined asymmetric offset value may be added to the pixel value after the filter operation.

[0028] For example, in determining the filter characteristics, an asymmetric reference value is determined across the block boundary, and in the deblocking filter processing, a filter operation is performed using a filter coefficient, and if the amount of change in pixel value before and after the filter operation exceeds the reference value, the amount of change may be clipped to the reference value.

[0029] For example, in determining the filter characteristics, the conditions for determining whether or not to perform the deblocking filter processing may be set asymmetrically across the block boundary.

[0030] An encoding method according to an aspect of the present disclosure determines filter characteristics that are asymmetric across a block boundary, and performs deblocking filtering using the determined filter characteristics.

[0031] According to this, the encoding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across block boundaries.

[0032] A decoding method according to one aspect of the present disclosure determines filter characteristics that are asymmetric across a block boundary, and performs deblocking filtering using the determined filter characteristics.

[0033] According to this, the decoding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across block boundaries.

[0034] An encoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary based on pixel values across the block boundary, and performs deblocking filter processing using the determined filter characteristics.

[0035] This allows the encoding device to potentially reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also allows the encoding device to determine appropriate filter characteristics based on pixel values across block boundaries.

[0036] For example, the filter characteristics may be determined based on the difference between the pixel values.

[0037] For example, in determining the filter characteristics, the difference in the filter characteristics across the block boundary may be increased as the difference in the pixel values increases.

[0038] This may enable the encoding device to prevent unnecessary smoothing from being performed when, for example, a block boundary coincides with the edge of an object in an image.

[0039] For example, when determining the filter characteristics, the difference in pixel values may be compared with a threshold based on a quantization parameter, and if the difference in pixel values is greater than the threshold, the difference in filter characteristics across the block boundary may be made larger than if the difference in pixel values is smaller than the threshold.

[0040] This allows the encoding device to determine filter characteristics that take into account the effect of the quantization parameter on the error.

[0041] For example, in determining the filter characteristics, the difference in the filter characteristics across the block boundary may be made smaller as the difference in the pixel values increases.

[0042] This allows the decoding device to prevent smoothing from being weakened by asymmetry when block boundaries are subjectively noticeable, potentially preventing degradation of subjective performance.

[0043] For example, the filter characteristics may be determined based on the variance of the pixel values.

[0044] A decoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary based on pixel values across the block boundary, and performs deblocking filter processing using the determined filter characteristics.

[0045] This allows the decoding device to potentially reduce errors by performing filtering with asymmetric filter characteristics across a block boundary, and also potentially determine appropriate filter characteristics based on differences in pixel values across the block boundary.

[0046] For example, the filter characteristics may be determined based on the difference between the pixel values.

[0047] For example, in determining the filter characteristics, the difference in the filter characteristics across the block boundary may be increased as the difference in the pixel values increases.

[0048] This allows the decoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0049] For example, when determining the filter characteristics, the difference in pixel values may be compared with a threshold based on a quantization parameter, and if the difference in pixel values is greater than the threshold, the difference in filter characteristics across the block boundary may be made larger than if the difference in pixel values is smaller than the threshold.

[0050] This allows the decoding device to determine filter characteristics that take into account the effect of the quantization parameter on the error.

[0051] For example, in determining the filter characteristics, the difference in the filter characteristics across the block boundary may be made smaller as the difference in the pixel values increases.

[0052] This may enable the decoding device to prevent unnecessary smoothing from being performed when, for example, a block boundary coincides with the edge of an object in an image.

[0053] For example, the filter characteristics may be determined based on the variance of the pixel values.

[0054] An encoding method according to one aspect of the present disclosure determines filter characteristics that are asymmetric across a block boundary based on pixel values across the block boundary, and performs deblocking filtering using the determined filter characteristics.

[0055] This coding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also determine appropriate filter characteristics based on the difference in pixel values across block boundaries.

[0056] A decoding method according to one aspect of the present disclosure determines filter characteristics that are asymmetric across a block boundary based on pixel values across the block boundary, and performs deblocking filtering using the determined filter characteristics.

[0057] According to this, the decoding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across a block boundary, and also be able to determine appropriate filter characteristics based on the difference in pixel values across the block boundary.

[0058] An encoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary based on the angle between the prediction direction of intra prediction and the block boundary, and performs deblocking filtering processing using the determined filter characteristics.

[0059] This allows the encoding device to potentially reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also allows the encoding device to determine appropriate filter characteristics based on the angle between the prediction direction of intra prediction and the block boundary.

[0060] For example, in determining the filter characteristics, the closer the angle is to perpendicular, the greater the difference in the filter characteristics on either side of the block boundary.

[0061] This allows the encoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0062] For example, in determining the filter characteristics, the closer the angle is to horizontal, the smaller the difference in the filter characteristics on either side of the block boundary may be.

[0063] This allows the encoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0064] A decoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary based on the angle between the prediction direction of intra prediction and the block boundary, and performs deblocking filtering processing using the determined filter characteristics.

[0065] This allows the decoding device to potentially reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and potentially determine appropriate filter characteristics based on the angle between the prediction direction of intra prediction and the block boundary.

[0066] For example, in determining the filter characteristics, the closer the angle is to perpendicular, the greater the difference in the filter characteristics on either side of the block boundary.

[0067] This allows the decoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0068] For example, in determining the filter characteristics, the closer the angle is to horizontal, the smaller the difference in the filter characteristics on either side of the block boundary may be.

[0069] This allows the decoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0070] An encoding method according to one aspect of the present disclosure determines asymmetric filter characteristics across a block boundary based on the angle between the prediction direction of intra prediction and the block boundary, and performs deblocking filtering using the determined filter characteristics.

[0071] According to this, the encoding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across a block boundary, and also, the encoding method can determine appropriate filter characteristics based on the angle between the prediction direction of intra prediction and the block boundary.

[0072] A decoding method according to one aspect of the present disclosure determines asymmetric filter characteristics across a block boundary based on the angle between the prediction direction of intra prediction and the block boundary, and performs deblocking filtering using the determined filter characteristics.

[0073] According to this, the decoding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across a block boundary, and also, the decoding method can determine appropriate filter characteristics based on the angle between the prediction direction of intra prediction and the block boundary.

[0074] An encoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary based on the position of a target pixel within a block, and performs deblocking filtering on the target pixel using the determined filter characteristics.

[0075] This allows the encoding device to potentially reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also allows the encoding device to determine appropriate filter characteristics based on the position of the target pixel within the block.

[0076] For example, the filter characteristics may be determined such that the influence of the filtering process is greater for pixels farther from reference pixels for intra prediction.

[0077] This allows the encoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0078] For example, the filter characteristics may be determined so that the effect of the deblocking filtering process on the bottom right pixel is greater than the effect of the deblocking filtering process on the top left pixel.

[0079] This allows the encoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0080] A decoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary based on the position of a target pixel within a block, and performs a deblocking filter process on the target pixel using the determined filter characteristics.

[0081] This allows the decoding device to potentially reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also allows the decoding device to determine appropriate filter characteristics based on the position of the target pixel within the block.

[0082] For example, the filter characteristics may be determined such that the influence of the filtering process is greater for pixels farther from reference pixels for intra prediction.

[0083] This allows the decoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0084] For example, the filter characteristics may be determined so that the effect of the deblocking filtering process on the bottom right pixel is greater than the effect of the deblocking filtering process on the top left pixel.

[0085] This allows the decoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0086] An encoding method according to one aspect of the present disclosure determines asymmetric filter characteristics across a block boundary based on the position of a target pixel within a block, and performs deblocking filtering on the target pixel using the determined filter characteristics.

[0087] This coding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also determine appropriate filter characteristics based on the position of the target pixel within the block.

[0088] A decoding method according to one aspect of the present disclosure determines asymmetric filter characteristics across a block boundary based on the position of a target pixel within a block, and performs deblocking filtering on the target pixel using the determined filter characteristics.

[0089] This decoding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also determine appropriate filter characteristics based on the position of the target pixel within the block.

[0090] An encoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary based on a quantization parameter, and performs deblocking filter processing using the determined filter characteristics.

[0091] This allows the encoding device to potentially reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also allows the encoding device to determine appropriate filter characteristics based on the quantization parameter.

[0092] For example, the filter characteristics may be determined such that the larger the quantization parameter, the greater the effect of the deblocking filtering process.

[0093] This allows the encoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0094] For example, when determining the filter characteristics, the filter characteristics may be determined so that the change in influence accompanying a change in the quantization parameter of the upper left pixel is greater than the change in influence accompanying a change in the quantization parameter of the lower right pixel.

[0095] This allows the encoding device to increase the effect of the filtering process on pixels with large errors, potentially making it possible to further reduce the errors in those pixels.

[0096] A decoding device according to one aspect of the present disclosure includes a processor and a memory, and the processor uses the memory to determine asymmetric filter characteristics across a block boundary based on a quantization parameter, and performs deblocking filter processing using the determined filter characteristics.

[0097] This allows the decoding device to potentially reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also allows the decoding device to determine appropriate filter characteristics based on the quantization parameter.

[0098] For example, the filter characteristics may be determined such that the larger the quantization parameter, the greater the effect of the deblocking filtering process.

[0099] This allows the decoding device to increase the effect of the filtering process on pixels with large errors, potentially reducing the errors of those pixels, and also reduces the effect of the filtering process on pixels with small errors, potentially preventing the errors of those pixels from increasing.

[0100] For example, when determining the filter characteristics, the filter characteristics may be determined so that the change in influence accompanying a change in the quantization parameter of the upper left pixel is greater than the change in influence accompanying a change in the quantization parameter of the lower right pixel.

[0101] This allows the decoding device to increase the effect of the filtering process on pixels with large errors, potentially making it possible to further reduce the errors in those pixels.

[0102] The encoding method according to one aspect of the present disclosure may determine filter characteristics that are asymmetric across a block boundary based on the quantization parameter, and perform deblocking filtering using the determined filter characteristics.

[0103] This coding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also be able to determine appropriate filter characteristics based on a quantization parameter.

[0104] A decoding method according to one aspect of the present disclosure determines filter characteristics that are asymmetric across a block boundary based on a quantization parameter, and performs deblocking filtering using the determined filter characteristics.

[0105] According to this, the decoding method may be able to reduce errors by performing filtering with asymmetric filter characteristics across block boundaries, and also, the decoding method can determine appropriate filter characteristics based on a quantization parameter.

[0106] These comprehensive or specific aspects may be realized as a system, a method, an integrated circuit, a computer program, or a computer-readable recording medium such as a CD-ROM, or may be realized as any combination of a system, a method, an integrated circuit, a computer program, and a recording medium.

[0107] Hereinafter, the embodiments will be specifically described with reference to the drawings.

[0108] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, component placement and connection configurations, steps, and step order shown in the following embodiments are merely examples and are not intended to limit the scope of the claims. Furthermore, among the components in the following embodiments, components that are not described in the independent claims that represent the highest concepts are described as optional components.

[0109] (Embodiment 1) First, an overview of the first embodiment will be described 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 can be applied. However, the first embodiment 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 can be applied, 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 the first embodiment.

[0110] When applying the processing and / or configurations described in each aspect of the present disclosure to the first embodiment, for example, any of the following may be performed.

[0111] (1) For the encoding device or decoding device of the first embodiment, among the multiple components constituting the encoding device or decoding device, components corresponding to the components described in each aspect of the present disclosure are replaced with the components described in each aspect of the present disclosure.

[0112] (2) Any modification, such as addition, replacement, or deletion, of the functions or processes performed by some of the components constituting the encoding device or decoding device of the first embodiment may be made to the encoding device or decoding device, and then components corresponding to the components described in each aspect of the present disclosure may be replaced with the components described in each aspect of the present disclosure.

[0113] (3) The method implemented by the encoding device or decoding device of the first embodiment may be modified by adding a process and / or replacing or deleting some of the processes included in the method, and then replacing the process described in each aspect of the present disclosure with the process described in each aspect of the present disclosure.

[0114] (4) Some of the components constituting the encoding device or decoding device of the first embodiment may be implemented in combination with components described in each aspect of the present disclosure, components having some of the functions of the components described in each aspect of the present disclosure, or components performing some of the processing performed by the components described in each aspect of the present disclosure.

[0115] (5) A component having some of the functions of some of the components constituting the encoding device or decoding device of the first embodiment, or a component that performs some of the processing performed by some of the components constituting the encoding device or decoding device of the first embodiment, is implemented in combination with a component described in each aspect of the present disclosure, a component having some of the functions of the components described in each aspect of the present disclosure, or a component that performs some of the processing performed by the components described in each aspect of the present disclosure.

[0116] (6) In the method implemented by the encoding device or decoding device of the first embodiment, among the multiple processes included in the method, processes corresponding to the processes described in each aspect of the present disclosure are replaced with the processes described in each aspect of the present disclosure.

[0117] (7) Some of the processes included in the method implemented by the encoding device or decoding device of the first embodiment may be implemented in combination with the processes described in each aspect of the present disclosure.

[0118] It should be noted that the manner of implementing the processes and / or configurations described in each aspect of the present disclosure is not limited to the above examples. For example, they may be implemented in a device used for a purpose different from the video / image encoding device or video / image decoding device disclosed in Embodiment 1, or the processes and / or configurations described in each aspect may be implemented independently. Furthermore, the processes and / or configurations described in different aspects may be implemented in combination.

[0119] [Outline of the encoding device] First, an overview of a coding device according to Embodiment 1 will be described. Fig. 1 is a block diagram showing a functional configuration of a coding device 100 according to Embodiment 1. The coding device 100 is a video / image coding device that codes a video / image on a block-by-block basis.

[0120] As shown in FIG. 1, the encoding device 100 is a device that encodes an image on a block-by-block basis, and includes a division unit 102, a subtraction unit 104, a transformation unit 106, a quantization unit 108, an entropy encoding unit 110, an inverse quantization unit 112, an inverse transformation unit 114, an addition unit 116, a block memory 118, a loop filter unit 120, a frame memory 122, an intra prediction unit 124, an inter prediction unit 126, and a prediction control unit 128.

[0121] The encoding device 100 is realized by, for example, a general-purpose processor and memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the division unit 102, the subtraction unit 104, the transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation 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. Alternatively, 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 transformation unit 106, the quantization unit 108, the entropy coding unit 110, the inverse quantization unit 112, the inverse transformation 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.

[0122] Each component included in the encoding device 100 will be described below.

[0123] [Divided part] The division unit 102 divides each picture included in the input video into a plurality of blocks and outputs each block to the subtraction unit 104. For example, the division unit 102 first divides a picture into blocks of a fixed size (e.g., 128x128). These fixed-size blocks are sometimes called coding tree units (CTUs). The division unit 102 then divides each of the fixed-size blocks into blocks of a variable size (e.g., 64x64 or less) based on recursive quadtree and / or binary tree block division. These variable-size blocks are sometimes called coding units (CUs), prediction units (PUs), or transform units (TUs). Note that in this embodiment, there is no need to distinguish between CUs, PUs, and TUs, and some or all of the blocks in a picture may serve as the processing units of CUs, PUs, and TUs.

[0124] Fig. 2 is a diagram showing an example of block division according to embodiment 1. In Fig. 2, solid lines represent block boundaries based on quadtree block division, and dashed lines represent block boundaries based on binary tree block division.

[0125] Here, the block 10 is a square block of 128x128 pixels (128x128 block). This 128x128 block 10 is first divided into four square 64x64 blocks (quadtree block division).

[0126] The top-left 64x64 block is further divided vertically into two rectangular 32x64 blocks, and the left 32x64 block is further divided vertically into two rectangular 16x64 blocks (binary tree block division). As a result, the top-left 64x64 block is divided into two 16x64 blocks 11 and 12 and a 32x64 block 13.

[0127] The top right 64x64 block is divided horizontally into two rectangular 64x32 blocks 14 and 15 (binary tree block division).

[0128] The lower-left 64x64 block is divided into four square 32x32 blocks (quadtree block decomposition). Of the four 32x32 blocks, the upper-left and lower-right blocks are further divided. The upper-left 32x32 block is divided vertically into two rectangular 16x32 blocks, and the right 16x32 block is further divided horizontally into two 16x16 blocks (binary tree block decomposition). The lower-right 32x32 block is divided horizontally into two 32x16 blocks (binary tree block decomposition). As a result, the lower-left 64x64 block is divided into 16x32 block 16, two 16x16 blocks 17 and 18, two 32x32 blocks 19 and 20, and two 32x16 blocks 21 and 22.

[0129] The bottom right 64x64 block 23 is not split.

[0130] 2, block 10 is divided into 13 variable-sized blocks 11 to 23 based on recursive quad-tree and binary tree block division. This type of division is sometimes called QTBT (quad-tree plus binary tree) division.

[0131] In Fig. 2, one block is divided into four or two blocks (quadtree or binary tree block division), but the division is not limited to this. For example, one block may be divided into three blocks (ternary tree block division). Division including such ternary tree block division is sometimes called MBT (multi type tree) division.

[0132] [Subtraction section] The subtraction unit 104 subtracts a prediction signal (prediction sample) from an original signal (original sample) for each block divided by the division unit 102. That is, the subtraction unit 104 calculates a prediction error (also referred to as a residual) of a block to be coded (hereinafter referred to as a current block). Then, the subtraction unit 104 outputs the calculated prediction error to the conversion unit 106.

[0133] The original signal is an input signal to the encoding device 100, and is a signal representing an image of each picture constituting a moving image (for example, a luminance (luma) signal and two color difference (chroma) signals). Hereinafter, the signal representing an image may also be referred to as a sample.

[0134] [Conversion section] The transform unit 106 transforms the spatial domain prediction errors into frequency domain transform coefficients and outputs the transform coefficients to the quantization unit 108. Specifically, the transform unit 106 performs, for example, a predetermined discrete cosine transform (DCT) or discrete sine transform (DST) on the spatial domain prediction errors.

[0135] The transform unit 106 may adaptively select a transform type from among a plurality of transform types and transform the prediction errors into transform coefficients using a transform basis function corresponding to the selected transform type. Such a transform is sometimes called an explicit multiple core transform (EMT) or an adaptive multiple transform (AMT).

[0136] The multiple transform types include, for example, DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII. Fig. 3 is a table showing transform basis functions corresponding to each transform type. In Fig. 3, N represents the number of input pixels. Selection of a transform type from among these multiple transform types may depend, for example, on the type of prediction (intra prediction or inter prediction) or the intra prediction mode.

[0137] Information indicating whether EMT or AMT is applied (e.g., referred to as an AMT flag) and information indicating the selected transformation type are signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).

[0138] Furthermore, the transform unit 106 may retransform the transform coefficients (transform results). Such retransformation may be referred to as an adaptive secondary transform (AST) or a non-separable secondary transform (NSST). For example, the transform unit 106 performs retransformation for each sub-block (e.g., 4x4 sub-block) included in a block of transform coefficients corresponding to intra-prediction errors. Information indicating whether or not to apply NSST and information regarding the transform matrix used for NSST are signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., the sequence level, picture level, slice level, tile level, or CTU level).

[0139] Here, a separable transformation is a method in which the transformation is performed multiple times by separating the input into directions equal to the number of dimensions, and a non-separable transformation is a method in which, when the input is multidimensional, two or more dimensions are treated as one dimension and the transformation is performed all at once.

[0140] For example, one example of a non-separable transformation is when the input is a 4x4 block, it is treated as a single array with 16 elements, and the transformation process is performed on that array using a 16x16 transformation matrix.

[0141] Similarly, a non-separable transformation is one that treats a 4x4 input block as a single array with 16 elements and then performs multiple Givens rotations on that array (Hypercube Givens Transform).

[0142] [Quantization section] The quantization unit 108 quantizes the transform coefficients output from the transform unit 106. Specifically, the quantization unit 108 scans the transform coefficients of the current block in a predetermined scanning order and quantizes the transform coefficients based on quantization parameters (QP) corresponding to the scanned transform coefficients. The quantization unit 108 then outputs the quantized transform coefficients of the current block (hereinafter referred to as quantized coefficients) to the entropy coding unit 110 and the inverse quantization unit 112.

[0143] The predetermined order is an order for quantizing / dequantizing the transform coefficients. For example, the predetermined scanning order is defined as an ascending order (low frequency to high frequency) or a descending order (high frequency to low frequency).

[0144] 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. In other words, as the value of the quantization parameter increases, the quantization error also increases.

[0145] [Entropy coding section] The entropy coding unit 110 generates a coded signal (coded bit stream) by variable-length coding the quantized coefficients input from the quantization unit 108. Specifically, the entropy coding unit 110, for example, binarizes the quantized coefficients and arithmetically codes the binary signal.

[0146] [Dequantization section] The inverse quantization unit 112 inverse quantizes the quantized coefficients input from the quantization unit 108. Specifically, the inverse quantization unit 112 inverse quantizes the quantized coefficients of the current block in a predetermined scanning order. The inverse quantization unit 112 then outputs the inverse quantized transform coefficients of the current block to the inverse transform unit 114.

[0147] [Inverse conversion section] The inverse transform unit 114 restores the prediction error by inverse transforming the transform coefficients that are input from the inverse quantization unit 112. Specifically, the inverse transform unit 114 restores the prediction error of the current block by performing an inverse transform on the transform coefficients that corresponds to the transform performed by the transform unit 106. Then, the inverse transform unit 114 outputs the restored prediction error to the adder unit 116.

[0148] Note that the restored prediction error does not match the prediction error calculated by the subtraction unit 104 because information has been lost due to quantization. In other words, the restored prediction error includes a quantization error.

[0149] [Adder] The adder 116 reconstructs the current block by adding the prediction error input from the inverse transformer 114 and the prediction sample input from the prediction control unit 128. The adder 116 then outputs the reconstructed block to the block memory 118 and the loop filter unit 120. The reconstructed block is sometimes called a local decoded block.

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

[0151] [Loop filter section] The loop filter unit 120 applies a loop filter to the block reconstructed by the adder 116 and outputs the filtered reconstructed block to the frame memory 122. The loop filter is a filter (in-loop filter) used in the encoding loop, and includes, for example, a deblocking filter (DF), a sample adaptive offset (SAO), and an adaptive loop filter (ALF).

[0152] ALF applies a least squares error filter to remove coding artifacts, for example, for each 2x2 sub-block in the current block, one filter selected from multiple filters based on local gradient direction and activity.

[0153] Specifically, first, sub-blocks (e.g., 2x2 sub-blocks) are classified into a plurality of classes (e.g., 15 or 25 classes). The sub-blocks are classified based on the gradient direction and activity. For example, a classification value C (e.g., C=5D+A) is calculated using a gradient direction value D (e.g., 0 to 2 or 0 to 4) and a gradient activity value A (e.g., 0 to 4). Then, based on the classification value C, the sub-blocks are classified into a plurality of classes (e.g., 15 or 25 classes).

[0154] The gradient direction value D is derived by, for example, comparing gradients in multiple directions (e.g., horizontal, vertical, and two diagonal directions), and the gradient activity value A is derived by, for example, adding gradients in multiple directions and quantizing the sum.

[0155] Based on the result of such classification, a filter for the sub-block is determined from among a plurality of filters.

[0156] The filter shape used in ALF is, for example, a circularly symmetric shape. FIGS. 4A to 4C are diagrams showing several examples of filter shapes 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 filter shape is signaled at the picture level. Note that signaling of the information indicating the filter shape does not need to be limited to the picture level, and may be at other levels (e.g., sequence level, slice level, tile level, CTU level, or CU level).

[0157] Whether ALF is turned on or off is determined, for example, at the picture level or the CU level. For example, whether ALF is applied to luminance is determined at the CU level, and whether ALF is applied to chrominance is determined at the picture level. Information indicating whether ALF is turned on or off is signaled at the picture level or the CU level. Note that signaling of information indicating whether ALF is turned on or off does not need to be limited to the picture level or the CU level, and may be at another level (for example, the sequence level, the slice level, the tile level, or the CTU level).

[0158] The coefficient sets of multiple selectable filters (e.g., up to 15 or 25 filters) are signaled at the picture level. Note that the signaling of the coefficient sets does not need to be limited to the picture level, but may also be at other levels (e.g., sequence level, slice level, tile level, CTU level, CU level, or sub-block level).

[0159] [Frame memory] The frame memory 122 is a storage unit for storing reference pictures used in inter prediction, and is sometimes called a frame buffer. Specifically, the frame memory 122 stores the reconstructed blocks filtered by the loop filter unit 120.

[0160] [Intra prediction section] The intra prediction unit 124 generates a prediction signal (intra prediction signal) by performing intra prediction (also referred to as intra-picture prediction) of the current block with reference to blocks in the current picture stored in the block memory 118. Specifically, the intra prediction unit 124 generates the intra prediction signal by performing intra prediction with reference to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 128.

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

[0162] The one or more non-directional prediction modes include, for example, a planar prediction mode and a DC prediction mode defined in the H.265 / High-Efficiency Video Coding (HEVC) standard (Non-Patent Document 1).

[0163] The multiple directional prediction modes include, for example, the 33 prediction modes defined in the H.265 / HEVC standard. Note that the multiple directional prediction modes may also include 32 prediction modes in addition to the 33 directions (65 directional prediction modes in total). Fig. 5A is a diagram showing 67 intra prediction modes (2 non-directional prediction modes and 65 directional prediction modes) in intra prediction. Solid arrows represent the 33 directions defined in the H.265 / HEVC standard, and dashed arrows represent the additional 32 directions.

[0164] Note that a luminance block may be referenced in intra prediction of a chrominance block. That is, the chrominance component of the current block may be predicted based on the luminance component of the current block. This type of intra prediction is sometimes called CCLM (cross-component linear model) prediction. An intra prediction mode of a chrominance block that references such a luminance block (e.g., called a CCLM mode) may be added as one of the intra prediction modes for the chrominance block.

[0165] The intra prediction unit 124 may correct pixel values after intra prediction based on gradients of reference pixels in the horizontal / vertical directions. Intra prediction involving such correction is sometimes called PDPC (position dependent intra prediction combination). Information indicating whether PDPC is applied (e.g., called a PDPC flag) is signaled, for example, at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., sequence level, picture level, slice level, tile level, or CTU level).

[0166] [Inter prediction section] The inter prediction unit 126 generates a prediction signal (inter prediction signal) by performing inter prediction (also referred to as inter prediction) on the current block with reference to a reference picture stored in the frame memory 122 that is different from the current picture. The inter 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 126 performs motion estimation on the current block or sub-block within the reference picture. The inter prediction unit 126 then generates an inter prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., a motion vector) obtained by the motion estimation. The inter prediction unit 126 then outputs the generated inter prediction signal to the prediction control unit 128.

[0167] The motion information used for motion compensation is signaled. For the signaling of the motion vector, a motion vector predictor may be used, i.e., the difference between the motion vector and the motion vector predictor may be signaled.

[0168] Note that an inter-prediction signal may be generated using not only the motion information of the current block obtained by motion estimation, but also the motion information of adjacent blocks. Specifically, an inter-prediction signal may be generated for each sub-block in the current block by weighting and adding a prediction signal based on the motion information obtained by motion estimation and a prediction signal based on the motion information of adjacent blocks. Such inter-prediction (motion compensation) may be called OBMC (overlapped block motion compensation).

[0169] In such an OBMC mode, information indicating the size of a sub-block for OBMC (e.g., called an OBMC block size) is signaled at the sequence level. Also, information indicating whether the OBMC mode is applied (e.g., called an OBMC flag) is signaled at the CU level. Note that the signaling level of this information is not limited to the sequence level and the CU level, and may be other levels (e.g., the picture level, slice level, tile level, CTU level, or sub-block level).

[0170] The OBMC mode will now be described in more detail. Figures 5B and 5C are a flowchart and a conceptual diagram for explaining an outline of the predictive image correction process using the OBMC process.

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

[0172] Next, the motion vector (MV_L) of the coded left adjacent block is applied to the block to be coded to obtain a predicted image (Pred_L), and the predicted image is weighted and superimposed with Pred_L to perform the first correction of the predicted image.

[0173] Similarly, the motion vector (MV_U) of the already coded upper adjacent block is applied to the block to be coded to obtain a predicted image (Pred_U), and the predicted image that has been corrected the first time is weighted and overlaid with Pred_U to perform a second correction of the predicted image, which is then used as the final predicted image.

[0174] Although a two-stage correction method using the left adjacent block and the upper adjacent block has been described here, it is also possible to configure a method in which correction is performed more than two times using the right adjacent block or the lower adjacent block.

[0175] The area to be superimposed does not have to be the pixel area of the entire block, but may be only a part of the area near the block boundary.

[0176] Although the process of correcting a predicted image from one reference picture has been described here, the process is similar when correcting a predicted image from multiple reference pictures. After obtaining corrected predicted images from each reference picture, the obtained predicted images are further superimposed to form the final predicted image.

[0177] The target block to be processed may be a prediction block unit or a sub-block unit obtained by further dividing the prediction block.

[0178] As a method for determining whether to apply OBMC processing, for example, there is a method using obmc_flag, which is a signal indicating whether to apply OBMC processing. As a specific example, an encoding device determines whether a block to be encoded belongs to an area with complex motion, and if it belongs to an area with complex motion, sets the value of obmc_flag to 1 and performs encoding using OBMC processing, and if it does not belong to an area with complex motion, sets the value of obmc_flag to 0 and performs encoding without applying OBMC processing. On the other hand, a decoding device decodes obmc_flag described in a stream, and switches whether to apply OBMC processing depending on the value, and performs decoding.

[0179] Alternatively, the motion information may be derived on the decoding device side without being signaled. For example, a merge mode defined in the H.265 / HEVC standard may be used. Alternatively, the motion information may be derived by performing motion estimation on the decoding device side. In this case, the motion estimation is performed without using pixel values of the current block.

[0180] Here, a mode in which motion estimation is performed on the decoding device side will be described. This mode in which motion estimation is performed on the decoding device side is sometimes called a pattern matched motion vector derivation (PMMVD) mode or a frame rate up-conversion (FRUC) mode.

[0181] An example of the FRUC process is shown in Figure 5D. First, a list of multiple candidates (which may be the same as the merge list) each having a predicted motion vector is generated by referring to the motion vectors of coded blocks spatially or temporally adjacent to the current block. Next, a best candidate MV is selected from the multiple 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.

[0182] Then, a motion vector for the current block is derived based on the motion vector of the selected candidate. Specifically, for example, the motion vector of the selected candidate (best candidate MV) is derived as the motion vector for the current block as is. Also, for example, the motion vector for the current block may be derived by performing pattern matching in a peripheral area of a position in a reference picture corresponding to the motion vector of the selected candidate. That is, a search is performed in a similar manner in a peripheral area of the best candidate MV, and if an MV with a better evaluation value is found, the best candidate MV may be updated to the MV and used as the final MV for the current block. Note that a configuration may be adopted in which this process is not performed.

[0183] The same processing may be performed when processing is performed in units of sub-blocks.

[0184] The evaluation value is calculated by finding the difference between the reconstructed image and a predetermined area by pattern matching between the area in the reference picture corresponding to the motion vector. The evaluation value may be calculated using other information in addition to the difference.

[0185] As the pattern matching, first pattern matching or second pattern matching is used. The first pattern matching and second pattern matching are sometimes called bilateral matching and template matching, respectively.

[0186] In the first pattern matching, pattern matching is performed between two blocks in two different reference pictures that are along the motion trajectory of the current block. Therefore, in the first pattern matching, an area in another reference picture that is along the motion trajectory of the current block is used as a predetermined area for calculating the evaluation value of the candidate.

[0187] FIG. 6 is a diagram illustrating 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 closely matched pair of two blocks along the motion trajectory of a current block (Cur block) in two different reference pictures (Ref0, Ref1). Specifically, for the current block, a difference is derived between a reconstructed image at a specified position in a first coded reference picture (Ref0) specified by a candidate MV and a reconstructed image at a specified position in a second coded reference picture (Ref1) specified by a symmetric MV obtained by scaling the candidate MV by the display time interval, and an evaluation value is calculated using the obtained difference value. The candidate MV with the best evaluation value among multiple candidate MVs may be selected as the final MV.

[0188] Under the assumption of continuous motion trajectories, motion vectors (MV0, MV1) pointing to two reference blocks are proportional to the temporal distances (TD0, TD1) between a current picture (CurPic) and two reference pictures (Ref0, Ref1). For example, if the current picture is located between two reference pictures temporally and the temporal distances from the current picture to the two reference pictures are equal, the first pattern matching derives bidirectional motion vectors that are mirror-symmetric.

[0189] 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., an upper and / or left adjacent block)) and a block in the reference picture. Therefore, in the second pattern matching, the block adjacent to the current block in the current picture is used as a predetermined area for calculating the evaluation value of the candidate.

[0190] 7 is a diagram illustrating an example of pattern matching (template matching) between a template in a current picture and a block in a reference picture. As shown in FIG. 7, in the second pattern matching, a motion vector of a current block is derived by searching a reference picture (Ref0) for a block that best matches a block adjacent to a current block (Cur block) in the current picture (Cur Pic). Specifically, a difference is derived between a reconstructed image of both or either of the coded areas adjacent to the left and / or above the current block and a reconstructed image at the same position in the coded reference picture (Ref0) specified by a candidate MV, an evaluation value is calculated using the obtained difference value, and the candidate MV with the best evaluation value among the multiple candidate MVs is selected as the best candidate MV.

[0191] Information indicating whether such a FRUC mode is applied (e.g., called an FRUC flag) is signaled at the CU level. Furthermore, when the FRUC mode is applied (e.g., when the FRUC flag is true), information indicating a pattern matching method (first pattern matching or second pattern matching) (e.g., called an FRUC mode flag) is signaled at the CU level. Note that signaling of this information does not need to be limited to the CU level, and may be at other levels (e.g., the sequence level, the picture level, the slice level, the tile level, the CTU level, or the sub-block level).

[0192] Here, we will explain a mode in which motion vectors are derived based on a model that assumes uniform linear motion. This mode is sometimes called BIO (bi-directional optical flow) mode.

[0193] FIG. 8 is a diagram for explaining a model assuming uniform linear motion. In FIG. 8, (v x ,v y) denotes a velocity vector, and τ0 and τ1 denote the temporal distance between the current picture (Cur Pic) and two reference pictures (Ref0 and Ref1), respectively. (MVx0,MVy0) denotes a motion vector corresponding to reference picture Ref0, and (MVx1,MVy1) denotes a motion vector corresponding to reference picture Ref1.

[0194] At this time, the velocity vector (v x ,v y ), (MVx0,MVy0) and (MVx1,MVy1) are respectively (v x τ0,v y τ0) and (-v x τ1,-v y τ1), and the following optical flow equation (1) holds:

[0195]

number

[0196] where I (k) denotes the luminance value of reference image k (k=0,1) after motion compensation. This optical flow equation indicates that the sum of (i) the time derivative of the luminance value, (ii) the product of the horizontal velocity and the horizontal component of the spatial gradient of the reference image, and (iii) the product of the vertical velocity and the vertical component of the spatial gradient of the reference image is equal to zero. Based on a combination of this optical flow equation and Hermite interpolation, block-wise motion vectors obtained from a merge list or the like are corrected pixel by pixel.

[0197] Note that the decoding device may derive motion vectors using a method other than that based on a model assuming constant-velocity linear motion. For example, a motion vector may be derived for each sub-block based on the motion vectors of multiple adjacent blocks.

[0198] Here, a mode in which a motion vector is derived for each sub-block based on the motion vectors of multiple neighboring blocks will be described. This mode is sometimes called an affine motion compensation prediction mode.

[0199] FIG. 9A is a diagram for explaining the derivation of motion vectors for each sub-block based on the motion vectors of multiple adjacent blocks. In FIG. 9A, the current block includes 16 4x4 sub-blocks. Here, the motion vector v0 of the upper left corner control point of the current block is derived based on the motion vectors of the adjacent blocks, and the motion vector v1 of the upper right corner control point of the current block is derived based on the motion vectors of the adjacent sub-blocks. Then, using the two motion vectors v0 and v1, the motion vector (v x ,v y ) is derived.

[0200]

number

[0201] Here, x and y respectively indicate the horizontal and vertical positions of the sub-block, and w indicates a predetermined weighting coefficient.

[0202] Such an affine motion compensation prediction mode may include several modes in which the methods of deriving the motion vectors of the upper-left and upper-right corner control points are different. Information indicating such an affine motion compensation prediction mode (e.g., called an affine flag) is signaled at the CU level. Note that the signaling of the information indicating this affine motion compensation prediction mode does not need to be limited to the CU level, and may be at other levels (e.g., the sequence level, the picture level, the slice level, the tile level, the CTU level, or the sub-block level).

[0203] [Predictive control unit] The prediction control unit 128 selects either the intra-prediction signal or the inter-prediction signal, and outputs the selected signal to the subtraction unit 104 and the addition unit 116 as a prediction signal.

[0204] Here, an example of deriving a motion vector for a picture to be coded in merge mode will be described. Fig. 9B is a diagram for explaining an overview of the motion vector derivation process in merge mode.

[0205] First, a prediction MV list is generated in which prediction MV candidates are registered. The prediction MV candidates include spatially adjacent prediction MVs, which are MVs held by multiple coded blocks spatially located around the block to be coded, temporally adjacent prediction MVs, which are MVs held by blocks in the vicinity of the block to be coded projected onto the coded reference picture, joint prediction MVs, which are MVs generated by combining the MV values of the spatially adjacent prediction MVs and the temporally adjacent prediction MVs, and zero prediction MVs, which are MVs with a value of zero.

[0206] Next, one prediction MV is selected from the plurality of prediction MVs registered in the prediction MV list, and is determined as the MV for the block to be coded.

[0207] Furthermore, the variable length coding unit encodes the stream by describing merge_idx, which is a signal indicating which predicted MV has been selected.

[0208] Note that the predicted MVs registered in the predicted MV list described in Figure 9B are just an example, and the number may be different from the number shown in the figure, the configuration may not include some of the types of predicted MVs shown in the figure, or the configuration may include predicted MVs other than the types of predicted MVs shown in the figure.

[0209] The final MV may be determined by performing the DMVR process, which will be described later, using the MV of the block to be coded derived in the merge mode.

[0210] Here, an example of determining the MV using the DMVR process will be described.

[0211] FIG. 9C is a conceptual diagram for explaining an outline of the DMVR process.

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

[0213] Next, the template is used to search the surrounding areas of the candidate MVs in the first and second reference pictures, and the MV with the smallest cost is determined as the final MV. The cost value is calculated using the difference between each pixel value of the template and each pixel value of the search area, the MV value, etc.

[0214] The outline of the processing described here is basically the same for the encoding device and the decoding device.

[0215] Note that other processing may be used instead of the processing described here, as long as it is processing that can search the vicinity of the candidate MV and derive the final MV.

[0216] Here, a mode for generating a predicted image using LIC processing will be described.

[0217] FIG. 9D is a diagram for explaining an outline of a predicted image generation method using luminance correction processing by LIC processing.

[0218] First, an MV for obtaining a reference image corresponding to a block to be coded is derived from a reference picture that is a coded picture.

[0219] Next, for the block to be coded, the luminance pixel values of the coded surrounding reference areas adjacent to the left and above and the luminance pixel values at the equivalent positions in the reference picture specified by the MV are used to extract information indicating how the luminance values have changed between the reference picture and the picture to be coded, and a luminance correction parameter is calculated.

[0220] A predicted image for the block to be coded is generated by performing luminance correction processing on a reference image in a reference picture specified by the MV using the luminance correction parameters.

[0221] The shape of the peripheral reference region in FIG. 9D is an example, and other shapes may be used.

[0222] Although the process of generating a predicted image from one reference picture has been described here, the process is similar when generating a predicted image from multiple reference pictures, and a luminance correction process is performed in a similar manner on the reference images obtained from each reference picture before generating a predicted image.

[0223] One method for determining whether to apply LIC processing is to use lic_flag, which is a signal indicating whether to apply LIC processing. As a specific example, an encoding device determines whether the encoding target block belongs to an area where a luminance change occurs, and if it belongs to an area where a luminance change occurs, sets the value of lic_flag to 1 and performs encoding by applying LIC processing, and if it does not belong to an area where a luminance change occurs, sets the value of lic_flag to 0 and performs encoding without applying LIC processing. On the other hand, a decoding device decodes lic_flag described in the stream, and switches whether to apply LIC processing depending on the value, and performs decoding.

[0224] As another method for determining whether to apply LIC processing, for example, there is also a method for determining whether LIC processing has been applied to surrounding blocks.As a specific example, when the block to be coded is in merge mode, it is determined whether the surrounding coded blocks selected when deriving MV in merge mode processing have been coded using LIC processing, and depending on the result, whether to apply LIC processing is switched and coded.In addition, in this example, the process in decoding is exactly the same.

[0225] [Overview of the decoding device] Next, an overview will be given of a decoding device capable of decoding the coded signal (coded bitstream) output from the above coding device 100. Fig. 10 is a block diagram showing the functional configuration of a decoding device 200 according to Embodiment 1. The decoding device 200 is a video / image decoding device that decodes video / images on a block-by-block basis.

[0226] As shown in FIG. 10, the decoding device 200 includes an entropy decoding unit 202, an inverse quantization unit 204, an inverse transform unit 206, an addition unit 208, a block memory 210, a loop filter unit 212, a frame memory 214, an intra prediction unit 216, an inter prediction unit 218, and a prediction control unit 220.

[0227] The decoding device 200 is realized by, for example, a general-purpose processor and memory. In this case, when a software program stored in the memory is executed by the processor, the processor functions as the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220. Alternatively, the decoding device 200 may be realized as one or more dedicated electronic circuits corresponding to the entropy decoding unit 202, the inverse quantization unit 204, the inverse transform unit 206, the addition unit 208, the loop filter unit 212, the intra prediction unit 216, the inter prediction unit 218, and the prediction control unit 220.

[0228] Each component included in the decoding device 200 will be described below.

[0229] [Entropy Decoding] The entropy decoding unit 202 entropy-decodes the coded bitstream. Specifically, the entropy decoding unit 202 arithmetically decodes the coded bitstream into a binary signal. The entropy decoding unit 202 then debinarizes the binary signal. As a result, the entropy decoding unit 202 outputs quantized coefficients to the inverse quantization unit 204 on a block-by-block basis.

[0230] [Dequantization section] The inverse quantization unit 204 inverse quantizes the quantized coefficients of a block to be decoded (hereinafter referred to as a current block) that is input from the entropy decoding unit 202. Specifically, the inverse quantization unit 204 inverse quantizes each quantized coefficient of the current block based on a quantization parameter corresponding to the quantized coefficient. The inverse quantization unit 204 then outputs the inverse quantized coefficients (i.e., transform coefficients) of the current block to the inverse transform unit 206.

[0231] [Inverse conversion section] The inverse transform unit 206 restores the prediction error by inverse transforming the transform coefficients input from the inverse quantization unit 204 .

[0232] For example, if the information interpreted from the encoded bitstream indicates that EMT or AMT is to be applied (e.g., the AMT flag is true), the inverse transform unit 206 inverse transforms the transform coefficients of the current block based on the interpreted information indicating the transform type.

[0233] Also, for example, if the information decoded from the coded bitstream indicates that NSST is to be applied, then inverse transform unit 206 applies an inverse re-transform to the transform coefficients.

[0234] [Adder] The adder 208 reconstructs the current block by adding the prediction error input from the inverse transformer 206 and the prediction sample input from the prediction control unit 220. The adder 208 then outputs the reconstructed block to the block memory 210 and the loop filter unit 212.

[0235] [Block Memory] The block memory 210 is a storage unit for storing blocks that are referenced in intra prediction and are in a picture to be decoded (hereinafter referred to as a current picture). Specifically, the block memory 210 stores the reconstructed blocks output from the adder 208.

[0236] [Loop filter section] The loop filter unit 212 applies a loop filter to the block reconstructed by the adder unit 208, and outputs the filtered reconstructed block to a frame memory 214, a display device, or the like.

[0237] If the information indicating ALF on / off read from the encoded bitstream indicates that ALF is on, one filter is selected from multiple filters based on the local gradient direction and activity, and the selected filter is applied to the reconstructed block.

[0238] [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 blocks filtered by the loop filter unit 212.

[0239] [Intra prediction section] The intra prediction unit 216 generates a prediction signal (intra prediction signal) by performing intra prediction based on the intra prediction mode interpreted from the encoded bitstream, by referring to blocks in the current picture stored in the block memory 210. Specifically, the intra prediction unit 216 generates the intra prediction signal by performing intra prediction by referring to samples (e.g., luminance values, chrominance values) of blocks adjacent to the current block, and outputs the intra prediction signal to the prediction control unit 220.

[0240] Note that when an intra prediction mode that references a luminance block in 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.

[0241] Furthermore, when information interpreted from the coded bitstream indicates the application of PDPC, the intra prediction unit 216 corrects pixel values after intra prediction based on the gradients of reference pixels in the horizontal and vertical directions.

[0242] [Inter prediction section] The inter prediction unit 218 predicts the current block by referring to a reference picture stored in the frame memory 214. The prediction is performed in units of the current block or sub-blocks (e.g., 4x4 blocks) within the current block. For example, the inter prediction unit 218 generates an inter prediction signal for the current block or sub-block by performing motion compensation using motion information (e.g., motion vectors) interpreted from the coded bitstream, and outputs the inter prediction signal to the prediction control unit 220.

[0243] In addition, if the information interpreted from the encoded bitstream indicates that the OBMC mode is to be applied, the inter prediction unit 218 generates an inter prediction signal using not only the motion information of the current block obtained by motion search, but also the motion information of adjacent blocks.

[0244] Furthermore, if the information interpreted from the coded bitstream indicates that the FRUC mode is to be applied, the inter prediction unit 218 derives motion information by performing motion search according to the pattern matching method (bilateral matching or template matching) interpreted from the coded bitstream. Then, the inter prediction unit 218 performs motion compensation using the derived motion information.

[0245] Furthermore, when the BIO mode is applied, the inter prediction unit 218 derives a motion vector based on a model assuming constant-velocity linear motion. Furthermore, when information interpreted from the coded bitstream indicates that the affine motion compensation prediction mode is to be applied, the inter prediction unit 218 derives a motion vector for each sub-block based on the motion vectors of multiple adjacent blocks.

[0246] [Predictive 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 a prediction signal.

[0247] [Deblocking filter processing] Next, the deblocking filter processing performed in the encoding device 100 and decoding device 200 configured as described above will be described in detail with reference to the drawings. Note that, although the operation of the loop filter unit 120 included in the encoding device 100 will be mainly described below, the operation of the loop filter unit 212 included in the decoding device 200 is also similar.

[0248] 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 an original signal. The encoding device 100 generates quantized coefficients by performing orthogonal transform processing, quantization processing, and the like on the prediction error. The encoding device 100 then restores the prediction error by inverse quantizing and inverse orthogonal transforming the obtained quantized coefficients. Here, because the quantization processing is a lossy process, the restored prediction error has an error (quantization error) relative to the prediction error before transformation.

[0249] The deblocking filtering process performed by the loop filter unit 120 is a type of filtering process that is performed for the purpose of reducing this quantization error. The deblocking filtering process is applied to block boundaries to remove block noise. Note that, hereinafter, this deblocking filtering process will also be referred to simply as filtering.

[0250] Fig. 11 is a flowchart showing an example of deblocking filtering performed by the loop filter unit 120. For example, the processing shown in Fig. 11 is performed for each block boundary.

[0251] First, the loop filter unit 120 calculates a block boundary strength (Bs) to determine the behavior of the deblocking filter process (S101). Specifically, the loop filter unit 120 determines Bs using the prediction mode or motion vector properties of the block to be filtered. For example, if at least one of the blocks on either side of the boundary is an intra-prediction block, Bs is set to 2. Furthermore, if at least one of the following conditions (1) to (3) is satisfied: (1) at least one of the blocks on either side of the boundary contains a dominant orthogonal transform coefficient, (2) the difference between the motion vectors of both blocks on either side of the block boundary is equal to or greater than a threshold, and (3) the number of motion vectors or the reference images of both blocks on either side of the block boundary are different, Bs is set to 1. If none of the conditions (1) to (3) is satisfied, Bs is set to 0.

[0252] Next, the loop filter unit 120 determines whether the set Bs is greater than a first threshold (S102). If Bs is equal to or less than the first threshold (No in S102), the loop filter unit 120 does not perform filtering (S107).

[0253] On the other hand, if the set Bs is greater than the first threshold (Yes in S102), the loop filter unit 120 calculates the pixel variation d of the boundary region using pixel values in the blocks on both sides of the block boundary (S103). This process will be explained using Figure 12. If the pixel values of the block boundary are defined as in Figure 12, the loop filter unit 120 calculates, for example, d = |p30-2×p20+p10| + |p33-2×p23+p13| + |q30-2×q20+q10| + |q33-2×q23+q13|.

[0254] Next, the loop filter unit 120 determines whether the calculated d is greater than a second threshold (S104). If d is equal to or less than the second threshold (No in S104), the loop filter unit 120 does not perform filtering (S107). Note that the first threshold and the second threshold are different.

[0255] If the calculated d is greater than the second threshold (Yes in S104), the loop filter unit 120 determines the filter characteristics (S105) and performs filtering using the determined filter characteristics (S106). For example, a 5-tap filter of (1, 2, 2, 2, 1) / 8 is used. That is, for p10 shown in FIG. 12, the following calculation is performed: (1×p30+2×p20+2×p10+2×q10+1×q20) / 8. During filtering, clipping is performed to keep the displacement within a certain range to avoid excessive smoothing. The clipping here refers to thresholding such that, for example, if the clipping threshold is tc and the pixel value before filtering is q, the pixel value after filtering can only fall within the range of q±tc.

[0256] An example of applying an asymmetric filter across a block boundary in the deblocking filtering process by the loop filter unit 120 according to this embodiment will be described below.

[0257] Fig. 13 is a flowchart showing an example of deblocking filtering according to this embodiment. Note that the processing shown in Fig. 13 may be performed for each block boundary, or may be performed for each unit pixel including one or more pixels.

[0258] First, the loop filter unit 120 acquires coding parameters and determines asymmetric filter characteristics across a block boundary using the acquired coding parameters (S111). In the present disclosure, it is assumed that the acquired coding parameters characterize, for example, an error distribution.

[0259] Here, the filter characteristics include parameters used to control filter coefficients and filter processing. The coding parameters may be any parameters that can be used to determine the filter characteristics. The coding parameters may be information indicating the error itself, or may be information or parameters related to the error (e.g., information or parameters that affect the magnitude of the error).

[0260] In the following description, pixels that are determined to have a large or small error based on the encoding parameters, that is, pixels that are likely to have a large or small error, will also be simply referred to as pixels with a large or small error.

[0261] Here, it is not necessary to perform the determination process each time, but the process may be performed according to a predetermined rule that associates the encoding parameters with the filter characteristics.

[0262] It should be noted that even if a pixel is statistically likely to have a small error, it may have a larger error than a pixel that is likely to have a large error when viewed pixel by pixel.

[0263] Next, the loop filter unit 120 executes a filter process having the determined filter characteristics (S112).

[0264] Here, the filter characteristics determined in step S111 do not necessarily have to be asymmetric, and a symmetric design is also possible. Note that, hereinafter, a filter having filter characteristics that are asymmetric across a block boundary will also be referred to as an asymmetric filter, and a filter having filter characteristics that are symmetric across a block boundary will also be referred to as a symmetric filter.

[0265] Specifically, the filter characteristics are determined taking into consideration two points: that pixels determined to have small errors are less susceptible to the influence of surrounding pixels with large errors, and that pixels determined to have large errors are more susceptible to the influence of surrounding pixels with small errors. In other words, the filter characteristics are determined so that the larger the error, the greater the effect of the filter processing. For example, the filter characteristics are determined so that the larger the error, the greater the change in pixel value before and after filter processing. This makes it possible to prevent pixels that are likely to have small errors from deviating from the true value due to large fluctuations in value. Conversely, for pixels that are likely to have large errors, the error can be reduced by fluctuating the value under the strong influence of pixels with small errors.

[0266] In the following, a factor that changes the displacement caused by a filter is defined as a filter weight. In other words, a weight indicates the degree of influence of the filter process on a target pixel. Increasing the weight means that the influence of the filter process on the pixel in question increases. In other words, it means that the pixel value after the filter process is more susceptible to the influence of other pixels. Specifically, increasing the weight means determining the filter characteristics so that the amount of change in pixel value before and after the filter process increases, or so that the filter process is more easily performed.

[0267] That is, the loop filter unit 120 increases the weight of a pixel with a larger error. Note that increasing the weight of a pixel with a larger error does not necessarily mean continuously changing the weight based on the error, but also includes changing the weight in stages. In other words, the weight of a first pixel should be smaller than the weight of a second pixel that has a larger error than the first pixel. The same expression will be used hereinafter.

[0268] It should be noted that it is not necessary for the weighting of pixels with larger errors to be larger in the finally determined filter characteristics. In other words, the loop filter unit 120 may modify the reference filter characteristics determined by a conventional method, for example, so that the weighting of pixels with larger errors tends to be larger.

[0269] A number of specific methods for changing the weights asymmetrically will be described below. Note that any of the methods described below may be used, or a combination of multiple methods may be used.

[0270] As a first technique, the loop filter unit 120 reduces the filter coefficient for a pixel with a larger error. For example, the loop filter unit 120 reduces the filter coefficient for a pixel with a larger error and increases the filter coefficient for a pixel with a smaller error.

[0271] For example, an example of deblocking filter processing performed on pixel p1 shown in FIG. 12 will be described. In the following, a filter determined by a conventional method, for example, without applying this method, is referred to as the reference filter. The reference filter is assumed to be a 5-tap filter perpendicular to the block boundary, extending over (p3, p2, p1, q1, q2). It is also assumed that the filter coefficients are (1, 2, 2, 2, 1) / 8. It is also assumed that block P is likely to have a large error, and block Q is likely to have a small error. In this case, the filter coefficients are set so that block P with a large error is more susceptible to the influence of block Q with a small error. Specifically, a large filter coefficient is used for pixels with a small error, and a small filter coefficient is used for pixels with a large error. For example, (0.5, 1.0, 1.0, 2.0, 1.5) / 6 is used as the filter coefficients.

[0272] As another example, 0 may be used as the filter coefficient for a pixel with a small error. For example, (0,0,1,2,2) / 5 may be used as the filter coefficient. In other words, the filter tap may be changed. Conversely, a filter coefficient that is currently 0 may be changed to a value other than 0. For example, (1,2,2,2,1,1) / 9 may be used as the filter coefficient. In other words, the loop filter unit 120 may extend the filter tap toward the side with a small error.

[0273] Note that the reference filter does not have to be a filter that is bilaterally symmetrical about the target pixel, such as the above (1,2,2,2,1) / 8. In such cases, the loop filter unit 120 further adjusts the filter. For example, the filter coefficients of the reference filter used for the leftmost pixel of block Q are (1,2,3,4,5) / 15, and the filter coefficients of the reference filter used for the rightmost pixel of block P are (5,4,3,2,1) / 15. In other words, in this case, filter coefficients that are bilaterally inverted are used between pixels on either side of the block boundary. Such filter characteristics that are inversion-symmetrical across the block boundary can also be referred to as "filter characteristics that are symmetrical across the block boundary." In other words, filter characteristics that are asymmetrical across the block boundary are filter characteristics that are not inversion-symmetrical across the block boundary.

[0274] Also, as described above, if the error in block P is large and the error in block Q is small, the loop filter unit 120 changes, for example, the filter coefficients of the reference filter used for the rightmost pixel of block P from (5,4,3,2,1) / 15 to (2.5,2.0,1.5,2.0,1.0) / 9.

[0275] In this way, the deblocking filter process uses a filter whose filter coefficients change asymmetrically across the block boundary. For example, the loop filter unit 120 determines a reference filter having filter characteristics that are symmetric across the block boundary according to a predetermined criterion. The loop filter unit 120 then modifies the reference filter so that it has filter characteristics that are asymmetric across the block boundary. Specifically, the loop filter unit 120 at least one of increasing the filter coefficient of at least one pixel with a small error and decreasing the filter coefficient of at least one pixel with a large error among the filter coefficients of the reference filter.

[0276] Next, a second technique for changing weights asymmetrically will be described. First, the loop filter unit 120 performs a filter operation using a reference filter. Next, the loop filter unit 120 performs asymmetric weighting across a block boundary on a reference change amount Δ0, which is the amount of change in pixel value before and after the filter operation using the reference filter. Note that, for the sake of distinction, hereinafter, the process using the reference filter will be referred to as a filter operation, and a series of processes including the filter operation and the subsequent correction process (e.g., asymmetric weighting) will be referred to as a filter process (deblocking filter process).

[0277] For example, for pixels with small errors, the loop filter unit 120 calculates the post-correction change amount Δ1 by multiplying the reference change amount Δ0 by a coefficient smaller than 1. For pixels with large errors, the loop filter unit 120 calculates the post-correction change amount Δ1 by multiplying the reference change amount Δ0 by a coefficient larger than 1. Next, the loop filter unit 120 generates a post-filtering pixel value by adding the post-correction change amount Δ1 to the pixel value before the filter operation. Note that the loop filter unit 120 may perform only one of the processing for pixels with small errors and the processing for pixels with large errors.

[0278] For example, as in the above, assume that block P has a large error and block Q has a small error. In this case, the loop filter unit 120 calculates the post-correction change amount Δ1 for pixels included in block Q with a small error by, for example, multiplying the reference change amount Δ0 by 0.8. Also, the loop filter unit 120 calculates the post-correction change amount Δ1 for pixels included in block P with a large error by, for example, multiplying the reference change amount Δ0 by 1.2. In this way, it is possible to reduce the fluctuation in the values of pixels with a small error. It is also possible to increase the fluctuation in the values of pixels with a large error.

[0279] The ratio of the coefficient by which the reference change amount Δ0 of a pixel with a small error is multiplied to the coefficient by which the reference change amount Δ0 of a pixel with a large error is multiplied may be set to 1:1. In this case, the filter characteristics are symmetrical across the block boundary.

[0280] Alternatively, the loop filter unit 120 may calculate the coefficient by which the reference change amount Δ0 is multiplied by a reference coefficient by a constant. In this case, the loop filter unit 120 uses a larger constant for pixels with large errors than for pixels with small errors. As a result, the amount of change in pixel value for pixels with large errors increases, and the amount of change in pixel value for pixels that are likely to have small errors decreases. For example, the loop filter unit 120 uses a constant of 1.2 or 0.8 for pixels adjacent to a block boundary, and a constant of 1.1 or 0.9 for pixels one pixel away from the pixel adjacent to the block boundary. The reference coefficient is calculated, for example, by (A×(q1−p1)−B×(q2−p2)+C) / D, where A, B, C, and D are constants. For example, A=9, B=3, C=8, and D=16. p1, p2, q1, and q2 are pixel values of pixels positioned across the block boundary as shown in FIG. 12.

[0281] Next, a third method for asymmetrically changing weights will be described. Similar to the second method, the loop filter unit 120 performs a filter operation using the filter coefficients of the reference filter. Next, the loop filter unit 120 adds offset values asymmetric across the block boundary to pixel values after the filter operation. Specifically, the loop filter unit 120 adds a positive offset value to the pixel value of a pixel with a large error so that the value of the pixel with a large error approaches the value of a pixel that is likely to have a small error and increases the displacement of the pixel with a large error. Furthermore, the loop filter unit 120 adds a negative offset to the pixel value of a pixel with a small error so that the value of the pixel with a small error does not approach the value of a pixel with a large error and decreases the displacement of the pixel with a small error. As a result, the amount of change in pixel value for a pixel with a large error increases, and the amount of change in pixel value for a pixel with a small error decreases. The loop filter unit 120 may perform only one of processing for a pixel with a small error and processing for a pixel with a large error.

[0282] For example, for pixels included in blocks with large errors, the loop filter unit 120 calculates a post-correction change amount Δ1 by adding a positive offset value (e.g., 1) to the absolute value of the reference change amount Δ0. Furthermore, for pixels included in blocks with small errors, the loop filter unit 120 calculates a post-correction change amount Δ1 by adding a negative offset value (e.g., −1) to the absolute value of the reference change amount Δ0. Next, the loop filter unit 120 generates a post-filtering pixel value by adding the post-correction change amount Δ1 to the pixel value before the filter operation. Note that the loop filter unit 120 may add an offset value to the pixel value after the filter operation, rather than to the change amount. Furthermore, the offset value does not have to be symmetrical across the block boundary.

[0283] Furthermore, when a filter tap extends from a block boundary across multiple pixels, the loop filter unit 120 may change the weight for only a specific pixel, or may change the weight for all pixels. Furthermore, the loop filter unit 120 may change the weight depending on the distance from the block boundary to the target pixel. For example, the loop filter unit 120 may make the filter coefficients applied to the first two pixels from the block boundary asymmetric and the filter coefficients applied to subsequent pixels symmetric. Furthermore, the filter weight may be common to multiple pixels, or may be set for each pixel.

[0284] Next, a fourth method for changing weights asymmetrically will be described. The loop filter unit 120 performs a filter operation using the filter coefficients of a reference filter. Next, if a change amount Δ in pixel values before and after the filter operation exceeds a clip width, which is a reference value, the loop filter unit 120 clips the change amount Δ to the clip width. The loop filter unit 120 sets the clip width asymmetrically across the block boundary.

[0285] Specifically, the loop filter unit 120 sets the clip width for pixels with large errors to be larger than the clip width for pixels with small errors. For example, the loop filter unit 120 sets the clip width for pixels with large errors to be a constant multiple of the clip width for pixels with small errors. As a result of changing the clip width, the values of pixels with small errors cannot change significantly. Meanwhile, the values of pixels with large errors can change significantly.

[0286] Note that the loop filter unit 120 may adjust the absolute value of the clip width instead of specifying the ratio of the clip widths. For example, the loop filter unit 120 fixes the clip width for pixels with large errors to double a predetermined reference clip width. The loop filter unit 120 sets the ratio between the clip width for pixels with small errors and the clip width for pixels with small errors to 1.2:0.8. Specifically, for example, assume that the reference clip width is 10 and the change Δ before and after the filter operation is 12. In this case, if the reference clip width is used as is, the change Δ is corrected to 10 through threshold processing. On the other hand, if the target pixel is a pixel with large errors, for example, the reference clip width is multiplied by 1.5. As a result, the clip width becomes 15, so threshold processing is not performed and the change Δ becomes 12.

[0287] Next, a fifth method for changing weights asymmetrically will be described. The loop filter unit 102 sets the condition for determining whether to perform filtering asymmetrically across the block boundary. Here, the condition for determining whether to perform filtering is, for example, the first threshold value or the second threshold value shown in FIG. 11.

[0288] Specifically, the loop filter unit 120 sets conditions to make filtering easier for pixels with large errors, and sets conditions to make filtering less effective for pixels with small errors. For example, the loop filter unit 120 sets a higher threshold for pixels with small errors than for pixels with large errors. For example, the loop filter unit 120 sets a threshold for pixels with small errors to a constant multiple of the threshold for pixels with large errors.

[0289] Furthermore, the loop filter unit 120 may not only specify the ratio of the thresholds but also adjust the absolute values of the thresholds. For example, the loop filter unit 120 may fix the threshold for pixels with small errors to double the predetermined reference threshold, and set the ratio between the thresholds for pixels with small errors and pixels with large errors to 1.2:0.8.

[0290] Specifically, suppose the reference threshold for the second threshold in step 104 is 10, and d calculated from the pixel values in the block is 12. If the reference threshold is used as the second threshold as is, it is determined that filtering is to be performed. On the other hand, if the target pixel is a pixel with a small error, for example, a value 1.5 times the reference threshold is used as the second threshold. In this case, the second threshold is 15, which is larger than d. As a result, it is determined that filtering is not to be performed.

[0291] Furthermore, the constants and the like indicating the weights based on the errors used in the first to fifth techniques may be values that are predetermined or may be variable in the encoding device 100 and the decoding device 200. Specifically, these constants include a coefficient by which the filter coefficient or the filter coefficient of the reference filter is multiplied in the first technique, a coefficient by which the reference change amount Δ0 is multiplied or a constant by which the reference coefficient is multiplied in the second technique, an offset value in the third technique, a constant by which the clip width or the reference clip width is multiplied in the fourth technique, and a constant by which the threshold or the reference threshold is multiplied in the fifth technique.

[0292] When the constant is variable, information indicating the constant may be included in a bitstream as a parameter for each sequence or slice, and transmitted from encoding device 100 to decoding device 200. Note that the information indicating the constant may be information indicating the constant itself, or information indicating a ratio or difference from a reference value.

[0293] In addition, methods for changing the coefficient or constant depending on the error include, for example, a method of changing it linearly, a method of changing it quadratically, a method of changing it exponentially, or a method of using a lookup table that shows the relationship between the error and the constant.

[0294] Alternatively, a fixed value may be used as the constant when the error is equal to or greater than a reference value, or when the error is equal to or less than a reference value. For example, loop filter unit 120 may set the variable to a first value when the error is equal to or less than a predetermined range, set the variable to a second value when the error is equal to or greater than the predetermined range, and continuously change the variable from the first value to the second value depending on the error when the error is within the predetermined range.

[0295] Furthermore, when the error exceeds a predetermined reference value, the loop filter unit 120 may use a symmetric filter (reference filter) instead of the asymmetric filter.

[0296] Furthermore, when using a lookup table or the like, the loop filter unit 120 may store both tables for cases where the error is large and cases where the error is small, or may store only one of the tables and calculate the other constant from the contents of that table according to a predetermined rule.

[0297] As described above, the encoding device 100 and the decoding device 200 according to this embodiment can reduce errors in reconstructed images by using asymmetric filters, thereby improving encoding efficiency.

[0298] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.

[0299] (Embodiment 2) Specific examples of encoding parameters that characterize the above-mentioned error distribution will be described in Embodiments 2 to 6. In the present embodiments, the loop filter unit 120 determines filter characteristics according to the position of the target pixel within the block.

[0300] 14 is a flowchart showing an example of deblocking filtering according to this embodiment. First, the loop filter unit 120 acquires information indicating the position of the target pixel within a block as an encoding parameter characterizing the error distribution. Based on the acquired position, the loop filter unit 120 determines filter characteristics that are asymmetric across the block boundary (S121).

[0301] Next, the loop filter unit 120 executes a filter process having the determined filter characteristics (S122).

[0302] Here, pixels farther from the reference pixels for intra prediction are more likely to have a larger error than pixels closer to the reference pixels for intra prediction. Therefore, the loop filter unit 120 determines filter characteristics such that the amount of change in pixel value before and after the filtering process increases for pixels farther from the reference pixels for intra prediction.

[0303] For example, in the case of H.265 / HEVC or JEM, the pixel closest to the reference pixel is the pixel located at the upper left in the block, and the pixel closest to the reference pixel is the pixel located at the lower right in the block, as shown in Fig. 15. Therefore, the loop filter unit 120 determines the filter characteristics so that the weight of the pixel at the lower right in the block is greater than the weight of the pixel at the upper left.

[0304] Specifically, as described in the first embodiment, the loop filter unit 120 determines filter characteristics for pixels far from reference pixels for intra prediction so as to increase the influence of the filtering process. That is, the loop filter unit 120 increases the weights of pixels far from reference pixels for intra prediction. Here, increasing the weights means, as described above, performing at least one of the following: (1) decreasing the filter coefficients; (2) increasing the filter coefficients of pixels on either side of a boundary (i.e., pixels close to reference pixels for intra prediction); (3) increasing the coefficient by which the change amount is multiplied; (4) increasing the offset value of the change amount; (5) increasing the clip width; and (6) modifying the threshold value so that the filtering process can be easily performed. On the other hand, the loop filter unit 120 determines filter characteristics for pixels close to reference pixels for intra prediction so as to decrease the influence of the filtering process. That is, the loop filter unit 120 decreases the weights of pixels close to reference pixels for intra prediction. Here, reducing the weight means, as described above, doing at least one of the following: (1) increasing the filter coefficient; (2) decreasing the filter coefficient of pixels on either side of a boundary (i.e., pixels close to the reference pixel for intra-prediction); (3) decreasing the coefficient by which the change amount is multiplied; (4) decreasing the offset value of the change amount; (5) decreasing the clip width; and (6) modifying the threshold value so that the filter process is less likely to be performed.

[0305] It is noted that the above process may be performed when intra-prediction is used, but not when inter-prediction is used, but since the properties of intra-predicted blocks may be influenced by inter-prediction, the above process may also be performed on inter-predicted blocks.

[0306] Furthermore, the loop filter unit 120 may change the weights by arbitrarily specifying a position within a specific block. For example, as described above, the loop filter unit 120 may increase the weight of the pixel in the lower right corner of the block and decrease the weight of the pixel in the upper left corner of the block. Note that the loop filter unit 120 may change the weights by arbitrarily specifying a position within the block, not limited to the upper left and lower right.

[0307] 15, at adjacent block boundaries in the horizontal direction, the error in the left block is larger and the error in the right block is larger. Therefore, for adjacent block boundaries in the horizontal direction, loop filter unit 120 may increase the weight of the left block and decrease the weight of the right block.

[0308] Similarly, at a vertical boundary between adjacent blocks, the error of the upper block is larger and the error of the lower block is smaller. Therefore, for a vertical boundary between adjacent blocks, the loop filter unit 120 may increase the weight of the upper block and decrease the weight of the lower block.

[0309] Furthermore, the loop filter unit 120 may change the weights according to the distance from the reference pixels for intra prediction. Furthermore, the loop filter unit 120 may determine the weights for each block boundary or for each pixel. The farther away from the reference pixels, the greater the error is likely to be. Therefore, the loop filter unit 120 determines the filter characteristics such that the gradient of the weights becomes steeper the farther away from the reference pixels. Furthermore, the loop filter unit 120 determines the filter characteristics such that the gradient of the weights on the upper side of the right side of the block is gentler than the gradient of the weights on the lower side.

[0310] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.

[0311] (Embodiment 3) In this embodiment, the loop filter unit 120 determines the filter characteristics according to the orthogonal transform basis.

[0312] 16 is a flowchart showing an example of deblocking filtering according to this embodiment. First, the loop filter unit 120 acquires information indicating the orthogonal transform base used for the current block as a coding parameter characterizing the error distribution. Based on the orthogonal transform base, the loop filter unit 120 determines filter characteristics that are asymmetric across the block boundary (S131).

[0313] Next, the loop filter unit 120 executes a filter process having the determined filter characteristics (S132).

[0314] Encoding device 100 selects one orthogonal transform base from a plurality of candidates as the transform base used when performing an orthogonal transform. The plurality of candidates include, for example, a base in which the 0th-order transform base is flat, such as DCT-II, and a base in which the 0th-order transform base is not flat, such as DCT-VII. Fig. 17 is a diagram showing the transform bases of DCT-II. Fig. 18 is a diagram showing the transform bases of DCT-VII.

[0315] The zeroth-order basis of DCT-II is constant regardless of the position within a block. In other words, when DCT-II is used, the error within a block is constant. Therefore, when both blocks on either side of a block boundary are transformed by DCT-II, the loop filter unit 120 performs filtering using a symmetric filter instead of an asymmetric filter.

[0316] On the other hand, the zeroth-order basis of DST-VII increases in value as the distance from the left or top block boundary increases. In other words, the error is likely to increase as the distance from the left or top block boundary increases. Therefore, the loop filter unit 120 uses an asymmetric filter when at least one of two blocks on either side of a block boundary has been transformed by DST-VII. Specifically, the loop filter unit 120 determines filter characteristics such that the effect of filtering is reduced for pixels with smaller values in a block of a lower-order basis (e.g., zeroth order).

[0317] Specifically, when both blocks on either side of a block boundary have been converted using DST-VII, the loop filter unit 120 determines the filter characteristics by the above-described method so that the effect of the filter processing is greater on the bottom right pixel in the block, and also determines the filter characteristics so that the effect of the filter processing is greater on the top left pixel in the block.

[0318] Furthermore, even when DST-VII and DCT-II are adjacent to each other vertically, the loop filter unit 120 determines the filter characteristics so that the filter weights for the lower pixels of the upper block using DST-VII, which are adjacent to the block boundary, are greater than the filter weights for the upper pixels of the lower block using DCT-II. However, the difference in amplitude between the lower-order bases in this case is smaller than the difference in amplitude between the lower-order bases when DST-VIIs are adjacent. Therefore, the loop filter unit 120 sets the filter characteristics so that the weight gradient in this case is smaller than the weight gradient when DST-VIIs are adjacent. For example, the loop filter unit 120 sets the weights to 1:1 (symmetric filter) when DCT-II and DCT-II are adjacent, sets the weights to 1.3:0.7 when DST-VII and DST-VII are adjacent, and sets the weights to 1.2:0.8 when DST-VII and DCT-II are adjacent.

[0319] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.

[0320] (Fourth embodiment) In this embodiment, the loop filter unit 120 determines the filter characteristics according to pixel values on either side of a block boundary.

[0321] 19 is a flowchart showing an example of deblocking filtering according to this embodiment. First, the loop filter unit 120 acquires information indicating pixel values in blocks on either side of a block boundary as coding parameters that characterize the error distribution. Based on the pixel values, the loop filter unit 120 determines filter characteristics that are asymmetric across the block boundary (S141).

[0322] Next, the loop filter unit 120 executes a filter process having the determined filter characteristics (S142).

[0323] For example, the loop filter unit 120 increases the difference in filter characteristics across the block boundary as the pixel value difference d0 increases. Specifically, the loop filter unit 120 determines the filter characteristics so as to increase the difference in the effects of the filtering process. For example, if d0 > (quantization parameter) × (constant) is satisfied, the loop filter unit 120 sets the weights to 1.4:0.6, and if this relationship is not satisfied, the loop filter unit 120 sets the weights to 1.2:0.8. In other words, the loop filter unit 120 compares the pixel value difference d0 with a threshold based on the quantization parameter, and increases the difference in filter characteristics across the block boundary when the pixel value difference d0 is greater than the threshold, compared to when the pixel value difference d0 is smaller than the threshold.

[0324] As another example, the loop filter unit 120 may increase the difference in filter characteristics across the block boundary as the average value b0 of the variances of pixel values in both blocks on either side of the block boundary increases. Specifically, the loop filter unit 120 may determine the filter characteristics so as to increase the difference in the effects of filtering. For example, the loop filter unit 120 may set the weights to 1.4:0.6 when b0 > (quantization parameter) × (constant) is satisfied, and may set the weights to 1.2:0.8 when this relationship is not satisfied. In other words, the loop filter unit 120 may compare the variance b0 of pixel values with a threshold based on the quantization parameter, and increase the difference in filter characteristics across the block boundary when the variance b0 of pixel values is greater than the threshold, compared to when the variance b0 of pixel values is smaller than the threshold.

[0325] Which of the adjacent blocks should have a larger weight, i.e., which block has a larger error, can be identified by the method of the second or third embodiment described above, or the method of the sixth embodiment described below. That is, the loop filter unit 120 determines asymmetric filter characteristics across the block boundary according to a predetermined rule (for example, the method of the second, third, or sixth embodiment). Next, the loop filter unit 120 changes the determined filter characteristics based on the pixel value difference d0 so that the difference between the filter characteristics across the block boundary becomes larger. That is, the loop filter unit 120 increases the ratio or difference between the weight of a pixel with a large error and the weight of a pixel with a small error.

[0326] Here, if the difference d0 in pixel values is large, it is possible that the block boundary coincides with the edge of an object in the image. In such cases, by reducing the difference in filter characteristics across the block boundary, unnecessary smoothing can be prevented.

[0327] Conversely, the loop filter unit 120 may reduce the difference in filter characteristics across a block boundary as the pixel value difference d0 increases. Specifically, the loop filter unit 120 determines the filter characteristics so as to reduce the difference in the effects of filtering. For example, the loop filter unit 120 sets the weights to 1.2:0.8 when d0 > (quantization parameter) × (constant) is satisfied, and sets the weights to 1.4:0.6 when this relationship is not satisfied. Note that the weights may be set to 1:1 (symmetric filter) when this relationship is satisfied. In other words, the loop filter unit 120 compares the pixel value difference d0 with a threshold based on the quantization parameter, and reduces the difference in filter characteristics across a block boundary when the pixel value difference d0 is greater than the threshold compared to when the pixel value difference d0 is smaller than the threshold.

[0328] For example, a large pixel value difference d0 means that block boundaries are more noticeable. In such cases, reducing the difference in filter characteristics across the block boundaries can prevent the smoothing effect from being weakened by an asymmetric filter.

[0329] Note that these two processes may be performed simultaneously. For example, the loop filter unit 120 may use a first weight when the pixel value difference d0 is less than a first threshold, use a second weight whose difference is greater than the first weight when the pixel value difference d0 is equal to or greater than the first threshold and less than a second threshold, and use a third weight whose difference is smaller than the second weight when the pixel value difference d0 is equal to or greater than the second threshold.

[0330] Furthermore, the pixel value difference d0 may be the difference in pixel values on either side of the boundary itself, or the average or variance of the pixel value differences. For example, the pixel value difference d0 can be calculated by (A×(q1-p1)-B×(q2-p2)+C) / D, where A, B, C, and D are constants. For example, A=9, B=3, C=8, and D=16. Furthermore, p1, p2, q1, and q2 are the pixel values of pixels on either side of the block boundary, which are positioned as shown in FIG. 12.

[0331] The pixel value difference d0 and the weight may be set in units of pixels, in units of block boundaries, or in units of block groups including multiple blocks (for example, in units of LCUs (Largest Coding Units)).

[0332] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.

[0333] (Embodiment 5) In this embodiment, the loop filter unit 120 determines the filter characteristics according to the intra-prediction direction and the block boundary direction.

[0334] 20 is a flowchart showing an example of deblocking filtering according to this embodiment. First, the loop filter unit 120 acquires information indicating an angle between the prediction direction of intra prediction and a block boundary as a coding parameter that characterizes an error distribution. Based on the angle, the loop filter unit 120 determines filter characteristics that are asymmetric across the block boundary (S151).

[0335] Next, the loop filter unit 120 executes a filter process having the determined filter characteristics (S152).

[0336] Specifically, the loop filter unit 120 increases the difference in filter characteristics across the block boundary as the angle approaches vertical, and decreases the difference in filter characteristics across the block boundary as the angle approaches horizontal. More specifically, when the intra-prediction direction is closer to vertical to the block boundary, the filter characteristics are determined so that the difference in filter weights for pixels on both sides of the block boundary increases, and when the intra-prediction direction is closer to horizontal to the block boundary, the filter characteristics are determined so that the difference in filter weights for pixels on both sides of the block boundary decreases. Figure 21 is a diagram showing examples of weights for the relationship between the intra-prediction direction and the direction of the block boundary.

[0337] Which of the adjacent blocks should have a larger weight, i.e., which block has a larger error, can be identified by the method of the above-described second or third embodiment, or the method of the below-described sixth embodiment. That is, the loop filter unit 120 determines asymmetric filter characteristics across the block boundary according to a predetermined rule (for example, the method of the second, third, or sixth embodiment). Next, the loop filter unit 120 changes the determined filter characteristics based on the intra-prediction direction and the direction of the block boundary so as to increase the difference between the filter characteristics across the block boundary.

[0338] Furthermore, the encoding device 100 and the decoding device 200 specify the intra prediction direction using, for example, an intra prediction mode.

[0339] Note that, when the intra prediction mode is the planar mode or the DC mode, the loop filter unit 120 may not take into account the direction of the block boundary. For example, when the intra prediction mode is the planar mode or the DC mode, the loop filter unit 120 may use a predetermined weight or a weight difference regardless of the direction of the block boundary. Alternatively, when the intra prediction mode is the planar mode or the DC mode, the loop filter unit 120 may use a symmetric filter.

[0340] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.

[0341] (Sixth embodiment) In this embodiment, the loop filter unit 120 determines the filter characteristics in accordance with a quantization parameter that indicates the width of quantization.

[0342] 16 is a flowchart showing an example of deblocking filtering according to this embodiment. First, the loop filter unit 120 acquires information indicating the quantization parameter used in quantizing the current block as a coding parameter characterizing the error distribution. Based on the quantization parameter, the loop filter unit 120 determines filter characteristics that are asymmetric across the block boundary (S161).

[0343] Next, the loop filter unit 120 executes a filter process having the determined filter characteristics (S162).

[0344] Here, the larger the quantization parameter, the greater the possibility of an error occurring. Therefore, loop filter unit 120 determines filter characteristics such that the larger the quantization parameter, the greater the effect of filtering.

[0345] Fig. 23 is a diagram showing an example of weights for quantization parameters. As shown in Fig. 23, the loop filter unit 120 increases the weight for the upper left pixel in a block as the quantization parameter increases. On the other hand, the loop filter unit 120 reduces the increase in the weight for the lower right pixel in the block as the quantization parameter increases. In other words, the loop filter unit 120 determines the filter characteristics so that the change in the influence of the filtering process associated with a change in the quantization parameter for the upper left pixel is greater than the change in the influence of the filtering process associated with a change in the quantization parameter for the lower right pixel.

[0346] Here, the upper left pixel in the block is more susceptible to the quantization parameter than the lower right pixel in the block, so by performing the above processing, it is possible to appropriately reduce errors.

[0347] Furthermore, the loop filter unit 120 may determine weights for each of two blocks on either side of a boundary based on the quantization parameters of the blocks, or may calculate the average value of the quantization parameters of the two blocks and determine weights for the two blocks based on the average value. Alternatively, the loop filter unit 120 may determine weights for two blocks based on the quantization parameter of one of the blocks. For example, the loop filter unit 120 determines a weight for one of the blocks based on the quantization parameter of the block using the above-described method. Next, the loop filter unit 120 determines a weight for the other block based on the determined weight and in accordance with a predetermined rule.

[0348] Furthermore, the loop filter unit 120 may use a symmetric filter when the quantization parameters of the two blocks are different, or when the difference between the quantization parameters of the two blocks exceeds a threshold.

[0349] 23, the weights are set using a linear function, but any function other than a linear function or a table may be used. For example, a curve showing the relationship between the quantization parameter and the quantization step (quantization width) may be used.

[0350] Furthermore, when the quantization parameter exceeds a threshold, the loop filter unit 120 may use a symmetric filter instead of an asymmetric filter.

[0351] Furthermore, if the quantization parameter is described with decimal precision, the loop filter unit 120 may perform an operation such as rounding up, rounding down, or the like on the quantization parameter and use the calculated quantization parameter in the above processing. Alternatively, the loop filter unit 120 may perform the above processing taking into account decimal points.

[0352] As described above, in the second to sixth embodiments, a plurality of methods for determining an error have been described individually, but two or more of these methods may be combined. In this case, the loop filter unit 120 may weight the two or more combined elements.

[0353] The following describes modified examples.

[0354] Encoding parameters other than those described above may be used. For example, the encoding parameters may be the type of orthogonal transform (Wavelet, DFT, lapped transform, etc.), the block size (block width and height), the direction of a motion vector, the length of a motion vector, the number of reference pictures used in inter prediction, or information indicating the characteristics of a reference filter. These parameters may also be used in combination. For example, the loop filter unit 120 may use an asymmetric filter only when the length of a block boundary is 16 pixels or less and the pixel to be filtered is close to the reference pixels for intra prediction, and may use a symmetric filter in other cases. As another example, asymmetric processing may be performed only when a predetermined type of filter from among multiple candidate filters is used. For example, an asymmetric filter may be used only when the displacement by the reference filter is calculated by (A×(q1−p1)−B×(q2−p2)+C) / D, where A, B, C, and D are constants. For example, A=9, B=3, C=8, and D=16. Also, p1, p2, q1, and q2 are pixel values of pixels positioned on either side of the block boundary as shown in FIG.

[0355] Furthermore, the loop filter unit 120 may perform the above processing on either the luminance signal or the color difference signal, or may perform the above processing on both. Furthermore, the loop filter unit 120 may perform common processing on the luminance signal and the color difference signal, or may perform different processing on the luminance signal and the color difference signal. For example, the loop filter unit 120 may use different weights for the luminance signal and the color difference signal, or may determine the weights according to different rules.

[0356] Furthermore, the various parameters used in the above processing may be determined by the encoding device 100, or may be preset fixed values.

[0357] Furthermore, whether or not to perform the above processing, or the content of the above processing, may be switched in a predetermined unit. The predetermined unit is, for example, a slice unit, a tile unit, a wavefront division unit, or a CTU unit. The content of the above processing is a parameter indicating which of the above-described multiple methods to use, or a weight, or a parameter for determining these.

[0358] Furthermore, the loop filter unit 120 may limit the area where the above processing is performed to the boundaries of CTUs, slices, or tiles.

[0359] Furthermore, the number of taps of the symmetric filter and the asymmetric filter may differ.

[0360] Furthermore, the loop filter unit 120 may determine whether to perform the above processing or change the content of the above processing depending on the frame type (I frame, P frame, B frame).

[0361] Furthermore, the loop filter unit 120 may determine whether or not to perform the above processing, or the content of the above processing, depending on whether or not specific processing has been performed in the previous or subsequent stage.

[0362] Furthermore, the loop filter unit 120 may perform different processing depending on the type of prediction mode used for the block, or may perform the above processing only for blocks using a specific prediction mode. For example, the loop filter unit 120 may perform different processing for blocks using intra prediction, blocks using inter prediction, and merged blocks.

[0363] Furthermore, the encoding device 100 may encode filter information, which is a parameter indicating whether or not to perform the above processing, or the content of the above processing. That is, the encoding device 100 may generate an encoded bitstream including the filter information. This filter information may include information indicating whether or not to perform the above processing on a luminance signal, information indicating whether or not to perform the above processing on a chrominance signal, information indicating whether or not to vary the processing for each prediction mode, or the like.

[0364] Furthermore, the decoding device 200 may perform the above processing based on filter information included in the coded bitstream. For example, the decoding device 200 may determine whether to perform the above processing or the content of the above processing based on the filter information.

[0365] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects.

[0366] (Embodiment 7) In each of the above embodiments, each of the functional blocks can typically be realized by an MPU, memory, etc. Furthermore, the processing by each of the functional blocks is typically realized by a program execution unit such as a processor reading and executing software (programs) recorded on a recording medium such as a ROM. The software may be distributed by downloading, etc., or may be recorded on a recording medium such as a semiconductor memory and distributed. Of course, each functional block can also be realized by hardware (dedicated circuits).

[0367] Furthermore, the processing described in each embodiment may be realized by centralized processing using a single device (system), or may be realized by distributed processing using multiple devices. The processor that executes the program may be a single processor or multiple processors. That is, centralized processing or distributed processing may be performed.

[0368] The aspects of the present disclosure are not limited to the above examples, and various modifications are possible, and these modifications are also included within the scope of the aspects of the present disclosure.

[0369] Furthermore, here, we will explain application examples of the video coding method (image coding method) or video decoding method (image decoding method) shown in each of the above embodiments and a system using the same. The system is characterized by having an image coding device using the image coding method, an image decoding device using the image decoding method, and an image coding / decoding device that includes both. Other components of the system can be appropriately changed depending on the situation.

[0370] [Usage example] 24 is a diagram showing the overall configuration of a content supply system ex100 that provides a content distribution service. The area where communication services are provided is divided into cells of a desired size, and base stations ex106, ex107, ex108, ex109, and ex110, which are fixed wireless stations, are installed in each cell.

[0371] In this content supply system ex100, devices such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, and a smartphone ex115 are connected to the Internet ex101 via an Internet service provider ex102 or a communication network ex104 and base stations ex106 to ex110. The content supply system ex100 may be configured to connect a combination of any of the above elements. The devices may be connected to each other directly or indirectly via a telephone network or short-range wireless communication, without using the base stations ex106 to ex110, which are fixed wireless stations. Furthermore, a streaming server ex103 is connected to devices such as the computer ex111, the game console ex112, the camera ex113, the home appliance ex114, and the smartphone ex115 via the Internet ex101, etc. Furthermore, the streaming server ex103 is connected to a terminal in a hotspot on an airplane ex117, etc., via a satellite ex116.

[0372] Note that wireless access points, hotspots, etc. may be used instead of the base stations ex106 to ex110. Furthermore, the streaming server ex103 may be directly connected to the communication network ex104 without going through the Internet ex101 or the Internet service provider ex102, or may be directly connected to an airplane ex117 without going through a satellite ex116.

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

[0374] The home appliance ex118 is a refrigerator or an appliance included in a home fuel cell cogeneration system.

[0375] In the content supply system ex100, a terminal having a photographing function is connected to a streaming server ex103 via a base station ex106 or the like, thereby enabling live streaming and the like. In live streaming, a terminal (such as a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, or a terminal on an airplane ex117) performs the encoding process described in each of the above embodiments on still images or video content captured by a user using the terminal, multiplexes the video data obtained by encoding with audio data obtained by encoding audio corresponding to the video, and transmits 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.

[0376] Meanwhile, the streaming server ex103 streams the transmitted content data to the requesting client. The client is a computer ex111, a game console ex112, a camera ex113, a home appliance ex114, a smartphone ex115, a terminal on an airplane ex117, or the like, which is capable of decoding the encoded data. Each device that receives the distributed data decodes and plays back the received data. That is, each device functions as an image decoding device according to one aspect of the present disclosure.

[0377] [Distributed processing] The streaming server ex103 may also be multiple servers or multiple computers that process, record, and distribute data in a distributed manner. For example, the streaming server ex103 may be implemented as a CDN (Content Delivery Network), where content distribution is achieved through a network connecting numerous edge servers distributed around the world. In a CDN, a physically nearby edge server is dynamically assigned depending on the client. Content is then cached and distributed to that edge server, thereby reducing delays. Furthermore, if an error occurs or communication conditions change due to increased traffic, processing can be distributed among multiple edge servers, the distribution entity can be switched to another edge server, or distribution can be continued by bypassing the affected network portion, thereby achieving high-speed and stable distribution.

[0378] In addition to the distributed processing of the distribution itself, the encoding of captured data can be performed on each device, on the server side, or shared among devices. For example, encoding generally involves two processing loops. The first loop detects the image complexity or code size for each frame or scene. The second loop maintains image quality while improving encoding efficiency. For example, a device can perform the first encoding process, and the server that receives the content can perform the second encoding process, thereby improving content quality and efficiency while reducing the processing load on each device. In this case, if there is a request for near-real-time reception and decoding, the data encoded by a device can be received and played back on another device, enabling more flexible real-time distribution.

[0379] As another example, the camera ex113 or the like extracts features from an image, compresses the data related to the features as metadata, and transmits the data to the server. The server performs compression according to the meaning of the image, for example, by determining the importance of an object from the features and switching the quantization precision accordingly. The feature data is particularly effective in improving the accuracy and efficiency of motion vector prediction when the server recompresses the image. Alternatively, the terminal may perform simple encoding such as VLC (variable length coding), and the server may perform encoding with a heavy processing load such as CABAC (context-adaptive binary arithmetic coding).

[0380] As another example, in a stadium, shopping mall, factory, etc., there may be multiple pieces of video data that have been shot by multiple terminals of almost the same scene. In this case, using the multiple terminals that shot the video and, as necessary, other terminals and servers that did not shoot the video, encoding processes are assigned to each of them, for example, in units of GOPs (Group of Pictures), pictures, or tiles obtained by dividing a picture, for distributed processing. This reduces delays and achieves better real-time performance.

[0381] Furthermore, since multiple pieces of video data are of nearly the same scene, the server may manage and / or instruct the video data shot by each terminal to be mutually referenced. Alternatively, the server may receive encoded data from each terminal and change the reference relationships between multiple pieces of data, or correct or replace the pictures themselves and re-encode them. This allows for the generation of streams with improved quality and efficiency for each piece of data.

[0382] The server may also perform transcoding to change the encoding format of the video data before distributing it. For example, the server may convert MPEG-based encoding to VP-based encoding, or convert H.264 to H.265.

[0383] In this way, the encoding process can be performed by a terminal or one or more servers. Therefore, although the following uses terms such as "server" or "terminal" to refer to the entity performing the process, some or all of the processing performed by the server may be performed by the terminal, and some or all of the processing performed by the terminal may be performed by the server. The same applies to the decoding process.

[0384] [3D, multi-angle] In recent years, there has been an increasing trend to integrate and use images or videos of different scenes or the same scene taken from different angles by multiple devices such as cameras ex113 and / or smartphones ex115 that are nearly synchronized with each other. The videos taken by each device are integrated based on the relative positional relationship between the devices obtained separately, or on areas where feature points included in the videos match.

[0385] The server may not only encode 2D video, but also encode still images automatically or at a time specified by the user based on scene analysis of the video and transmit them to the receiving terminal. Furthermore, if the server can acquire the relative positional relationship between the capturing terminals, it can generate a 3D shape of the scene based on not only the 2D video but also images of the same scene captured from different angles. The server may also separately encode 3D data generated by point clouds, or may select or reconstruct images to be transmitted to the receiving terminal from images captured by multiple terminals based on the results of recognizing or tracking people or objects using the 3D data.

[0386] In this way, users can enjoy scenes by selecting any video corresponding to each camera device, or can enjoy content in which video from any viewpoint is extracted from 3D data reconstructed using multiple images or videos. Furthermore, like the video, sound may also be collected from multiple different angles, and the server may multiplex and transmit sound from a specific angle or space in accordance with the video.

[0387] In recent years, content that associates the real world with a virtual world, such as Virtual Reality (VR) and Augmented Reality (AR), has also become popular. In the case of VR images, the server creates viewpoint images for the right eye and left eye, and may perform encoding that allows reference between the viewpoint images using Multi-View Coding (MVC) or the like, or may encode them as separate streams without mutual reference. When decoding the separate streams, it is preferable to play them in synchronization with each other so that a virtual three-dimensional space is reproduced according to the user's viewpoint.

[0388] In the case of AR images, the server superimposes virtual object information in virtual space onto camera information in real space based on the 3D position or the user's viewpoint movement. The decoding device may acquire or store virtual object information and 3D data, generate a 2D image according to the user's viewpoint movement, and smoothly connect the images to create superimposed data. Alternatively, the decoding device may send the user's viewpoint movement to the server in addition to a request for virtual object information, and the server may create superimposed data based on the viewpoint movement received from the 3D data stored on the server, encode the superimposed data, and distribute it to the decoding device. Note that the superimposed data may also have an α value indicating transparency in addition to RGB, and the server may set the α value of parts other than the object created from the 3D data to 0, etc., to encode the parts in a transparent state. Alternatively, the server may generate data by setting a predetermined RGB value as the background, like a chromakey, and using the background color for parts other than the object.

[0389] Similarly, the decoding of distributed data may be performed by each client terminal, by the server, or by multiple terminals. For example, one terminal may first send a reception request to the server, and then other terminals may receive and decode content according to the request, after which the decoded signal is transmitted to a device with a display. By distributing the processing and selecting appropriate content regardless of the capabilities of the communication terminals themselves, high-quality data can be reproduced. As another example, large-sized image data may be received on a TV or other device, and only a portion of the picture, such as a tile into which the picture is divided, may be decoded and displayed on the viewer's personal device. This allows the viewer to share the overall picture while checking their own area of responsibility or an area of interest in more detail.

[0390] In the future, it is expected that content will be seamlessly received by switching the appropriate data for the current connection using delivery system standards such as MPEG-DASH in situations where multiple short-, medium-, or long-distance wireless communications are available, both indoors and outdoors. This will allow users to freely select and switch between decoding and display devices, such as their own devices, indoors and outdoors, in real time. Decoding can also be performed by switching between decoding and display devices based on user location information. This will enable users to display map information on the wall or ground of a neighboring building with an embedded display device while traveling to their destination. It is also possible to switch the bit rate of received data based on the accessibility of the encoded data on the network, such as if the encoded data is cached on a server that can be quickly accessed from the receiving device or copied to an edge server in a content delivery service.

[0391] [Scalable Coding] Content switching will be described using a scalable stream, shown in FIG. 25, compressed and encoded using the video encoding method described in each of the above embodiments. The server may have multiple streams with the same content but different qualities, but may also switch content by taking advantage of the temporally / spatially scalable stream characteristics achieved by encoding the stream in layers, as shown. In other words, the decoder determines which layer to decode based on internal factors such as performance and external factors such as communication bandwidth, allowing the decoder to freely switch between low-resolution and high-resolution content. For example, if a user wants to continue watching a video they were watching on their smartphone ex115 while on the go on a device such as an Internet TV after returning home, the device can simply decode the same stream up to different layers, thereby reducing the burden on the server.

[0392] Furthermore, in addition to the above-described scalability configuration in which pictures are coded for each layer and an enhancement layer exists above a base layer, the enhancement layer may include meta-information based on image statistics, etc., and the decoding side may generate high-quality content by super-resolving pictures in the base layer based on the meta-information. Super-resolution may mean either improving the signal-to-noise ratio at the same resolution or increasing the resolution. The meta-information may include information for specifying linear or nonlinear filter coefficients used in the super-resolution process, or information for specifying parameter values in the filter process, machine learning, or least-squares calculation used in the super-resolution process.

[0393] Alternatively, a picture may be divided into tiles or the like according to the meaning of objects in the image, and the decoding side may select tiles to decode and decode only a portion of the area. Furthermore, by storing the object's attributes (such as a person, a car, or a ball) and its position in the video (such as a coordinate position in the same image) as meta information, the decoding side can identify the position of a desired object based on the meta information and determine the tile containing the object. For example, as shown in FIG. 26, the meta information is stored using a data storage structure different from that of pixel data, such as an SEI message in HEVC. This meta information indicates, for example, the position, size, or color of the main object.

[0394] Furthermore, meta information may be stored in units consisting of multiple pictures, such as streams, sequences, or random access units, which allows the decoding side to obtain the time when a specific person appears in the video, and by combining this with information in units of pictures, it is possible to identify the picture in which the object exists and the position of the object within the picture.

[0395] [Webpage optimization] FIG. 27 is a diagram showing an example of a web page display screen on a computer ex111 or the like. FIG. 28 is a diagram showing an example of a web page display screen on a smartphone ex115 or the like. As shown in FIGS. 27 and 28, a web page may include multiple link images that are links to image content, and the appearance of the web page may differ depending on the device used to view the page. When multiple link images are visible on the screen, the display device (decoding device) may display a still image or I-picture contained in each content as a link image, display a video such as a GIF animation using multiple still images or I-pictures, or receive only the base layer and decode and display the video until the user explicitly selects a link image, or until the link image approaches the center of the screen or until the entire link image is within the screen.

[0396] When a link image is selected by a user, the display device decodes the base layer with the highest priority. If the HTML constituting the web page contains information indicating that the content is scalable, the display device may decode up to the enhancement layer. To ensure real-time performance, before a selection is made or when the communication bandwidth is very limited, the display device decodes and displays only forward-referenced pictures (I-pictures, P-pictures, and forward-reference-only B-pictures), thereby reducing the delay between the decoding time of the first picture and the display time (the delay from the start of content decoding to the start of display). Alternatively, the display device may intentionally ignore the picture reference relationships and roughly decode all B-pictures and P-pictures using forward reference, and then perform normal decoding as the number of received pictures increases over time.

[0397] [Autonomous driving] Furthermore, when transmitting and receiving still image or video data such as 2D or 3D map information for automatic driving or driving assistance of a vehicle, the receiving terminal may receive weather or construction information as meta information in addition to image data belonging to one or more layers, and may associate and decode these. Note that the meta information may belong to a layer, or may simply be multiplexed with the image data.

[0398] In this case, since a vehicle, drone, airplane, etc. including a receiving terminal moves, the receiving terminal can realize seamless reception and decoding while switching between base stations ex106 to ex110 by transmitting the location information of the receiving terminal at the time of a reception request. Also, the receiving terminal can dynamically switch how much meta information to receive or how much to update map information depending on the user's selection, user situation, or communication bandwidth status.

[0399] In this way, in the content supply system ex100, the client can receive, decode, and play back the encoded information sent by the user in real time.

[0400] [Distribution of personal content] Furthermore, the content supply system ex100 allows not only high-quality, long-duration content from video distribution companies, but also unicast or multicast distribution of low-quality, short-duration content from individuals. It is expected that such personal content will continue to increase in the future. To improve the quality of personal content, the server may perform editing before encoding. This can be achieved, for example, with the following configuration.

[0401] During shooting, either in real time or after accumulating the footage, the server performs recognition processing such as detecting shooting errors, scene search, semantic analysis, and object detection from the original image or encoded data. Based on the recognition results, the server manually or automatically corrects out-of-focus or camera shake, deletes less important scenes (e.g., scenes with lower brightness or out-of-focus compared to other pictures), emphasizes object edges, changes color, and performs other editing. The server then encodes the edited data based on the editing results. It is also known that viewing rates decrease if the shooting time is too long. Therefore, the server may automatically clip not only less important scenes as described above but also scenes with little movement, based on the image processing results, so that the content falls within a specific time range depending on the shooting time. Alternatively, the server may generate and encode a digest based on the results of the semantic analysis of the scene.

[0402] In some cases, personal content may contain content that infringes copyright, moral rights, or portrait rights, or may cause the scope of sharing to exceed the intended scope, resulting in inconvenience to individuals. Therefore, for example, the server may intentionally defocus images of people's faces on the periphery of the screen or the interior of a house before encoding. The server may also recognize whether the image to be encoded contains the face of a person other than a pre-registered person, and if so, perform processing such as blurring the face. Alternatively, as pre- or post-processing before encoding, the user may specify a person or background area they wish to modify in the image for copyright or other reasons, and the server may replace the specified area with another image or blur the focus. For a person, the server may track the person in the video and replace the image of the face.

[0403] Furthermore, because viewing personal content with small data volumes requires real-time performance, the decoding device first receives the base layer as a top priority, and then decodes and plays it back, depending on the bandwidth. The decoding device may also receive an enhancement layer during this time, and if the content is played back more than twice, such as when playback is looped, it may play back high-quality video, including the enhancement layer. A stream that has undergone scalable encoding in this way can provide an experience in which the video appears rough when not selected or when viewing begins, but gradually becomes smoother and the image quality improves. In addition to scalable encoding, a similar experience can also be provided by configuring a single stream consisting of a rough stream played the first time and a second stream that is encoded with reference to the first video.

[0404] [Other use cases] Furthermore, these encoding or decoding processes are generally performed by the LSIex500 possessed by each terminal. The LSIex500 may be a single chip or may be configured with multiple chips. It is also possible to incorporate video encoding or decoding software into some kind of recording medium (such as a CD-ROM, flexible disk, or hard disk) that can be read by the computer ex111, and perform the encoding or decoding process using that software. Furthermore, if the smartphone ex115 is equipped with a camera, video data captured by the camera may be transmitted. This video data is data that has been encoded by the LSIex500 possessed by the smartphone ex115.

[0405] The LSIex500 may be configured to download and activate application software. In this case, the terminal first determines whether it supports the content encoding method or has the capability to execute a specific service. If the terminal does not support the content encoding method or does not have the capability to execute a specific service, the terminal downloads the codec or application software and then acquires and plays the content.

[0406] Furthermore, at least one of the video encoding device (image encoding device) or video decoding device (image decoding device) of each of the above embodiments can be incorporated into a digital broadcasting system, not limited to the content supply system ex100 via the Internet ex101. Since multiplexed data in which video and audio are multiplexed is transmitted and received over broadcast radio waves using a satellite or the like, the content supply system ex100 is more suited to multicast than the content supply system ex100, which is more suited to unicast, but similar applications are possible with regard to encoding and decoding processes.

[0407] [Hardware configuration] FIG. 29 is a diagram illustrating a smartphone ex115. FIG. 30 is a diagram illustrating an example configuration of the smartphone ex115. The smartphone ex115 includes an antenna ex450 for transmitting and receiving radio waves to and from the base station ex110, a camera unit ex465 capable of capturing video and still images, and a display unit ex458 for displaying video captured by the camera unit ex465 and decoded data of the video and other images received by the antenna ex450. The smartphone ex115 further includes an operation unit ex466 such as a touch panel, an audio output unit ex457 such as a speaker for outputting voice or sound, an audio input unit ex456 such as a microphone for inputting voice, a memory unit ex467 capable of storing encoded data or decoded data such as captured video or still images, recorded voice, received video or still images, and email, and a slot unit ex464 that serves as an interface with a SIM ex468 for identifying users and authenticating access to various data, including networks. In addition, an external memory may be used instead of the memory unit ex467.

[0408] In addition, a main control unit ex460 that comprehensively controls the display unit ex458 and operation unit ex466, etc., is connected to a power supply circuit unit ex461, an operation input control unit ex462, a video signal processing unit ex455, a camera interface unit ex463, a display control unit ex459, a modulation / demodulation unit ex452, a multiplexing / separation unit ex453, an audio signal processing unit ex454, a slot unit ex464, and a memory unit ex467 via a bus ex470.

[0409] When the power key is turned on by a user, the power supply circuit unit ex461 supplies power from the battery pack to each unit, thereby starting up the smartphone ex115 into an operational state.

[0410] The smartphone ex115 processes calls, data communications, and other communications under the control of a main control unit ex460, which includes a CPU, ROM, RAM, and the like. During calls, the audio signal collected by the audio input unit ex456 is converted into a digital audio signal by the audio signal processing unit ex454, which then undergoes spectrum spread processing by the modulation / demodulation unit ex452, digital-to-analog conversion processing and frequency conversion processing by the transmission / reception unit ex451, and then transmitted via the antenna ex450. The received data is amplified, frequency-converted, and analog-to-digital converted, then subjected to spectrum despreading processing by the modulation / demodulation unit ex452, and converted into an analog audio signal by the audio signal processing unit ex454, which then outputs the amplified data from the audio output unit ex457. During data communications 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, etc., of the main unit, and similar transmission and reception processing is performed. When transmitting video, still images, or video and audio in the data communication mode, the video signal processing unit ex455 compression-encodes the video signal stored in the memory unit ex467 or the video signal input from the camera unit ex465 using the video encoding method described in each of the above embodiments, and sends the encoded video data to the multiplexing / demultiplexing unit ex453. The audio signal processing unit ex454 also encodes the audio signal picked up by the audio input unit ex456 while the camera unit ex465 is capturing video, still images, etc., and sends the encoded audio data to the multiplexing / demultiplexing unit ex453. The multiplexing / demultiplexing unit ex453 multiplexes the encoded video data and encoded audio data using a predetermined method, and modulates and converts the data in the modulation / demodulation unit (modulation / demodulation circuit unit) ex452 and the transmission / reception unit ex451 before transmitting the data via the antenna ex450.

[0411] When receiving video attached to an email or chat, or video linked to a web page, etc., the multiplexed data received via the antenna ex450 is decoded by the multiplexing / separation unit ex453, which separates the multiplexed data into a video data bitstream and an audio data bitstream. The multiplexing / separation unit ex453 then 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 using a video decoding method corresponding to the video encoding method described in each of the above embodiments, and displays the video or still image included in the linked video file on the display unit ex458 via the display control unit ex459. The audio signal processing unit ex454 decodes the audio signal, and the audio is output from the audio output unit ex457. Note that with the widespread use of real-time streaming, audio playback may be socially inappropriate depending on the user's circumstances. Therefore, a configuration that initially plays only the video data without playing the audio signal is desirable. The audio may be played in synchronization only when the user performs an operation such as clicking on the video data.

[0412] Although the smartphone ex115 has been used as an example, three types of implementation are possible for the terminal: a transmitting / receiving terminal having both an encoder and a decoder, a transmitting terminal having only an encoder, and a receiving terminal having only a decoder. Furthermore, in the digital broadcasting system, multiplexed data in which audio data and the like are multiplexed onto video data is received or transmitted, but the multiplexed data may also include text data related to the video in addition to audio data, or the video data itself may be received or transmitted instead of the multiplexed data.

[0413] While the main control unit ex460, which includes a CPU, controls the encoding and decoding processes, devices often also include a GPU. Therefore, a configuration is possible in which a memory shared by the CPU and GPU, or a memory with addresses managed for common use, is used to take advantage of the GPU's performance and process a large area at once. This shortens encoding time, ensures real-time performance, and achieves low latency. It is particularly efficient to perform motion estimation, deblocking filtering, SAO (Sample Adaptive Offset), and transformation and quantization processes at a picture level or other unit in the GPU rather than the CPU.

[0414] This aspect may be implemented in combination with at least a part of other aspects of the present disclosure. Also, some of the processes, some of the device configurations, and some of the syntax described in the flowcharts of this aspect may be implemented in combination with other aspects. [Industrial Applicability]

[0415] The present disclosure is applicable to an encoding device, a decoding device, an encoding method, and a decoding method. [Explanation of symbols]

[0416] 100 Encoding device 102 Division 104 Subtraction section 106 Conversion unit 108 Quantization section 110 Entropy coding unit 112, 204 Inverse quantization section 114, 206 Inverse conversion unit 116, 208 Addition section 118, 210 block memory 120, 212 Loop filter section 122, 214 frame memory 124, 216 Intra prediction section 126, 218 Inter prediction section 128, 220 Predictive control section 200 Decryption Device 202 Entropy Decoding Unit

Claims

1. a processing circuit; a memory connected to the processing circuitry; The processing circuitry uses the memory to: performing multiplication for a first block using a plurality of first luminance filter coefficients as multipliers and multiplication for a second block using a plurality of second luminance filter coefficients as multipliers, thereby changing values of a plurality of luminance pixels in the first block and the second block, thereby filtering a first boundary between the first block and the second block; performing multiplication for a third block using a plurality of first chrominance filter coefficients as multipliers and performing multiplication for a fourth block using a plurality of second chrominance filter coefficients as multipliers, thereby changing values of a plurality of chrominance pixels in the third block and the fourth block, thereby performing a filtering process on a second boundary between the third block and the fourth block; the plurality of first luminance filter coefficients and the plurality of second luminance filter coefficients are selected asymmetrically with respect to the first boundary; the plurality of first luma filter coefficients and the plurality of second luma filter coefficients are selected based on a prediction mode of the first block, a prediction mode of the second block, and a quantization parameter; the plurality of first chrominance filter coefficients and the plurality of second chrominance filter coefficients are selected symmetrically with respect to the second boundary; Encoding device.

2. a processing circuit; a memory connected to the processing circuitry; The processing circuitry uses the memory to: performing multiplication for a first block using a plurality of first luminance filter coefficients as multipliers and multiplication for a second block using a plurality of second luminance filter coefficients as multipliers, thereby changing values of a plurality of luminance pixels in the first block and the second block, thereby filtering a first boundary between the first block and the second block; performing multiplication for a third block using a plurality of first chrominance filter coefficients as multipliers and performing multiplication for a fourth block using a plurality of second chrominance filter coefficients as multipliers, thereby changing values of a plurality of chrominance pixels in the third block and the fourth block, thereby performing a filtering process on a second boundary between the third block and the fourth block; the plurality of first luminance filter coefficients and the plurality of second luminance filter coefficients are selected asymmetrically with respect to the first boundary; the plurality of first luma filter coefficients and the plurality of second luma filter coefficients are selected based on a prediction mode of the first block, a prediction mode of the second block, and a quantization parameter; the plurality of first chrominance filter coefficients and the plurality of second chrominance filter coefficients are selected symmetrically with respect to the second boundary; Decryption device.

3. a processing circuit; a memory connected to the processing circuitry; The processing circuitry uses the memory to: generating parameters for causing a decoding device to perform deblocking filtering; including said parameters in a bitstream; The deblocking filter processing performing multiplication for a first block using a plurality of first luminance filter coefficients as multipliers and multiplication for a second block using a plurality of second luminance filter coefficients as multipliers, thereby changing values of a plurality of luminance pixels in the first block and the second block, thereby filtering a first boundary between the first block and the second block; performing multiplication for a third block using a plurality of first chrominance filter coefficients as multipliers and performing multiplication for a fourth block using a plurality of second chrominance filter coefficients as multipliers, thereby changing values of a plurality of chrominance pixels in the third block and the fourth block, thereby performing a filtering process on a second boundary between the third block and the fourth block; the plurality of first luminance filter coefficients and the plurality of second luminance filter coefficients are selected asymmetrically with respect to the first boundary; the plurality of first luma filter coefficients and the plurality of second luma filter coefficients are selected based on a prediction mode of the first block, a prediction mode of the second block, and a quantization parameter; the plurality of first chrominance filter coefficients and the plurality of second chrominance filter coefficients are selected symmetrically with respect to the second boundary; Bitstream generator.

Citation Information

Patent Citations

  • Deblocking and filtering control

    JP2014511632A

  • Method for Filter Control and a Filtering Control Device

    US20130294525A1

  • Encoding / decoding apparatus and method using flexible deblocking filtering

    US20140133564A1

  • Video image encoding device and video image decoding device

    WO2012035746A1

  • Filtering blockiness artifacts for video coding

    WO2012154847A1