Prediction device, encoding device, decoding device, and program
Patent Information
- Application Number
- JP2025530245
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Priority Date
- 2023-06-29
- Filing Date
- 2024-06-28
- Publication Date
- 2025-01-02
AI Technical Summary
Conventional video encoding methods, such as HEVC and VVC, face limitations in improving prediction accuracy for intra and inter prediction, particularly due to a fixed density of additional directional prediction modes, which restricts the effectiveness of prediction in video encoding devices.
A prediction device that dynamically adjusts the number of additional directional prediction modes based on the size and shape of the target block, using a predetermined encoding tool like TIMD or DIMD, to enhance prediction accuracy by varying the additional mode density and improving the prediction mode selection process.
This approach enhances prediction accuracy in video encoding by allowing for a more flexible and adaptive selection of prediction modes, leading to improved video encoding efficiency and reduced computational load.
Abstract
Description
Prediction device, encoding device, decoding device, and program
[0001] The present disclosure relates to a prediction device, an encoding device, a decoding device, and a program.
[0002] In video coding methods such as High Efficiency Video Codec (HEVC) and Versatile Video Coding (VVC), a coding device generates a prediction block, which is a predicted image for a coding block (CU: Coding Unit) obtained by dividing an original image into blocks, and then transforms, quantizes, and entropy-codes the difference between the coding block of the original image and the prediction block before transmitting it.
[0003] As a method for generating a predicted image, inter-prediction that utilizes correlation between frames and intra-prediction that utilizes correlation within a frame are available. Intra-prediction methods include planar prediction and DC prediction, as well as directional prediction, which is a linear prediction, and HEVC allows selection from 33 directions, while VVC allows selection from 65 directions.
[0004] In intra prediction, a technique has been researched in which a trial prediction is performed using a decoded region surrounding a block to be coded as a trial prediction region (also referred to as a "template") to derive an intra prediction mode to be used for the intra prediction (see, for example, Non-Patent Document 1). Such a technique utilizes the fact that the evaluation of intra prediction in the trial prediction region on both the coding side and the decoding side is consistent. Such a technique can, for example, reduce the signaling overhead of intra prediction modes and derive additional directional predictions that subdivide conventional prediction directions (also referred to as "basic directional prediction modes") to create new prediction directions.
[0005] JVET-C0061 “Decoder-side intra mode derivation”
[0006] A prediction device according to a first aspect performs prediction in units of blocks obtained by dividing an image. The prediction device includes: an evaluation unit that applies a predetermined encoding tool to a target block for prediction and calculates an evaluation value for each candidate prediction mode using an algorithm common to the encoding side and the decoding side, using adjacent decoded regions adjacent to the target block; and a determination unit that determines at least one prediction mode to be used for the prediction from among the candidate prediction modes, based on the evaluation value calculated by the evaluation unit. The candidate prediction modes include additional prediction modes that are added to a base prediction mode when the predetermined encoding tool is applied. The evaluation unit includes a control unit that controls the number of the additional prediction modes to be added between the base prediction modes, based on at least one of the size and shape of the target block.
[0007] A coding device according to a second aspect includes the prediction device according to the first aspect.
[0008] A decoding device according to a third aspect includes the prediction device according to the first aspect.
[0009] A program according to a fourth aspect causes a computer to function as the prediction device according to the first aspect.
[0010] 1 is a diagram illustrating a configuration of an encoding device according to an embodiment. FIG. 2 is a diagram illustrating an example of an intra prediction mode according to an embodiment. FIG. 3 is a diagram illustrating an example of a predetermined encoding tool using a template in intra prediction according to an embodiment. FIG. 4 is a diagram illustrating TIMD according to an embodiment. FIG. 5 is a diagram illustrating DIMD according to an embodiment. FIG. 6 is a diagram illustrating a configuration of an intra prediction unit on an encoding side according to an embodiment. FIG. 7 is a diagram illustrating a basic directional prediction mode according to an embodiment. FIG. 8 is a diagram illustrating additional mode control according to a block size according to an embodiment. FIG. 9 is a diagram illustrating additional mode control according to a block shape according to an embodiment. FIG. 10 is a diagram illustrating additional mode control according to an angle range of directional prediction according to an embodiment. FIG. 11 is a diagram illustrating a configuration of a decoding device according to an embodiment. FIG. 12 is a diagram illustrating a configuration of an intra prediction unit on a decoding side according to an embodiment. FIG. 13 is a diagram illustrating an example operation of an intra prediction unit according to an embodiment.
[0011] In the conventional technology, the number of additional directional prediction modes added between basic directional prediction modes with consecutive mode numbers is always 1. That is, the density of the additional directional prediction modes is fixed to a certain density.
[0012] Therefore, for example, if the number of basic directional prediction modes is 65 (65 directions), the number of additional directional prediction modes is fixed at 64 (64 directions). In this case, the encoding side and the decoding side determine a final intra-prediction mode by evaluation using a template from among candidate prediction modes including a total of 129 (129 directions) directional prediction modes. However, such a method leaves room for improvement in terms of improving prediction accuracy in intra-prediction.
[0013] Note that this problem is not limited to intra prediction, but can also occur in inter prediction.
[0014] Therefore, the present disclosure provides a prediction device, an encoding device, a decoding device, and a program that can improve prediction accuracy.
[0015] A prediction device according to the present disclosure performs prediction on a block-by-block basis obtained by dividing an image, and includes: an evaluation unit that applies a predetermined encoding tool to a target block for prediction and calculates an evaluation value for each candidate prediction mode using an algorithm common to the encoding and decoding sides using adjacent decoded regions adjacent to the target block; and a determination unit that determines at least one prediction mode to be used for the prediction from among the candidate prediction modes in accordance with the evaluation value calculated by the evaluation unit. The candidate prediction modes include additional prediction modes that are added to a base prediction mode when the predetermined encoding tool is applied. The evaluation unit includes a control unit that controls an additional mode density, which indicates the number of additional prediction modes to be added between the base prediction modes with consecutive mode numbers, in accordance with at least one of the size of the target block and the shape of the target block.
[0016] In an embodiment, the prediction is intra-prediction, the base prediction mode is a basic directional prediction mode, and the additional prediction mode is an additional directional prediction mode. The control means controls an additional mode density, which indicates the number of the additional directional prediction modes to be added between the base directional prediction modes having consecutive mode numbers, in accordance with at least one of a size of the target block and a shape of the target block.
[0017] In the embodiment, the prediction is assumed to be intra prediction, but the prediction is not limited to intra prediction and may be inter prediction.
[0018] Hereinafter, an encoding device and a decoding device including an intra prediction device according to an embodiment will be described with reference to the drawings. The encoding device and the decoding device respectively encode and decode video (i.e., moving images) represented by MPEG. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals.
[0019] (1) Encoding Device The encoding device according to this embodiment will be described with reference to FIGS.
[0020] (1.1) Configuration of the Encoding Device First, the configuration of the encoding device 1 according to this embodiment will be described. Fig. 1 is a diagram showing the configuration of the encoding device 1 according to this embodiment.
[0021] The encoding device 1 is a device that encodes an input image to generate a bitstream and outputs the bitstream. The encoding device 1 includes a block division unit 100, a subtraction unit 110, a transform / quantization unit 120, an entropy encoding unit 130, an inverse quantization / inverse transform unit 140, a synthesis unit 150, a memory 160, and a prediction unit 170.
[0022] The block division unit 100 divides an original image, which is an input image in units of frames (or pictures) constituting a moving image, into a plurality of image blocks, and outputs the image blocks obtained by division to the subtraction unit 110. The size of the image blocks is, for example, 32 x 32 pixels, 16 x 16 pixels, 8 x 8 pixels, or 4 x 4 pixels. The shape of the image blocks is not limited to squares and may be rectangular (non-square). An image block is a unit for encoding by the encoding device 1 and a unit for decoding by the decoding device. Such an image block is also called a coding block (CU).
[0023] The input image is composed of a luminance signal (Y) and color difference signals (Cb, Cr), and each pixel in the input image is composed of a luminance component (Y) and a color difference component (Cb, Cr). The encoding device 1 supports three color difference formats, for example, 4:4:4, 4:2:2, and 4:2:0. The block division unit 100 performs block division on the luminance signal to output a luminance block, and performs block division on the color difference signal to output a color difference block. The shape of the block division may be the same for the luminance signal and the color difference signal, or the shape of the block division may be independently controllable for the luminance signal and the color difference signal.
[0024] The subtraction unit 110 calculates a prediction residual that represents the difference (error) between the coded block output by the block division unit 100 and a predicted block obtained by predicting the coded block by the prediction unit 170. Specifically, the subtraction unit 110 calculates the prediction residual by subtracting each pixel value of the predicted block from each pixel value of the block, and outputs the calculated prediction residual to the transformation / quantization unit 120.
[0025] The transform / quantization unit 120 performs transform processing and quantization processing on a block-by-block basis. The transform / quantization unit 120 includes a transform unit 121 and a quantization unit 122.
[0026] The transform unit 121 performs a transform process on the prediction residuals output by the subtraction unit 110 to calculate transform coefficients, and outputs the calculated transform coefficients to the quantization unit 122. Examples of transform include a discrete cosine transform (DCT), a discrete sine transform (DST), and a Karhunen-Loeve transform (KLT). The transform process includes a transform skip in which no transform process is performed. The transform skip also includes a transform in which only a horizontal transform process is applied, or a transform in which only a vertical transform process is applied. The transform unit 121 may also perform a secondary transform process in which a further transform process is applied to the transform coefficients obtained by the transform process. The secondary transform process may be applied to only a partial region of the transform coefficients.
[0027] The quantization unit 122 quantizes the transform coefficients output by the transform unit 121 using a quantization parameter and a quantization matrix, and outputs the quantized transform coefficients to the entropy coding unit 130 and the inverse quantization and inverse transform unit 140. The quantization parameter is a parameter that is commonly applied to each transform coefficient in a block and determines the coarseness of quantization. The quantization matrix is a matrix whose elements are quantization values used when quantizing each transform coefficient.
[0028] The entropy coding unit 130 performs entropy coding on the quantized transform coefficients output by the quantization unit 122, compresses the data, generates a bitstream, and outputs the bitstream to the outside of the coding device 1. For entropy coding, Huffman coding, CABAC (Context-based Adaptive Binary Arithmetic Coding), etc. may be used. Note that the entropy coding unit 130 receives input of prediction-related information (flags and indexes) from the prediction unit 170, and also encodes the input information and outputs a bitstream.
[0029] The inverse quantization and inverse transform unit 140 performs inverse quantization processing and inverse transform processing on a block-by-block basis. The inverse quantization and inverse transform unit 140 includes an inverse quantization unit 141 and an inverse transform unit 142.
[0030] The inverse quantization unit 141 performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 122. Specifically, the inverse quantization unit 141 reconstructs the transform coefficients by inverse quantizing the quantized transform coefficients output by the quantization unit 122 using a quantization parameter and a quantization matrix, and outputs the reconstructed transform coefficients to the inverse transform unit 142.
[0031] The inverse transform unit 142 performs inverse transform processing corresponding to the transform processing performed by the transform unit 121. For example, if the transform unit 121 performs discrete cosine transform, the inverse transform unit 142 performs inverse discrete cosine transform. The inverse transform unit 142 performs inverse transform processing on the transform coefficients output by the inverse quantization unit 141 to reconstruct prediction residuals, and outputs the reconstructed prediction residuals to the synthesis unit 150.
[0032] The synthesis unit 150 synthesizes the reconstructed prediction residual output by the inverse transform unit 142 by adding it pixel by pixel to the predicted block output by the prediction unit 170. The synthesis unit 150 adds each pixel value of the reconstructed prediction residual to each pixel value of the predicted block to decode (reconstruct) the block, and outputs the reconstructed block to the memory 160. Hereinafter, the reconstructed block is also referred to as a decoded block.
[0033] The memory 160 stores the reconstructed blocks output by the synthesis unit 150 and accumulates the reconstructed blocks as decoded images on a frame-by-frame basis. The memory 160 outputs the stored reconstructed blocks or decoded images to the prediction unit 170. Note that a loop filter may be provided between the synthesis unit 150 and the memory 160.
[0034] The prediction unit 170 performs prediction in units of blocks and includes an inter prediction unit 171, an intra prediction unit 172, and a switching unit 173.
[0035] The inter prediction unit 171 uses a decoded image stored in the memory 160 as a reference image to calculate a motion vector by a technique such as block matching, predicts a coding block to generate an inter prediction block, and outputs the generated inter prediction block to the switching unit 173. Here, the inter prediction unit 171 selects an optimal inter prediction method from inter prediction using multiple reference images (typically, bi-prediction) and inter prediction using one reference image (unidirectional prediction), and performs inter prediction using the selected inter prediction method. The inter prediction unit 171 outputs information related to the inter prediction (motion vectors, etc.) to the entropy coding unit 130.
[0036] The intra prediction unit 172 generates an intra prediction block by referring to decoded pixels surrounding a block in the decoded image stored in the memory 160, and outputs the generated intra prediction block to the switching unit 173. Generally, the intra prediction unit 172 selects an intra prediction mode to be applied to a predicted coding block of intra prediction from a plurality of intra prediction modes, and predicts the coding block of intra prediction using the selected intra prediction mode. The intra prediction unit 172 outputs information related to the selected intra prediction mode to the entropy coding unit 130.
[0037] The switching unit 173 switches between the inter-predicted block output by the inter-prediction unit 171 and the intra-predicted block output by the intra-prediction unit 172 , and outputs either the predicted block to the subtraction unit 110 and the synthesis unit 150 .
[0038] 2 is a diagram illustrating an example of intra prediction modes according to this embodiment. The intra prediction unit 172 performs intra prediction on a coding block. In the example shown, the candidate intra prediction modes for a luminance block are planar prediction, DC prediction, and 65 directional predictions, for a total of 67 intra prediction modes.
[0039] Prediction mode mode 0 is planar prediction, prediction mode mode 1 is DC prediction, and prediction modes 2 to 66 are directional prediction (intra angular). In directional prediction, the direction of the arrow indicates the prediction direction (reference direction), the starting point of the arrow indicates the position of the pixel to be predicted, and the end point of the arrow indicates the position of the reference pixel used for predicting this pixel to be predicted (also referred to as "reference pixel position"). A total of 65 modes of directional prediction are prepared, and the selectable prediction direction is determined by the shape (aspect ratio) of the block. Note that in the illustrated example, directional prediction is assumed to be in 65 directions, but the number of directional prediction directions may be more than 65 directions or less than 65 directions.
[0040] As prediction directions parallel to a diagonal line passing through the upper right vertex and the lower left vertex of a block, there are mode 2, which is a prediction mode that references the lower left direction, and mode 66, which is a prediction mode that references the upper right direction, and mode numbers are assigned clockwise from mode 2 to mode 66 at predetermined angles. Mode 34 is a prediction mode that references the upper left direction. Specifically, when the horizontal direction is 0°, the prediction direction of mode 2 is −45°, the prediction direction of mode 18 is 0°, the prediction direction of mode 34 is 45°, the prediction direction of mode 50 is 90°, and the prediction direction of mode 66 is 135°. Note that mode 18 is also referred to as horizontal prediction, and mode 50 is also referred to as vertical prediction.
[0041] Here, the directional predictions below mode 34, i.e., modes 2 to 33, are directional predictions that refer to the left side of the coding block, and the prediction direction is toward the left of the coding block. On the other hand, the directional predictions above mode 34, i.e., modes 35 to 66, are directional predictions that refer to the upper side of the coding block, and the prediction direction is toward the upper side of the coding block.
[0042] (1.2) Example of Predetermined Encoding Tool Using Template in Intra Prediction FIG. 3 is a diagram for explaining an example of a predetermined encoding tool using a template in intra prediction according to this embodiment.
[0043] Research is being conducted on predetermined encoding tools that use a decoded region surrounding a current block as a template to evaluate each candidate prediction mode (each candidate intra-prediction mode) using an algorithm common to both the encoding and decoding sides, thereby deriving an intra-prediction mode to be used for intra-prediction. Such predetermined encoding tools utilize the fact that the evaluation of intra-prediction using the template on both the encoding and decoding sides is consistent. Such predetermined encoding tools can, for example, reduce the signaling overhead of intra-prediction modes and derive additional directional predictions that subdivide conventional prediction directions (basic directional prediction modes) to create new prediction directions.
[0044] In the following, TIMD (Templated-based Intra Mode Derivation) and DIMD (Decoder-side Intra Mode Derivation) will be described as examples of the predetermined encoding tool.
[0045] (1.2.1) TIMD Fig. 4 is a diagram for explaining TIMD according to this embodiment. The intra prediction unit 172 according to this embodiment may perform intra prediction compatible with TIMD.
[0046] In TIMD, adjacent decoded regions of a target block for intra prediction are used as a template, and the encoding and decoding sides perform prediction trials using a common algorithm to derive an intra prediction mode common to both the encoding and decoding sides. This reduces the signaling overhead of intra prediction modes and enables the deriving of additional directional predictions that subdivide existing prediction directions into new prediction directions. For blocks to which TIMD is applied, the entropy encoding unit 130 may signal a flag indicating that TIMD is to be applied to the decoding side. TIMD may be applied only to luminance signal blocks and not to chrominance signal blocks.
[0047] First, the intra prediction unit 172 identifies an adjacent decoded region adjacent to the current block as a template, and also identifies a decoded region outside the template as a reference region. The reference region is a set of adjacent reference pixels (reference pixel line) on the left and upper sides of the template. The width L of the template may be variably set according to the size of the current block (i.e., the width M × height N of the current block). For example, if the size of the current block is 8 or less, the width L of the template may be set to 2, and if not, the width L of the template may be set to 4.
[0048] Second, the intra prediction unit 172 calculates a cost using a cost function by performing a prediction trial of predicting a template from a reference region for each intra prediction mode. The cost function may be, for example, SAD (Sum of Absolute Differences) or SATD (Sum of Absolute Transformed Differences). The intra prediction unit 172 predicts a template from a reference region using a candidate intra prediction mode and calculates the SAD or SATD between the prediction result (each predicted pixel) and the template (each decoded pixel) as a cost (evaluation value). Here, the number of conventional directional predictions is 65 (65 directions), but the number of directional predictions in which prediction trials are performed may be 129 (129 directions). In other words, additional directional prediction can be applied, in which conventional prediction directions are subdivided to create new prediction directions.
[0049] Third, the intra prediction unit 172 determines at least one intra prediction mode to be used for intra prediction according to the cost calculated for each intra prediction mode. For example, the intra prediction unit 172 calculates the cost for all candidate intra prediction modes and determines the intra prediction mode with the smallest cost as the final intra prediction mode for the current block. However, the intra prediction unit 172 does not necessarily need to calculate the cost for all candidate intra prediction modes. The intra prediction unit 172 may calculate the cost for each candidate intra prediction mode, and if the calculated cost satisfies a predetermined threshold condition, may determine the intra prediction mode that satisfies the threshold condition as the final intra prediction mode for the current block.
[0050] Fourth, the intra prediction unit 172 uses adjacent decoded areas adjacent to the target block as reference areas (reference pixels) to predict each pixel of the target block using the final intra prediction mode determined based on the cost, and generates a predicted block (intra prediction block).
[0051] Note that the number of final intra prediction modes determined based on the calculated costs is not limited to one, and two or more intra prediction modes selected in ascending order of cost may be determined. For example, the intra prediction unit 172 may determine two final intra prediction modes based on the calculated costs, generate two prediction blocks by intra prediction using these two intra prediction modes, and output the final prediction block by weighted averaging (weighted combining) the two prediction blocks according to the costs of each intra prediction mode.
[0052] (1.2.2) DIMD Fig. 5 is a diagram for explaining DIMD according to this embodiment. The intra prediction unit 172 according to this embodiment may perform intra prediction corresponding to DIMD. Here, the differences between DIMD and TIMD will be mainly described.
[0053] In DIMD, adjacent decoded regions of a target block for intra prediction are used as a template, and a Sobel filter process is performed on each window of the template using a common algorithm shared by both the encoding and decoding sides to detect edge directions, thereby deriving an intra prediction mode common to both the encoding and decoding sides. This reduces the signaling overhead of intra prediction modes and enables the derivation of additional directional predictions that subdivide existing prediction directions into new prediction directions. For blocks to which DIMD is applied, the entropy encoding unit 130 may signal a flag indicating the application of DIMD to the decoding side. DIMD may be applied only to luminance signal blocks and not necessarily to chrominance signal blocks.
[0054] First, the intra prediction unit 172 identifies an adjacent decoded area adjacent to the current block as a template, as shown in Fig. 5(a). The width of the template may be 3.
[0055] Second, the intra prediction unit 172 performs Sobel filtering on each central pixel of the template, which is hatched in the drawing. In the illustrated example, iDx is a horizontal Sobel filter, and iDy is a vertical Sobel filter. The intra prediction unit 172 calculates, for each central pixel, the horizontal Sobel filter calculation result iDx and the vertical Sobel filter calculation result iDy. As shown in FIG. 5( b), the intra prediction unit 172 identifies the closest corresponding intra prediction mode (directional prediction mode) from among the candidate intra prediction modes using iDy / iDx, and creates a histogram by voting the value of "AMP = abs(iDx) + abs(iDy)" for the identified intra prediction mode. Here, AMP corresponds to the evaluation value of each candidate intra prediction mode. Here, while the number of directional predictions in the conventional method is 65 (65 directions), the number of directional predictions for which a histogram is created may be 129 (129 directions). That is, it is possible to apply additional directional prediction in which the conventional prediction directions are subdivided to create new prediction directions.
[0056] Third, the intra prediction unit 172 determines at least one intra prediction mode to be used for intra prediction according to the AMP calculated for each candidate intra prediction mode. For example, the intra prediction unit 172 calculates the AMP for all center pixels of the template (each center pixel hatched in the figure) and determines the intra prediction mode with the largest AMP in the histogram as the final intra prediction mode for the current block. However, the intra prediction unit 172 does not necessarily have to calculate the AMP for all center pixels of the template. The intra prediction unit 172 may calculate the AMP and create a histogram for each candidate intra prediction mode, and if the calculated AMP satisfies a predetermined threshold condition, determine the intra prediction mode that satisfies the threshold condition as the final intra prediction mode for the current block.
[0057] Fourth, the intra prediction unit 172 uses adjacent decoded areas adjacent to the target block as reference areas (reference pixels) to predict each pixel of the target block using the final intra prediction mode determined based on the AMP, and generates a predicted block (intra prediction block).
[0058] Note that the number of final intra prediction modes determined based on the calculated costs is not limited to one, and two or more intra prediction modes selected in descending order of AMP may be determined. For example, the intra prediction unit 172 may determine two final intra prediction modes based on the calculated AMP, generate two prediction blocks by intra prediction using each of these two intra prediction modes, and output the final prediction block by weighted averaging (weighted synthesis) of the two prediction blocks according to the AMP of each intra prediction mode.
[0059] Here, the intra prediction unit 172 may generate two prediction blocks by intra prediction using each of two intra prediction modes, generate one prediction block by planar prediction, and output a final prediction block by taking a weighted average (weighted synthesis) of the three prediction blocks in total. Such an operation is also applicable to the above-mentioned TIMD.
[0060] (1.2.3) Issues with Predetermined Encoding Tools and Solutions Thereto In predetermined encoding tools such as the above-mentioned TIMD and DIMD, the number of additional directional prediction modes added between basic directional prediction modes with consecutive mode numbers is always 1. In other words, the density of the additional directional prediction modes (also referred to as "additional mode density") is fixed to a certain density.
[0061] Therefore, for example, if the number of basic directional prediction modes is 65 (65 directions), the number of additional directional prediction modes is fixed at 64 (64 directions). In this case, the encoding side and the decoding side determine a final intra-prediction mode by evaluation using a template from among candidate prediction modes including a total of 129 (129 directions) directional prediction modes. However, such a method leaves room for improvement in terms of improving prediction accuracy in intra-prediction.
[0062] In this embodiment, the intra prediction unit 172 controls the additional mode density, which indicates the number of additional directional prediction modes to be added between basic directional prediction modes with consecutive mode numbers, in accordance with at least one of the size of the current block, the shape of the current block, and the angular range of directional prediction. This makes it possible to appropriately variably set the additional mode density, thereby improving prediction accuracy when a predetermined encoding tool is used for intra prediction.
[0063] (1.3) Configuration of Intra Prediction Unit Next, a description will be given of the configuration of the intra prediction unit 172 according to this embodiment. The intra prediction unit 172 according to this embodiment performs intra prediction applying a predetermined encoding tool (TIMD or DIMD) that uses a template in intra prediction.
[0064] 6 is a diagram showing the configuration of the intra prediction unit 172 according to this embodiment. The intra prediction unit 172 includes a region identification unit 1721, a prediction mode evaluation unit 1722, a prediction mode determination unit 1723, and a prediction block generation unit 1724.
[0065] The region identifying unit 1721 identifies an adjacent decoded region adjacent to the current block of intra prediction as a template. In the case of TIMD, the region identifying unit 1721 may further identify a decoded region outside the template as a reference region.
[0066] The prediction mode evaluation unit 1722 applies a predetermined encoding tool to a current block for intra prediction and calculates an evaluation value for each candidate prediction mode using a template according to an algorithm common to both the encoding and decoding sides. The prediction mode evaluation unit 1722 includes an additional mode control unit 1722 a and an evaluation value calculation unit 1722 b.
[0067] The additional mode control unit 1722a controls the additional mode density, which indicates the number of additional directional prediction modes to be added between basic directional prediction modes with consecutive mode numbers, in accordance with at least one of the size of the target block, the shape of the target block, and the angle range of directional prediction. A specific example of the operation of the additional mode control unit 1722a will be described later.
[0068] The evaluation value calculation unit 1722b calculates an evaluation value for each candidate intra prediction mode, including the basic directional prediction mode and the additional directional prediction mode. For example, the evaluation value is a cost (SAD or SATD) in the case of TIMD, and an AMP in the case of DIMD. The evaluation value calculation unit 1722b outputs the evaluation value of each candidate intra prediction mode to the prediction mode determination unit 1723.
[0069] The prediction mode determination unit 1723 determines at least one prediction mode to be used for intra prediction from among the candidate prediction modes, in accordance with the evaluation value calculated by the prediction mode evaluation unit 1722 .
[0070] In the case of TIMD, the prediction mode determination unit 1723 calculates the cost for all candidate intra prediction modes and determines the intra prediction mode with the smallest cost as the final intra prediction mode for the current block. However, the prediction mode evaluation unit 1722 does not necessarily need to calculate the cost for all candidate intra prediction modes. While the prediction mode evaluation unit 1722 calculates the cost for each candidate intra prediction mode, if the calculated cost satisfies a predetermined threshold condition (specifically, if it is below the threshold), the prediction mode determination unit 1723 may determine the intra prediction mode that satisfies the threshold condition as the final intra prediction mode for the current block. The prediction mode determination unit 1723 may determine two or more intra prediction modes selected in ascending order of cost as the final intra prediction mode for the current block.
[0071] In the case of DIMD, the prediction mode determination unit 1723 determines at least one intra prediction mode to be used for intra prediction according to the AMP calculated for each candidate intra prediction mode. For example, the prediction mode determination unit 1723 determines the intra prediction mode with the largest AMP in a histogram obtained by performing AMP calculation for all center pixels of the template as the final intra prediction mode for the current block. However, the prediction mode evaluation unit 1722 does not necessarily need to perform AMP calculation for all center pixels of the template. While the prediction mode evaluation unit 1722 calculates the AMP and creates a histogram for each candidate intra prediction mode, if the calculated AMP satisfies a predetermined threshold condition (specifically, exceeds a threshold), the prediction mode determination unit 1723 may determine the intra prediction mode that satisfies the threshold condition as the final intra prediction mode for the current block.
[0072] The prediction block generation unit 1724 generates a prediction block by predicting the current block by intra prediction using at least one intra prediction mode determined by the prediction mode determination unit 1723. When the prediction mode determination unit 1723 determines one intra prediction mode, the prediction block generation unit 1724 generates an intra prediction block by the one intra prediction mode using decoded pixels in the periphery of the current block as reference pixels, and outputs the generated intra prediction block.
[0073] When the prediction mode determination unit 1723 determines multiple intra prediction modes, the prediction mode determination unit 1723 may generate multiple prediction blocks by intra prediction using each of the multiple intra prediction modes, and output the prediction block obtained by weighting the average (weighted combination) of the multiple prediction blocks according to the cost of each intra prediction mode. The prediction block generation unit 1724 may generate multiple prediction blocks by intra prediction using each of the multiple intra prediction modes selected according to the evaluation value, and may also generate one prediction block by planar prediction, and output a final prediction block by weighting the average (weighted combination) of these prediction blocks.
[0074] (1.4) Specific Example of Operation of Additional Mode Control Unit Next, a specific example of operation of the additional mode control unit 1722a according to this embodiment will be described with reference to FIGS.
[0075] 7 is a diagram illustrating basic directional prediction modes according to this embodiment. For ease of explanation, in this embodiment, it is assumed that there are a total of 16 basic directional prediction modes (16 directions) from mode 2 to mode 18. Specifically, when the horizontal direction is 0°, the prediction direction of mode 2 is −45°, the prediction direction of mode 6 is 0°, the prediction direction of mode 10 is 45°, the prediction direction of mode 14 is 90°, and the prediction direction of mode 18 is 135°. Mode 0 is planar prediction, mode 1 is DC prediction, mode 6 is horizontal prediction, and mode 14 is vertical prediction.
[0076] (1.4.1) Addition Mode Control According to Block Size Fig. 8 is a diagram for explaining addition mode control according to block size according to this embodiment. Note that the block size of the target block can be expressed as the product of the width and height of the target block.
[0077] The addition mode control unit 1722a sets the addition mode density to a first density when the size of the current block is a first size. The addition mode control unit 1722a sets the addition mode density to a second density higher than the first density when the size of the current block is a second size larger than the first size. That is, the addition mode control unit 1722a increases the number of additional directional prediction modes (i.e., increases the addition mode density) as the size of the current block increases.
[0078] When the block size is small, the distance between the reference pixels referenced by each basic directional prediction mode with consecutive mode numbers is short, but when the block size is large, the distance between the reference pixels referenced by each basic directional prediction mode with consecutive mode numbers is long.Therefore, when the block size is large, the number of additional directional prediction modes can be increased (i.e., the additional mode density can be increased) to improve the prediction accuracy of intra prediction.On the other hand, when the block size is small, the number of additional directional prediction modes can be reduced (i.e., the additional mode density can be reduced) to reduce the calculation processing load related to the evaluation value calculation of candidate intra prediction modes.
[0079] 8(a) shows an example of adding additional directional prediction modes when the block size is 8×8 (64 pixels in total). When the block size is 8×8, the additional mode control unit 1722a sets the number of additional directional prediction modes to be added between basic directional prediction modes with consecutive mode numbers to 1 (additional mode density = 1). In other words, the additional mode control unit 1722a adds one additional directional prediction mode between basic directional prediction modes with consecutive mode numbers.
[0080] 8(b) shows an example of adding additional directional prediction modes when the block size is 16x16 (256 pixels in total). When the block size is 16x16, the additional mode control unit 1722a sets the number of additional directional prediction modes to be added between basic directional prediction modes with consecutive mode numbers to 2 (additional mode density = 2). In other words, the additional mode control unit 1722a adds two additional directional prediction modes between basic directional prediction modes with consecutive mode numbers.
[0081] 8(c) shows an example of adding additional directional prediction modes when the block size is 32×32 (1024 pixels in total). When the block size is 32×32, the additional mode control unit 1722a sets the number of additional directional prediction modes to be added between basic directional prediction modes with consecutive mode numbers to 3 (additional mode density=3). In other words, the additional mode control unit 1722a adds three additional directional prediction modes between basic directional prediction modes with consecutive mode numbers.
[0082] 8 is merely an example, and other correspondences may be adopted. For example, when the block size is 4 × 4, the additional mode control unit 1722 a may set the number of additional directional prediction modes to be added between basic directional prediction modes with consecutive mode numbers to 0 (additional mode density = 0).
[0083] (1.4.2) Addition Mode Control According to Block Shape Fig. 9 is a diagram for explaining addition mode control according to block shape according to this embodiment. Note that the block shape of the target block can be expressed as the ratio of the width and height of the target block.
[0084] If the target block is a square, the addition mode control unit 1722a may set the addition mode density for the target block to be uniform (see FIG. 8).
[0085] On the other hand, if the target block is non-square, the addition mode control unit 1722a sets the addition mode density non-uniformly for the target block. For example, as shown in Figures 9(a) and 9(b), the addition mode control unit 1722a may combine addition mode control according to the block shape and addition mode control according to the angle range of the prediction direction to set the density of the additional directional prediction modes according to the angle range of the prediction direction within the non-square target block.
[0086] The additional mode control unit 1722a may set a higher additional mode density for all or some of the up prediction modes, which are basic directional prediction modes that only reference upward reference pixels, compared to other basic directional prediction modes, depending on whether the current block has a horizontally elongated shape with its width greater than its height. When the current block has a horizontally elongated shape, the distance between reference pixels referenced by up prediction modes with consecutive mode numbers becomes greater. Therefore, for a current block with a horizontally elongated shape, adding many additional directional prediction modes to the up prediction modes (i.e., increasing the additional mode density) can improve the prediction accuracy of intra prediction. Meanwhile, for left prediction modes, reducing the number of additional directional prediction modes (i.e., decreasing the additional mode density) can reduce the computational load associated with calculating evaluation values for candidate intra prediction modes.
[0087] In FIG. 9 , the target block has a horizontally elongated shape. As shown in FIG. 9 (b), the additional mode control unit 1722a sets the number of additional directional prediction modes to be added between basic directional prediction modes that reference the upper right direction among the upward prediction modes to 2 (additional mode density = 2), and sets the number of additional directional prediction modes to be added between other basic directional prediction modes to 1 (additional mode density = 1). That is, since the target block has a horizontally elongated shape with its width greater than its height, the additional mode control unit 1722a sets a higher additional mode density than the other basic directional prediction modes for prediction modes that reference pixels further to the right than 45 degrees to the upper right (135 degrees when horizontal prediction is used as the basis). Note that, when the target block has a horizontally elongated shape, a basic directional prediction mode that references a direction to the right of 45 degrees to the upper right is added by WAIP (Wide Angle Intra Prediction). The additional mode control unit 1722a may set a higher additional mode density for such added basic directional prediction modes than the other basic directional prediction modes.
[0088] Note that the addition mode control unit 1722a may perform a combination of addition mode control according to the block size and addition mode control according to the block shape. For example, the addition mode control unit 1722a may use an addition mode density according to the block size as a base addition mode density, and set the number of addition directional prediction modes to be added between basic directional prediction modes in a predetermined angle range to twice the base addition mode density. For example, if the block size is a horizontally elongated shape of 32 × 8 (256 pixels in total), the base addition mode density is set to 2. For a target block having a horizontally elongated block size of 32 × 8 (256 pixels in total), the addition mode control unit 1722a may set the number of addition directional prediction modes to be added between upward prediction modes to 4 (addition mode density = 4), and may set the number of addition directional prediction modes to be added between other basic directional prediction modes to 2 (addition mode density = 2).
[0089] On the other hand, the additional mode control unit 1722a may set a higher additional mode density for all or some of the leftward prediction modes, which are basic directional prediction modes that only reference pixels in the left direction, compared to other basic directional prediction modes, depending on whether the current block has a vertically elongated shape in which the height is greater than the width. When the current block has a vertically elongated shape, the distance between reference pixels referenced in leftward prediction modes with consecutive mode numbers becomes greater. Therefore, for a current block having a vertically elongated shape, adding many additional directional prediction modes to leftward prediction modes (i.e., increasing the additional mode density) can improve the prediction accuracy of intra prediction. On the other hand, for upward prediction modes, reducing the number of additional directional prediction modes (i.e., lowering the additional mode density) can reduce the computational load related to calculating evaluation values of candidate intra prediction modes. For example, when the current block has a vertically elongated shape in which the height is greater than the width, the additional mode control unit 1722a may set a higher additional mode density for prediction modes that reference pixels further downward than 45 degrees to the bottom left (-45 degrees when horizontal prediction is used as the standard) compared to other basic directional prediction modes. Note that, when the target block has a vertically elongated shape, a basic directional prediction mode that references a direction below 45 degrees to the lower left is added by WAIP. The additional mode control unit 1722a may set a higher additional mode density for such an added basic directional prediction mode than for the other basic directional prediction modes.
[0090] (1.4.3) Additional Mode Control According to Angle Range of Directionality Prediction FIG. 10 is a diagram for explaining additional mode control according to angle range of directionality prediction according to this embodiment.
[0091] The additional mode control unit 1722a may set the additional mode densities corresponding to the horizontal prediction mode and the vertical prediction mode among the basic directional prediction modes to be lower than the additional mode densities corresponding to the other basic directional prediction modes. The basic directional prediction modes near the horizontal prediction mode originally have a high mode density, and the basic directional prediction modes near the vertical prediction mode also originally have a high mode density. Therefore, by lowering the additional mode densities corresponding to the horizontal prediction mode and the vertical prediction mode, the computational processing load related to calculation of evaluation values of candidate intra-prediction modes can be reduced.
[0092] In the example of Fig. 10 , the additional mode control unit 1722a adds one additional directional prediction mode between mode 6, which is the horizontal prediction mode, and mode 5, which is immediately preceding mode 6, and adds one additional directional prediction mode between mode 6 and mode 7, which is immediately following mode 6 (additional mode density = 1). The additional mode control unit 1722a also adds one additional directional prediction mode between mode 14, which is the vertical prediction mode, and mode 13, which is immediately preceding mode 6, and adds one additional directional prediction mode between mode 14 and mode 15, which is immediately following mode 14 (additional mode density = 1). Meanwhile, the additional mode control unit 1722a adds two additional directional prediction modes between the other basic directional prediction modes (additional mode density = 2). In this way, by adding many additional directional prediction modes to basic directional prediction modes other than horizontal and vertical prediction modes (i.e., increasing the additional mode density), it is possible to improve the prediction accuracy of intra prediction.
[0093] The additional mode control unit 1722a may perform a combination of additional mode control according to the block size and additional mode control according to the angle range of directional prediction. For example, when the block size is 8 × 8 (64 pixels in total), the additional mode control unit 1722a may set the additional mode density corresponding to the horizontal prediction mode and the vertical prediction mode to 0 (i.e., no additional directional prediction mode), and may add one additional directional prediction mode between the other basic directional prediction modes (additional mode density = 1).
[0094] (2) Decoding Device Next, the decoding device according to this embodiment will be described with reference to FIGS.
[0095] 11 is a diagram showing the configuration of a decoding device 2 according to this embodiment. The decoding device 2 is a device that derives and outputs a decoded image from an input bitstream. The decoding device 2 includes an entropy decoding unit 200, an inverse quantization and inverse transform unit 210, a synthesis unit 220, a memory 230, and a prediction unit 240.
[0096] The entropy decoding unit 200 decodes the bitstream generated by the encoding device 1 and outputs the quantized transform coefficients to the inverse quantization and inverse transform unit 210. The entropy decoding unit 200 also obtains information related to prediction (intra prediction and inter prediction) and outputs the obtained information to the prediction unit 240. In this embodiment, the entropy decoding unit 200 may obtain a flag indicating that a predetermined encoding tool is to be applied and output the flag to the prediction unit 240.
[0097] The inverse quantization and inverse transform unit 210 performs inverse quantization and inverse transform processing on a block-by-block basis. The inverse quantization and inverse transform unit 210 includes an inverse quantization unit 211 and an inverse transform unit 212.
[0098] The inverse quantization unit 211 performs inverse quantization processing corresponding to the quantization processing performed by the quantization unit 122 of the encoding device 1. The inverse quantization unit 211 reconstructs the transform coefficients of the coding block by inverse quantizing the quantized transform coefficients output by the entropy decoding unit 200 using the quantization parameter and the quantization matrix, and outputs the reconstructed transform coefficients to the inverse transform unit 212.
[0099] The inverse transform unit 212 performs inverse transform processing corresponding to the transform processing performed by the transform unit 121 of the encoding device 1. The inverse transform unit 212 performs inverse transform processing on the transform coefficients output by the inverse quantization unit 211 to reconstruct prediction residuals, and outputs the reconstructed prediction residuals to the synthesis unit 220. The inverse transform processing includes transform skip, in which the inverse transform processing is not performed. Furthermore, the inverse transform unit 212 may perform inverse secondary transform processing in which a further inverse transform processing is applied to the signal obtained by the inverse transform processing.
[0100] The synthesis unit 220 synthesizes the prediction residual output by the inverse transform unit 212 and the prediction block output by the prediction unit 240 by adding them together pixel by pixel, decodes (reconstructs) the original block, and outputs the reconstructed block to the memory 230.
[0101] The memory 230 stores the reconstructed blocks output by the synthesis unit 220 and accumulates the reconstructed blocks as decoded images on a frame-by-frame basis. The memory 230 outputs the reconstructed blocks or the decoded images to the prediction unit 240. The memory 230 also outputs the decoded images on a frame-by-frame basis to the outside of the decoding device 2. Note that a loop filter may be provided between the synthesis unit 220 and the memory 230.
[0102] The prediction unit 240 performs prediction in units of blocks and includes an inter prediction unit 241, an intra prediction unit 242, and a switching unit 243.
[0103] The inter prediction unit 241 predicts a coded block by inter prediction using a decoded image stored in the memory 230 as a reference image. The inter prediction unit 241 generates an inter prediction block by performing inter prediction in accordance with the motion vector information output by the entropy decoding unit 200, and outputs the generated inter prediction block to the switching unit 243.
[0104] The intra prediction unit 242 generates an intra prediction block by referring to decoded pixels surrounding a block to be predicted (encoding block) among the decoded images stored in the memory 230, and outputs the generated intra prediction block to the switching unit 243. The intra prediction unit 242 according to this embodiment performs intra prediction corresponding to the above-mentioned predetermined encoding tool.
[0105] The switching unit 243 switches between the inter-predicted block output by the inter-prediction unit 241 and the intra-predicted block output by the intra-prediction unit 242 , and outputs either the predicted block to the synthesis unit 220 .
[0106] 12 is a diagram showing the configuration of the intra prediction unit 242 according to this embodiment. The intra prediction unit 242 has a region identification unit 2421, a prediction mode evaluation unit 2422, a prediction mode determination unit 2423, and a prediction block generation unit 2424. Here, the region identification unit 2421, the prediction mode evaluation unit 2422, the prediction mode determination unit 2423, and the prediction block generation unit 2424 perform the same processing as the region identification unit 1721, the prediction mode evaluation unit 1722, the prediction mode determination unit 1723, and the prediction block generation unit 1724 on the encoding side, respectively.
[0107] (3) Operational Example of Intra Prediction Next, an operational example of intra prediction according to this embodiment will be described. Fig. 13 is a diagram showing an operational example of the decoding-side intra prediction unit 242 according to this embodiment. Here, the operation of the decoding-side intra prediction unit 242 will be described as an example, but the encoding-side intra prediction unit 172 also performs the same operation as the decoding-side intra prediction unit 242.
[0108] In step S1, the additional mode control unit 2422a controls (variably sets) the additional mode density, which indicates the number of additional directional prediction modes to be added between basic directional prediction modes with consecutive mode numbers, in accordance with at least one of the size of the target block, the shape of the target block, and the angular range of directional prediction.
[0109] In step S2, the evaluation value calculation unit 2422b calculates an evaluation value for each candidate intra prediction mode, including the basic directional prediction mode and the additional directional prediction mode. For example, in the case of TIMD, the evaluation value calculation unit 2422b calculates the cost (SAD or SATD) of each candidate intra prediction mode as the evaluation value, and in the case of DIMD, the evaluation value calculation unit 2422b calculates the AMP of each candidate intra prediction mode as the evaluation value.
[0110] In step S3, the prediction mode determination unit 2423 determines at least one prediction mode to be used for intra prediction from among the candidate prediction modes, based on the evaluation value calculated by the prediction mode evaluation unit 2422. In the case of TIMD, the prediction mode determination unit 2423, for example, calculates the cost of all candidate intra prediction modes and determines the intra prediction mode with the smallest cost as the final intra prediction mode for the current block. On the other hand, in the case of DIMD, the prediction mode determination unit 2423, for example, calculates the AMP for all center pixels of the template and determines the intra prediction mode with the largest AMP in the histogram obtained as the final intra prediction mode for the current block.
[0111] In step S4, the prediction block generation unit 2424 predicts the current block by intra prediction using the intra prediction mode determined by the prediction mode determination unit 2423, and generates a prediction block. If the prediction mode determination unit 2423 determines one intra prediction mode, the prediction block generation unit 2424 generates an intra prediction block by the one intra prediction mode using decoded pixels surrounding the current block as reference pixels, and outputs the generated intra prediction block. If the prediction mode determination unit 2423 determines multiple intra prediction modes, the prediction block generation unit 2424 may generate multiple prediction blocks by intra prediction using each of the multiple intra prediction modes, and output a prediction block obtained by weighted averaging (weighted combining) the multiple prediction blocks according to the cost of each intra prediction mode.
[0112] (4) Summary of the Embodiment Each intra prediction unit 172, 242 according to the present embodiment includes a prediction mode evaluation unit 1722, 2422 that applies a predetermined encoding tool to a current block for intra prediction and calculates an evaluation value for each candidate prediction mode using an algorithm common to the encoding and decoding sides, using adjacent decoded regions adjacent to the current block, and a prediction mode determination unit 1723, 2423 that determines at least one prediction mode to be used for intra prediction from among the candidate prediction modes, based on the evaluation value calculated by the prediction mode evaluation unit 1722, 2422. The candidate prediction modes include additional directional prediction modes that are added to basic directional prediction modes when the predetermined encoding tool is applied. The prediction mode evaluation unit 1722, 2422 includes an additional mode control unit 1722a, 2422a that controls an additional mode density, which indicates the number of additional directional prediction modes to be added between basic directional prediction modes with consecutive mode numbers, based on at least one of the size of the current block, the shape of the current block, and the angular range of directional prediction. This makes it possible to improve the prediction accuracy in intra prediction when a predetermined encoding tool using a template is applied in intra prediction.
[0113] (5) Other Embodiments In the above-described embodiments, TIMD and DIMD have been described as examples of predetermined encoding tools that use templates in intra prediction. However, the predetermined encoding tool is not limited to TIMD and DIMD, and may be any encoding tool that calculates an evaluation value for each candidate prediction mode using a template with an algorithm that is common to both the encoding side and the decoding side.
[0114] A program may be provided that causes a computer to execute each process performed by the image processing device (encoding device 1, decoding device 2). The program may be recorded on a computer-readable medium. The computer-readable medium can be used to install the program on a computer. Here, the computer-readable medium on which the program is recorded may be a non-transitory recording medium. The non-transitory recording medium is not particularly limited, and may be, for example, a recording medium such as a CD-ROM or a DVD-ROM. Circuits that execute each process performed by the image processing device (encoding device 1, decoding device 2) may be integrated, and the image processing device may be configured as a semiconductor integrated circuit (chip set, SoC).
[0115] The functions performed by the image processing device (encoding device 1, decoding device 2) may be implemented in circuitry or processing circuitry, including general-purpose processors, application-specific processors, integrated circuits, ASICs (Application Specific Integrated Circuits), CPUs (Central Processing Units), conventional circuits, and / or combinations thereof, programmed to perform the described functions. A processor includes transistors and other circuits and is considered to be circuitry or processing circuitry. A processor may also be a programmed processor that executes a program stored in memory. In this specification, circuitry, unit, or means refers to hardware that is programmed to perform the described functions or hardware that executes them. The hardware may be any hardware disclosed herein or any hardware known to be programmed or capable of performing the described functions. If the hardware is a processor, the circuitry, means, or unit is a combination of the hardware and software used to configure the hardware and / or processor.
[0116] As used in this disclosure, the terms "based on" and "depending on / in response to" do not mean "based only on" or "depending only on," unless expressly stated otherwise. The term "based on" means both "based only on" and "based at least in part on." Similarly, the term "depending on" means both "depending only on" and "depending at least in part on." The terms "include," "comprise," and variations thereof do not mean including only the listed items, but may mean including only the listed items or may include additional items in addition to the listed items. Additionally, the term "or," as used in this disclosure, is not intended to mean an exclusive or. Furthermore, any reference to elements using designations such as "first," "second," etc., as used in this disclosure does not generally limit the quantity or order of those elements. These designations may be used herein as a convenient method of distinguishing between two or more elements. Thus, a reference to a first and a second element does not imply that only two elements may be employed therein or that the first element must precede the second element in some way. In this disclosure, where articles are added by translation, such as a, an, and the in English, these articles shall include the plural unless the context clearly indicates otherwise.
[0117] The above describes the embodiments in detail with reference to the drawings, but the specific configuration is not limited to that described above, and various design changes can be made within the scope that does not deviate from the gist of the invention.
[0118] This application claims priority from Japanese Patent Application No. 2023-107237 (filed June 29, 2023), the entire contents of which are incorporated herein by reference.
[0119] (6) Supplementary Notes The following are additional notes regarding the features of the above-described embodiment.
[0120] (Supplementary Note 1) An intra prediction device (172, 242) that performs intra prediction on a block-by-block basis obtained by dividing an image, comprising: evaluation means (1722, 2422) that applies a predetermined coding tool to a current block of the intra prediction, and calculates an evaluation value for each candidate prediction mode by an algorithm common to the coding side and the decoding side using adjacent decoded areas that are adjacent to the current block; and determination means (1723, 2423) that determines at least one prediction mode to be used for the intra prediction from the candidate prediction modes according to the evaluation value calculated by the evaluation means, wherein the candidate prediction modes include additional directional prediction modes that are added to basic directional prediction modes when the predetermined coding tool is applied, and the evaluation means has control means (1722a, 2422a) that controls an additional mode density, which indicates the number of the additional directional prediction modes to be added between the basic directional prediction modes that have consecutive mode numbers, according to at least one of the size of the current block, the shape of the current block, and the angular range of directional prediction.
[0121] (Supplementary Note 2) The intra prediction device according to Supplementary Note 1, characterized in that the control means sets the additional mode density to a first density when the size of the current block is a first size, and sets the additional mode density to a second density higher than the first density when the size of the current block is a second size larger than the first size.
[0122] (Supplementary Note 3) The intra prediction device according to Supplementary Note 1 or 2, characterized in that the control means sets the additional mode density uniformly in accordance with the current block being a square, and sets the additional mode density non-uniformly in accordance with the current block being a non-square.
[0123] (Supplementary Note 4) The intra prediction device according to any one of Supplementary Notes 1 to 3, wherein the control means sets the additional mode density higher for all or some of the upward prediction modes, which are the basic directional prediction modes that refer only to upward reference pixels, compared to other basic directional prediction modes, in accordance with the fact that the current block has a horizontally elongated shape with a width greater than a height.
[0124] (Supplementary Note 5) The intra prediction device according to any one of Supplementary Notes 1 to 4, wherein the control means sets the additional mode density higher for all or some of the leftward prediction modes, which are the basic directional prediction modes that refer only to reference pixels in the left direction, compared to other basic directional prediction modes, in accordance with the fact that the current block has a vertically elongated shape with a height greater than a width.
[0125] (Supplementary Note 6) The intra prediction device according to any one of Supplementary Notes 1 to 5, wherein the control means sets the additional mode densities corresponding to horizontal prediction modes and vertical prediction modes among the basic directional prediction modes to be lower than the additional mode densities corresponding to other basic directional prediction modes.
[0126] (Supplementary Note 7) A coding device (1) comprising the intra prediction device according to any one of Supplementary Notes 1 to 6.
[0127] (Supplementary Note 8) A decoding device (2) comprising the intra prediction device according to any one of Supplementary Notes 1 to 6.
[0128] (Supplementary Note 9) A program causing a computer to function as the intra prediction device according to any one of Supplementary Notes 1 to 6.
[0129] 1: Encoding device 2: Decoding device 100: Block division unit 110: Subtraction unit 120: Transformation and quantization unit 121: Transformation unit 122: Quantization unit 130: Entropy encoding unit 140: Inverse quantization and inverse transform unit 141: Inverse quantization unit 142: Inverse transform unit 150: Combining unit 160: Memory 170: Prediction unit 171: Inter prediction unit 172: Intra prediction unit 173: Switching unit 200: Entropy decoding unit 210: Inverse quantization and inverse transform unit 211: Inverse quantization unit 212: Inverse transform unit 220: Combining unit 230: Memory 240: Prediction unit 241: Inter prediction unit 242: Intra prediction unit 243: Switching unit 1721: Area identification unit 1722: Prediction mode evaluation unit 1722a: Additional mode control unit 1722b: Evaluation value calculation unit 1723: Prediction mode determination unit 1724: Prediction block generation unit 2421: Area identification unit 2422: Prediction mode evaluation unit 2422a: Additional mode control unit 2422b: Evaluation value calculation unit 2423: Prediction mode determination unit 2424: Prediction block generation unit
Claims
1. A prediction device that performs prediction on a block-by-block basis obtained by dividing an image, comprising: an evaluation means that applies a specified encoding tool to a target block for prediction, and calculates an evaluation value for each candidate prediction mode using an algorithm common to the encoding side and the decoding side using adjacent decoded areas adjacent to the target block; and a determination means that determines at least one prediction mode to be used for the prediction from among the candidate prediction modes in accordance with the evaluation value calculated by the evaluation means, wherein the candidate prediction modes include additional prediction modes that are added to a basic prediction mode when the specified encoding tool is applied, and the evaluation means has a control means that controls the number of the additional prediction modes to be added between the basic prediction modes in accordance with at least one of the size of the target block and the shape of the target block.
2. The prediction device of claim 1, wherein the prediction is intra-prediction, the basic prediction mode is a basic directional prediction mode, the additional prediction mode is an additional directional prediction mode, and the control means controls an additional mode density indicating the number of the additional directional prediction modes to be added between the basic directional prediction modes having consecutive mode numbers in accordance with at least one of the size of the target block and the shape of the target block.
3. The prediction device described in claim 2, wherein the control means sets the additional mode density to a first density when the size of the target block is a first size, and sets the additional mode density to a second density higher than the first density when the size of the target block is a second size larger than the first size.
4. The prediction device according to claim 2, wherein the control means sets the additional mode density uniformly depending on whether the target block is a square, and sets the additional mode density non-uniformly depending on whether the target block is a non-square.
5. The prediction device described in claim 2, wherein the control means sets the additional mode density for all or a part of the upward prediction modes, which are the basic directional prediction modes that refer only to reference pixels in the upward direction, to a higher additional mode density than for other basic directional prediction modes, depending on whether the target block is a horizontally elongated shape with its width greater than its height.
6. The prediction device described in claim 2, wherein the control means sets the additional mode density for all or a part of the left direction prediction modes, which are the basic directional prediction modes that refer only to reference pixels in the left direction, to a higher value than for other basic directional prediction modes, depending on whether the target block has a vertically elongated shape with its height greater than its width.
7. The prediction device according to claim 2, wherein the control means controls the additional mode density in accordance with at least one of the size of the target block and the shape of the target block, and an angle range of the directional prediction.
8. The prediction device according to claim 7, wherein the control means sets the additional mode densities corresponding to the horizontal prediction mode and the vertical prediction mode among the basic directional prediction modes to be lower than the additional mode densities corresponding to the other basic directional prediction modes.
9. An encoding device comprising a prediction device according to any one of claims 1 to 8.
10. A decoding device comprising a prediction device according to any one of claims 1 to 8.
11. A program for causing a computer to function as the prediction device according to any one of claims 1 to 8.
Citation Information
Patent Citations
Image decoding apparatus, image encoding apparatus, image decoding method, and image encoding method
WO2018037896A1
