Image encoding device, image encoding method, and program

By limiting division patterns based on block properties and optimizing intra and inter prediction modes, the image encoding device reduces processing overhead and enhances encoding efficiency.

JP2024125778AInactive Publication Date: 2024-09-19KDDI CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023033835
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-06
Publication Date
2024-09-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Conventional video encoding methods require a large amount of processing due to the generation of numerous predicted pixel combinations and rate distortion calculations during block division, leading to inefficient encoding.

Method used

An image encoding device that limits the number of division patterns based on the properties of the block, such as edge direction, and calculates predicted pixels to reduce the number of necessary calculations, focusing on intra and inter prediction modes to determine efficient block divisions.

Benefits of technology

This approach significantly reduces the amount of encoding processing by limiting unnecessary calculations and optimizing block divisions, thereby improving encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024125778000001
    Figure 2024125778000001
Patent Text Reader

Abstract

To reduce the amount of coding processing in an image coding device.SOLUTION: An image coding device that divides an input image into a plurality of blocks and codes it on a block-by-block basis includes a storage device that holds a program for coding the input image on a block-by-block basis, and a processor that reads the program from the storage device and codes the input image, and the processor processing of generating a predicted pixel for a block to be processed from pixels adjacent to the block to be processed and an intra-prediction mode, processing of calculating a prediction error using pixel values of the block to be processed, the values of the predicted pixels, and information on the intra-prediction mode, and processing of determining a group of candidate division patterns for the block to be processed on the basis of the value of the prediction error.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

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

[0002] In order to efficiently transmit or record moving images, image encoding devices that generate encoded data by encoding moving images and moving image decoding devices that generate decoded images by decoding the encoded data are used, such as H.264 / AVC and HEVC (High-Efficiency Video Coding) formats.

[0003] In such a video coding method, a predicted image is usually generated based on a locally decoded image obtained by encoding / decoding an input image, and a prediction error (sometimes called a "difference image" or "residual image") obtained by subtracting the predicted image from the input image (original image) is coded. Methods for generating a predicted image include inter-frame prediction (inter prediction) and intra-frame prediction (intra prediction).

[0004] One recent technique for video encoding and decoding is disclosed in Non-Patent Document 1. Non-Patent Document 1 discloses a technique for dividing an encoding block into blocks of various sizes (hereinafter, block division) and encoding the divided blocks. Note that the encoding block here refers to the result of dividing an input image signal into predefined heights and widths. In Non-Patent Document 1, the blocks are divided into five division patterns (see FIG. 1 described later), for example. In the block division, the encoding block is divided recursively using these five division patterns. Here, the encoding block and the blocks after division at each stage during the recursive process are called search blocks.

[0005] In a video coding method, predicted pixels are generated for coding blocks by intra prediction, inter prediction, or both. Then, a rate-distortion cost is calculated for the generated predicted pixels. Block division is performed on a search block in all possible division patterns (e.g., five patterns). Here, all possible division patterns are those in which the height of a search block is not smaller than a predefined length, and the width is also not smaller than a predefined length. After this repetitive process is completed, the height and width of each coding unit are determined using the rate-distortion costs of all search blocks so that the total rate-distortion cost is minimized. [Prior art documents] [Non-patent literature]

[0006] [Non-Patent Document 1] Algorithm description for Versatile Video Coding and Test Model 11 (VTM 11),JVET-T2002. Summary of the Invention [Problem to be solved by the invention]

[0007] However, as described above, in the conventional technology disclosed in Non-Patent Document 1, new search blocks are generated for all possible division patterns, so that a huge number of prediction pixel generation and rate distortion cost calculations are required. Therefore, there is a problem that a very large amount of coding processing is required. In view of such circumstances, the present disclosure proposes a technique for reducing the amount of coding processing in an image coding device. [Means for solving the problem]

[0008] In order to solve the above problems, the present disclosure proposes, as an example, an image encoding device that divides an input image into a plurality of blocks and encodes it on a block-by-block basis, the image encoding device including: a storage device that holds a program for encoding the input image on a block-by-block basis; and a processor that reads the program from the storage device and encodes the input image, the processor performing the following processes: generating a predicted pixel for the block to be processed from pixels adjacent to the block to be processed and an intra-prediction mode; calculating a prediction error using pixel values ​​of the block to be processed, values ​​of the predicted pixels, and information on the intra-prediction mode; and determining a candidate division pattern group for the block to be processed based on the value of the prediction error.

[0009] Further features related to the present disclosure will become apparent from the description of the present specification and the accompanying drawings. Also, aspects of the present disclosure may be realized and realized by the elements and combinations of various elements and aspects of the following detailed description and the appended claims. The descriptions in this specification are exemplary and illustrative only and are not intended to limit the scope or application of the present disclosure in any way. Effect of the Invention

[0010] According to the technology of the present disclosure, it becomes possible to reduce the amount of coding processing in an image coding device. [Brief description of the drawings]

[0011] [Figure 1] FIG. 13 is a diagram illustrating an example of a division pattern of an m×n search block. [Diagram 2] FIG. 13 is a diagram showing encoded blocks after recursive processing of block division is completed. [Figure 3A] 1 is a diagram showing an example of a schematic configuration of an image processing system 10 according to the present embodiment. [Figure 3B] FIG. 2 is a diagram illustrating an example of the internal configuration of a computer that constitutes the image encoding device 100. [Figure 4]1 is a block diagram showing an example of the internal functional configuration of an encoding processing unit 1011 of the image encoding device 100. FIG. [Diagram 5] 4 is a diagram illustrating an example of the internal configuration of a division pattern candidate group output unit 112 according to the first embodiment. FIG. [Figure 6] FIG. 13 is a diagram showing an example of prediction directions of angular prediction and wide angular prediction. [Figure 7A] FIG. 7 is a diagram showing the positional relationship between a search block 701 and a reference block 702. [Figure 7B] FIG. 7 is a diagram showing example 1 of pixels of a reference block 702 used when predicting pixels that form a search block 701. [Figure 7C] FIG. 7 is a diagram showing example 2 of pixels in a reference block 702 used when predicting pixels that form a search block 701. [Figure 8] 10 is a flowchart illustrating details of a division pattern candidate group generating process and a block division process according to the first embodiment. [Figure 9] FIG. 13 is a diagram showing a prediction direction and predicted pixel values ​​of intra prediction, and is a diagram for explaining the basis for generating a group of split pattern candidates. [Figure 10] FIG. 11 is a diagram illustrating an example of the internal configuration of a division pattern candidate group output unit 112 according to the second embodiment. [Figure 11] 10 is a flowchart illustrating details of a division pattern candidate group generating process and a block division process according to a second embodiment. [Figure 12] FIG. 13 is a diagram showing whether or not horizontal and vertical bisection can be output as a division pattern candidate group when the threshold value c is set to 0.6. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] Hereinafter, the embodiments and examples of the present disclosure will be described with reference to the accompanying drawings. In the accompanying drawings, functionally identical elements may be indicated by the same numbers. Note that the accompanying drawings show specific embodiments and implementation examples according to the principles of the present disclosure, but these are for understanding the present disclosure and are by no means used to interpret the present disclosure in a limited manner.

[0013] In the present embodiment, the description is given in sufficient detail for a person skilled in the art to implement the present disclosure, but it should be understood that other implementations and forms are possible, and that changes in configuration and structure and substitutions of various elements are possible without departing from the scope and spirit of the technical ideas of the present disclosure. Therefore, the following description should not be interpreted as being limited thereto.

[0014] (1) Embodiments (Common features of Examples 1 and 2 described below) An embodiment of the present disclosure discloses a method for reducing the amount of encoding processing by generating a group of candidate partitioning patterns (candidate partitioning patterns) for each search block that is estimated to have a small rate-distortion cost from an intra-prediction mode and its predicted pixels, and attempting block partitioning using only the generated candidate partitioning patterns (e.g., using only three partitioning patterns out of five partitioning patterns).

[0015] <Example of block division pattern> FIG. 1 is a diagram showing an example of a division pattern of an m×n search block. The target of block division is an encoding block in the first process, and then becomes a divided block at each stage during recursive processing. In FIG. 1, these are collectively shown as an m×n search block. Note that m and n in FIG. 1 respectively mean the height and width of the search block before division.

[0016] As shown in Fig. 1, the search block is divided into, for example, five division patterns (fourths, horizontal halves, vertical halves, horizontal thirds, and vertical thirds) in the recursive process. Although only five patterns are shown in Fig. 1, five or more division patterns may be prepared in advance.

[0017] In this embodiment, when dividing a search block to generate an encoding unit, the number of division patterns shown in Fig. 1 is reduced, and the division pattern candidate group is reduced to a smaller number of division patterns, and predicted pixels are generated and transmitted. For example, when an edge exists in a direction close to horizontal in the search block, only horizontal 2-division and horizontal 3-division division patterns are adopted to reduce the amount of encoding processing.

[0018] <Concept of coding unit> 2 is a diagram showing the coding blocks after the recursive block division process is completed. Each block after the recursive block division process is completed is a block called a coding unit.

[0019] As described above, a coding block is divided into a plurality of blocks by recursive processing. The division form at this time is the division pattern shown in FIG. 1. The coding block is repeatedly divided until a block size with a small rate distortion cost (RD cost: Rate Distortion Cost) is finally obtained. The small block obtained after the block division process for the coding block to be coded is the coding unit. In the conventional example, when dividing a coding block, the coding block is divided into all division patterns (FIG. 1) prepared in advance, and the division pattern with the smallest rate distortion cost is determined. On the other hand, in this embodiment, the number of division patterns to be adopted is limited based on the property of the block (for example, the direction of the edge), and the division pattern with the smallest rate distortion cost is determined among them.

[0020] <Image processing system configuration example> 3A is a diagram showing an example of a schematic configuration of an image processing system 10 according to this embodiment. The image processing system 10 includes an image encoding device 100 and an image decoding device 200, which are connected via a transmission path 300.

[0021] The image coding device 100 is configured to generate coded data by coding an input image signal. The image decoding device 200 is configured to generate an output image signal by decoding the coded data. Here, the coded data is transmitted from the image coding device 100 to the image decoding device 200 via a transmission path 300. The transmission path 300 is a communication path such as the Internet. The coded data may be stored in a storage medium and then provided from the image coding device 100 to the image decoding device 200.

[0022] Moreover, the image encoding device 100 and the image decoding device 200 can be configured by a computer. Fig. 3B is a diagram showing an example of the internal configuration of the computer that configures the image encoding device 100. The image encoding device 100 includes, for example, a processor 101, a storage device 102, an input device 103, an output device 104, and a communication device 105.

[0023] The processor 101 reads the encoding program according to this embodiment from the storage device 102 that holds the encoding program, and develops the encoding program in an internal memory (not shown) to generate an encoding processing unit 1011. The functional blocks of the encoding processing unit 1011 are as shown in FIG. 4 and will be described later.

[0024] The input device 103 is constituted by, for example, a keyboard, a mouse, a switch, and the like, and is used, for example, when a user inputs instructions to the image encoding device 100 or inputs video data to be encoded.

[0025] The output device 104 is composed of a display device, a printer, or the like, and displays, for example, the results of the encoding process (rate distortion cost, compression ratio, transfer rate, etc. during the process) on a display screen. The communication device 105 transmits the encoded data to the image decoding device 200 via a transmission path 300 under the control of the processor 101 .

[0026] <Example of internal configuration of encoding processing unit 1011> Fig. 4 is a block diagram showing an example of the internal functional configuration of the encoding processing unit 1011 of the image encoding device 100. Note that when the image encoding device 100 is configured by various hardware circuits, rather than a software program executed by a computer, Fig. 4 becomes a functional block diagram of the image encoding device 100.

[0027] The encoding processing unit 1011 (image encoding device 100) includes an inter prediction unit 111, an division pattern candidate group output unit 112, a subtractor 121, an adder 122, a transform / quantization unit 131, an inverse transform / inverse quantization unit 132, an encoding unit 140, an in-loop filter processing unit 150, a frame buffer 160, and a block division unit 170, and processes an input image signal in units of encoding blocks, and outputs encoded data. The inter prediction unit 111 is configured to generate predicted pixels corresponding to each pixel of the search block by inter prediction (inter-frame prediction).

[0028] The inter prediction unit 111 identifies a reference block included in the reference frame by comparing a frame to which the search block belongs (hereinafter, a target frame) with a reference frame stored in the frame buffer 160, and determines a corresponding motion vector (MV). The inter prediction unit 111 also generates a predicted pixel for each search block based on the reference block and the motion vector. The inter prediction unit 111 outputs the predicted pixel to the subtractor 121 and the adder 122.

[0029] The division pattern candidate group output unit 112 outputs predicted pixels corresponding to the search block generated by intra prediction (intraframe prediction) to the subtractor 121 and the adder 122, and outputs information on the division pattern candidate group to the block division unit 170. The division pattern candidate group output unit 112 uses intra prediction information to determine the exclusion of a division pattern that is estimated to be obviously inefficient. That is, in this embodiment, the number of division patterns is limited (reduced) by performing intra prediction. However, when it is determined that intra prediction is not performed for the block to be divided (search block), the number of division patterns for the block is not reduced. Therefore, when intra prediction and inter prediction are performed for the search block, or when it is determined that only intra prediction is to be performed, the number of division patterns can be limited (the division pattern candidate group is determined). The division pattern determined by the division pattern candidate group output unit 112 is estimated to have good coding efficiency. For this reason, the block divided by that division pattern is supplied to both the inter prediction unit 111 and the division pattern candidate group output unit 112, and inter prediction processing and intra prediction processing are performed. Then, finally, an efficient prediction mode is adopted for the block.

[0030] The division pattern candidate group output unit 112 outputs, as a division pattern candidate group, a division pattern that is as small as possible in number compared to all division patterns (for example, the five patterns shown in FIG. 1) and has a small rate-distortion cost. In general, in block division, if regions with different properties (regions with different average pixel value variance, edge strength, correlation between pixel position and pixel value, etc., such as foreground and background regions, or regions with different subjects, etc., often have edges at the boundaries between regions with different properties) that are mixed in a search block can be divided, the rate-distortion cost becomes small. Therefore, in this embodiment (Examples 1 and 2 described later), a division pattern that divides regions with different properties is generated as a division pattern candidate group, thereby reducing the amount of coding processing. The subtractor 121 is configured to subtract the predicted pixel from the input image signal to generate a prediction residual signal, and output the prediction residual signal to the transformation and quantization unit 131 .

[0031] The adder 122 is configured to add the predicted pixel to the prediction residual signal output from the inverse transform / inverse quantization unit 132 to generate a pre-filtered decoded signal, and output the pre-filtered decoded signal to the split pattern candidate group output unit 112 and the in-loop filter processing unit 150.

[0032] The transform / quantization unit 131 is configured to perform a transform process and a quantization process on the prediction residual signal output from the subtractor 121 to generate a quantized level value, and output the quantized level value to the inverse transform / inverse quantization unit 132 and the encoding unit 140. The transform process is a process for transforming the prediction residual signal into a frequency component signal. In this transform process, a basis pattern (transformation matrix) corresponding to a discrete cosine transform (DCT) may be used, or a basis pattern (transformation matrix) corresponding to a discrete sine transform (DST) may be used. The transform process does not have to be performed.

[0033] The inverse transform / inverse quantization unit 132 is configured to perform inverse quantization processing and inverse transform processing (for example, IDCT: Inverse Discrete Cosine Transform) on the quantized level value to generate a prediction residual signal and output it to the adder 122 .

[0034] The encoding unit 140 is configured to encode the quantized level value output from the transform / quantization unit 131 and output the encoded data. The encoding is entropy encoding that assigns code words of different lengths based on the occurrence probability of the quantized level value. The encoding unit 140 is also configured to encode control data used in the decoding process and output the encoded data. Here, the control data is additional information for the image decoding device 200 to specify the block division mode, prediction mode, motion information, and the like. Although not shown, these are output from each functional block of the image encoding device 100. For example, information on the division pattern of the search block is output from the block division unit 170. The intra prediction mode is output from the intra prediction unit 1121 described later. The inter prediction mode and the motion information are output from the inter prediction unit 111. A single control data is specified from a plurality of candidates of control data output from each functional block by the processor 101 or a control unit not shown. The size of each encoding unit is also specified by the encoding unit 140. As a method of specification, for example, control data that minimizes the rate distortion cost can be selected. Information on the size of the search block and the prediction mode finally determined by the encoding unit 140 is fed back to the block division unit 170 .

[0035] The in-loop filter processing unit 150 is configured to filter the unfiltered decoded signal, generate a filtered decoded signal (reconstructed image signal or reference frame), and output it to the frame buffer 160. The filtering process includes deblocking filtering that reduces distortion occurring at the boundary between search blocks, prediction blocks, or transform blocks, and adaptive loop filtering that switches filters based on filter coefficients, filter selection information, local properties of the image pattern, and the like transmitted from the image encoding device 100. The frame buffer 160 is configured to accumulate the filtered decoded signal and output it to the inter prediction unit 111 as a reference frame.

[0036] The block division unit 170 is configured to divide the search block into blocks using a feasible division pattern included in the division pattern candidate group generated by the division pattern candidate group output unit, and output the blocks to the inter prediction unit 111 and the division pattern candidate group output unit 112. The block division may be performed separately for the luminance signal and the color difference signal. In this embodiment, the division patterns are the five shown in FIG. 1: 4 division, horizontal 2 division, vertical 2 division, horizontal 3 division, and vertical 3 division, but other division patterns may be added. For example, the search block may be divided into four equal parts horizontally or vertically. An embodiment of the internal configuration and operation of the division pattern candidate group output unit 112 will be described below.

[0037] (2) Examples [Example 1] <Internal configuration example> 5 is a diagram showing an example of the internal configuration of the division pattern candidate group output unit 112 according to the embodiment 1. The embodiment 1 relates to a minimum functional configuration of the division pattern candidate group output unit 112. The division pattern candidate set output unit 112 according to the first embodiment includes an intra prediction unit 1121 and a division pattern candidate set generation unit 1122.

[0038] The intra prediction unit 1121 is configured to generate a predicted pixel corresponding to a search block by intra prediction (intra-frame prediction). Specifically, the intra prediction unit 1121 identifies a reference block (see FIG. 7) included in a target frame, and generates a predicted pixel for each search block based on the reference block. As described in Non-Patent Document 1, there are three modes for generating a predicted pixel: planar prediction, DC prediction, and angular prediction. In angular prediction, pixels of a reference block are referenced according to a predefined prediction direction to generate a predicted pixel. Note that when the search block is rectangular, wide angular prediction may be used instead of angular prediction.

[0039] FIG. 6 is a diagram showing an example of prediction directions of angular prediction and wide angular prediction. The solid arrow in FIG. 6 indicates the prediction direction of angular prediction. In wide angular prediction, a part of the prediction direction of angular prediction is replaced with a part of the prediction direction of the dashed arrow in FIG. 6. The combination of prediction directions to be replaced is determined by the height and width of the search block. Here, the mode information including the prediction direction used to generate the predicted pixel is called the intra prediction mode. Note that prediction directions other than those in FIG. 6 may be used in angular prediction and wide angular prediction. In addition, hereinafter, the angle of the prediction direction will be described assuming that the horizontal right direction from the center of the block in FIG. 6 is 0°.

[0040] The split pattern candidate group generation unit 1122 generates a split pattern candidate group that is estimated to have a small rate-distortion cost based on the pixel values ​​of the search block, the predicted pixel with the smallest prediction error generated by the intra prediction unit 1121, and the intra prediction mode corresponding to that predicted pixel, and outputs the generated split pattern candidate group to the block split unit 170.

[0041] <About reference blocks> FIG. 7A is a diagram showing the positional relationship between a search block 701 and a reference block 702. FIG. 7B and FIG. 7C are diagrams showing examples of pixels of a reference block 702 used when predicting pixels constituting the search block 701. The above-mentioned intra prediction unit 1121 generates predicted pixels for the target search block 701 based on the reference block 702. As shown in FIG. 7A, the reference block 702 can be set to, for example, a block adjacent to the search block 701 and including pixels that precede the pixels of the search block 701 in time. However, this is just an example, and the reference block 702 may be set to include pixels that are formed later in time.

[0042] As shown in FIG. 7B, for pixel SB1 of the search block, a predicted value is generated from, for example, a weighted average of pixels RF1, RF3, RF4, and RF5 of the reference block 702. Also, as shown in FIG. 7C, for pixel SB2 of the search block, a predicted value is generated from, for example, a weighted average of pixels RF2, RF3, RF4, and RF5 of the reference block 702. By performing such prediction, in DC prediction and planar prediction, block distortion can be reduced in flat parts of an image. Note that the same applies to the reference block in Example 2 described later.

[0043] <Details of division pattern candidate group generation process and block division process> Fig. 8 is a flowchart for explaining details of the division pattern candidate group generation process and the block division process according to the embodiment 1. In the following explanation, the intra prediction unit 1121, the division pattern candidate group generation unit 1122, etc. are the operating subjects of each step of the flowchart in Fig. 8. However, since these can be functional processing units operated by the processor 101 as programs, the operating subject of each step may be read as the processor 101.

[0044] (i) S801 The intra prediction unit 1121 obtains the coding blocks (see FIG. 2) from the block division unit 170.

[0045] (ii) S802 The intra prediction unit 1121 generates predicted pixels by intra prediction for the coded block acquired in S801 or the search block (S807) obtained by dividing the coded block into blocks by recursive processing.

[0046] (iii)S803 The split pattern candidate set generation unit 1122 calculates the rate-distortion cost based on the generated predicted pixels. Note that the encoding unit 140 may calculate the rate-distortion cost, and the split pattern candidate set generation unit 1122 may obtain information on the rate-distortion cost from the encoding unit 140.

[0047] (iv) S804 The division pattern candidate group generating unit 1122 judges whether the size of the search block to be processed is equal to or smaller than a preset value. If the size of the search block is greater than a certain value (No in S804), the process proceeds to S805. On the other hand, if the size of the search block is equal to or smaller than a certain value (Yes in S804), the division pattern candidate group generating unit 1122 judges that the search block (or coding block) will not be divided any further (non-division), and the division pattern candidate group generating process ends.

[0048] If the processing target is a coding block (initial stage), the process proceeds to S805. At this time, since the coding block is not yet divided, the coding block may be divided by a predetermined fixed division method (for example, into four parts).

[0049] (v)S805 The split pattern candidate group generating unit 1122 generates a split pattern candidate group using the intra prediction mode with the smallest prediction error and the prediction error from the pixel value of the search block, the predicted pixel, and information on the intra prediction mode used to generate the predicted pixel, and provides the split pattern candidate group to the block division unit 170. Note that the prediction error may be any of the rate distortion cost, squared error, SAD (Sum of Absolute Difference), and SATD (Sum of Absolute Transformed Difference) divided by the number of pixels in the search block. Below, the method will be described according to the intra prediction mode with the smallest prediction error.

[0050] (v-1) When the prediction mode is Planar prediction or DC prediction The splitting pattern candidate group generating unit 1122 does not generate information on the splitting pattern candidate group, but determines that the search block (or the coding block) is not to be split any further (non-split), and outputs "non-split" as information on the splitting pattern candidate group to the block splitting unit 170. When the prediction error of the planar prediction or DC prediction is small, the pixel values ​​of the search block are considered to be flat. This is because there is no mixture of areas with different properties in the search block, and there is a high possibility that the rate-distortion cost will not be improved even if the block is split any further.

[0051] (v-2) Angular prediction, Wide Angular prediction The division pattern candidate set generation unit 1122 outputs, as a division pattern candidate set, division patterns that perform block division in the same direction as the prediction direction.

[0052] Specifically, for example, when the angle of the prediction direction is −45° to 45° or 135° to 225°, the split pattern candidate group generating unit 1122 outputs a split pattern for horizontal splitting to the block splitting unit 170 as a split pattern candidate group. The split pattern for horizontal splitting is, for example, quartering, horizontal bisection, and horizontal trisection (see FIG. 1). Also, for example, when the angle of the prediction direction is 45° to 135° or 225° to 315°, the split pattern candidate group generating unit 1122 outputs a split pattern for vertical splitting. The split pattern for vertical splitting is, for example, quartering, vertical bisection, and vertical trisection (see FIG. 1). Furthermore, for example, when the prediction direction is any of 45°, 135°, 225°, and 315°, the split pattern candidate group generating unit 1122 may output all the split patterns.

[0053] FIG. 9 is a diagram showing the prediction direction and predicted pixel value of intra prediction, and is a diagram for explaining the basis for generating a split pattern candidate group. As shown in FIG. 9, at pixel positions aligned in the prediction direction, the pixel values ​​of the predicted pixels are almost equal, so the edge of the predicted pixel is often generated along the prediction direction (the direction of the arrow in FIG. 9). From this, when the prediction error is small in a prediction direction with angular prediction or wide angular prediction, the search block 701 is likely to have an edge according to the prediction direction. Therefore, it can be seen that it is efficient to output a split pattern that splits blocks in the same direction as the prediction direction as a split pattern candidate group. Based on this, the split pattern candidate group generating unit 1122 can generate only split patterns that are expected to split blocks along the edge direction, that is, to split (separate) areas with different properties, as a split pattern candidate group.

[0054] (v-3) Note that in both cases (v-1) and (v-2), it is assumed that the prediction error is small. Therefore, (v-1) or (v-2) may be executed only when the prediction error is small, and in other cases, all split patterns may be output as a split pattern candidate group. In this case, the prediction error may be small by using a predetermined threshold a1 (in the case of planar prediction or DC prediction) or a2 (in the case of angular prediction or wide angular prediction), and executing (v-1) only when the prediction error is equal to or less than the threshold a1, and executing (v-2) only when the prediction error is equal to or less than the threshold a2.

[0055] (vi)S806 The block division unit 170 judges whether the information of the split pattern candidate group generated in S805 is "non-split". If the information of the split pattern candidate group is "non-split" (Yes in S806), the split pattern candidate group generation process ends. On the other hand, if the information of the split pattern candidate group is not "non-split" and includes information of a split pattern (No in S806), the process proceeds to S807.

[0056] (vii) S807 The block division unit 170 divides the search block using all feasible division patterns (division patterns generated in S805) from the division pattern candidate group, and provides information on the divided blocks to the intra prediction unit 1121. Note that for all feasible division patterns, the height of the search block must not be smaller than a predefined length, and the width must not be smaller than a predefined length.

[0057] After the repeated block division process is completed, the height and width of each coding unit are determined so as to minimize the total rate-distortion cost using the rate-distortion costs of all candidate search blocks.

[0058] [Example 2] <Internal configuration example> 10 is a diagram showing an example of the internal configuration of the division pattern candidate group output unit 112 according to the embodiment 2. The embodiment 2 relates to a maximum functional configuration of the division pattern candidate group output unit 112.

[0059] The split pattern candidate group output unit 112 according to the second embodiment includes an intra prediction unit 1121, a split pattern candidate group generation unit 1122, a counting unit 1123, and an occupancy rate derivation unit 1124. The intra prediction unit 1121 is similar to that of the first embodiment. Therefore, hereinafter, only the counting unit 1123 and the occupancy rate derivation unit 1124, and the points of the split pattern candidate group generation unit 1122 that are different from those of the first embodiment will be described.

[0060] The counting unit 1123 calculates a prediction error for each small region obtained by further dividing the search block from the predicted pixels generated by the intra prediction unit 1121. Here, calculating a prediction error for each small region means, for example, dividing the search block into 4×4 pixel groups (small regions) and calculating an error for each small region divided from the predicted pixels. The division of the small regions may be other than 4×4 pixels, for example, 2×2 pixels. After calculating the prediction error for each small region, the counting unit 1123 counts up the number of two types of regions, that is, small regions with errors larger than a predetermined threshold value and small regions with errors smaller than a predetermined threshold value, in each region after division into each division pattern. The number of these two types of regions is called a number group. Then, the counting unit 1123 outputs information on the number group of each region after division into each division pattern to the occupancy rate derivation unit 1124.

[0061] The occupancy rate derivation unit 1124 calculates the occupancy rate for each region after division into each division pattern from the information on the number of each region, and outputs a maximum value group. Here, the occupancy rate means the ratio of the number of small regions whose error is larger or smaller than a predetermined threshold to the total number of small regions in each divided region. Also, the maximum value group means a collection of the larger value (maximum value) of two types of occupancy rates (the occupancy rate of regions whose error is larger than the threshold and the occupancy rate of regions whose error is smaller than the threshold) from each divided region. The division pattern candidate set generating unit 1122 generates a division pattern candidate set from the maximum value set output by the occupation rate derivation unit 1124 .

[0062] <Details of division pattern candidate group generation process and block division process> Fig. 11 is a flowchart for explaining details of the division pattern candidate group generation process and the block division process according to the embodiment 2. In the following explanation, the intra prediction unit 1121, the division pattern candidate group generation unit 1122, etc. are the operating subjects of each step of the flowchart in Fig. 10, but since these are functional processing units operated by the processor 101 as programs, the operating subject of each step may be read as the processor 101.

[0063] (i) S1101 The intra prediction unit 1121 obtains the coding blocks (see FIG. 2) from the block division unit 170.

[0064] (ii) S1102 The intra prediction unit 1121 generates predicted pixels by intra prediction, inter prediction, or both for the coded block acquired in S1101 or the search block (S1110) obtained by dividing the coded block into blocks by recursive processing.

[0065] (iii) S1103 The split pattern candidate set generation unit 1122 calculates the rate-distortion cost based on the generated predicted pixels. Note that the encoding unit 140 may calculate the rate-distortion cost, and the split pattern candidate set generation unit 1122 may obtain information on the rate-distortion cost from the encoding unit 140.

[0066] (iv) S1104 The division pattern candidate group generating unit 1122 judges whether the size of the search block to be processed is equal to or smaller than a preset value. If the size of the search block is greater than the fixed value (No in S1104), the process proceeds to S1105. On the other hand, if the size of the search block is equal to or smaller than the fixed value (Yes in S1104), the division pattern candidate group generating unit 1122 judges that the search block (or coding block) will not be divided any further (non-division), and the division pattern candidate group generating process ends.

[0067] If the processing target is a coding block (initial stage), the process proceeds to S1105. At this time, since the coding block is not divided, the coding block may be divided by a predetermined division method (e.g., into four) unless it is determined that the coding block is not to be divided.

[0068] (v)S1105 The split pattern candidate set generation unit 1122 further divides the search block into small regions (for example, blocks of 2×2 pixels or blocks of 4×4 pixels). Then, the split pattern candidate set generation unit 1122 calculates an error between the search block and a predicted pixel generated in an intra prediction mode with the smallest prediction error for each small region. The error for each small region is used when generating a split pattern candidate set, which will be described later.

[0069] (vi)S1106 The counting unit 1123 receives the error value calculated for each small region from the division pattern candidate group generating unit 1122, and counts the number (number group) of small regions with large errors and small regions for each region after division of each division pattern (for example, the five division patterns in FIG. 1). Note that, for example, if the prediction error of a small region is equal to or less than a preset threshold b, it can be determined to be a small region with a small error, and if the prediction error of a small region is greater than the threshold b, it can be determined to be a small region with a large error. The counting unit 1123 supplies the count value of each region of each division pattern to the occupation rate derivation unit 1124 .

[0070] In the second embodiment, whether or not to output a division pattern is determined based on whether an area has a large or small prediction error determined using threshold value b, without using the average, variance, or maximum value of the prediction error of each area after direct block division. This is to prevent a large effect on the results when a very large prediction error occurs in a small number of pixels due to noise, etc.

[0071] (vii) S1107 The occupancy rate derivation unit 1124 obtains, for each region after the block division, two types of occupancy rates, that is, an occupancy rate of a small region with a large error (large error occupancy rate: occupancy rate 1) and an occupancy rate of a small region with a small error (small error occupancy rate: occupancy rate 2), from the number group, and a maximum value group of occupancies in each region after the block division (information on which of the large error occupancy rate and the small error occupancy rate is larger in each divided region).The occupancy rate derivation unit 1124 then provides the information on the maximum value group of occupancies in each divided region to the division pattern candidate group generation unit 1122.

[0072] (viii) S1108 Based on the two types of occupancy rates calculated in S1107, the division pattern candidate group generation unit 1122 outputs division patterns in which either small areas with large prediction errors or small areas occupy a large portion of each area after block division as a division pattern candidate group to the block division unit 170. Here, a division pattern in which either small areas with large errors or small areas occupy a large portion of each area can be, for example, a pattern in which the average value of the corresponding maximum value group (average value of the maximum occupancy rates of each area in the division pattern: if there are three areas in the division pattern, the larger occupancy rate of each area is added and the value is divided by 3) is equal to or greater than a predetermined threshold c.

[0073] FIG. 12 is a diagram showing whether or not the horizontal and vertical bisections are output as a bisection pattern candidate group when the threshold c=0.6 is set. For the search block 701, when the intra prediction mode providing the smallest prediction error is planar prediction or DC prediction, the region with a small prediction error has a flat change in pixel value. That is, a region 1201 in which the prediction error of a small region in the search block 701 is equal to or less than the threshold b is a flat region, and a region larger than the threshold b is not flat. In this case, the bisection pattern candidate group generating unit 1122 generates a bisection pattern such as the bisection pattern A in FIG. 12, in which the average of the maximum value group is equal to or greater than c, as a bisection pattern candidate group. This makes it possible to prevent the regions after block division from having different properties (flat and non-flat regions) from being mixed together, as in the bisection pattern B.

[0074] On the other hand, if the intra prediction mode providing the minimum prediction error is neither planar prediction nor DC prediction, the search block is considered to have a large variance of pixel values. In other words, if the intra prediction mode providing the minimum prediction error is angular prediction or wide angular prediction, as described in FIG. 9, in an area with a small prediction error (an area with a prediction error smaller than a threshold), the same pixel value is likely to continue along the prediction direction, but in an area with a large prediction error, this property does not exist. For this reason, it is considered that the properties of an area with a small prediction error are different from those of an area with a large prediction error. For example, as shown in FIG. 12, in the search block 701, it is possible to distinguish an area 1201 with a prediction error equal to or smaller than a threshold b from an area 1202 with a prediction error larger than the threshold b. Therefore, the splitting pattern candidate group generating unit 1122 generates a splitting pattern in which the average of the maximum value group is equal to or larger than a threshold c as a splitting pattern candidate group. This makes it possible to prevent areas with different properties from being mixed in each area after block splitting, as in the splitting pattern B shown in FIG. 12.

[0075] (ix)S1109 The block division unit 170 judges whether the information of the split pattern candidate group generated in S1108 is "non-split". If the information of the split pattern candidate group is "non-split" (Yes in S1109), the split pattern candidate group generation process ends. On the other hand, if the information of the split pattern candidate group is not "non-split" and includes information of a split pattern (No in S1109), the process proceeds to S1110.

[0076] (x)S1110 The block division unit 170 divides the search block using all feasible division patterns (division patterns generated in S1108) from the division pattern candidate group, and provides information on the divided blocks to the intra prediction unit 1121. Note that for all feasible division patterns, the height of the search block must not be smaller than a predefined length, and the width must not be smaller than a predefined length.

[0077] After the repeated block division process is completed, the height and width of each coding unit are determined so as to minimize the total rate-distortion cost using the rate-distortion costs of all candidate search blocks.

[0078] (3) Modifications (i) The thresholds a1, a2, and c used in the first and second embodiments may be functions that take either the quantization parameter or the height or width of the search block as input. For example, when determining the threshold a1, if a search block (when it is a small block of 16×16 pixels) is input, and it is considered that the possibility of dividing the block further is low, the threshold a1 may be changed (up or down) according to the size of the search block (function). The quantization parameter is a parameter that determines the quality of the image after decoding. In general, the larger the quantization parameter, the more likely it is that there will be large coding units. In other words, when the quantization parameter is large and the search block is small, it is expected that the rate distortion cost will not deteriorate even if the number of division patterns to be tried is reduced. In addition, the thresholds a1, a2, and c are parameters that increase or decrease the number of division patterns included in the division pattern candidate group depending on the magnitude of the thresholds. Therefore, the thresholds a1, a2, and c are functions that increase their values ​​when the quantization parameter is large or the width or height of the search block is small. By doing so, it is expected that the amount of coding processing can be further reduced without deteriorating the rate-distortion cost. Therefore, it is advantageous to make the thresholds a1, a2, and c functions using the quantization parameter and either the height or width of the search block as input.

[0079] The quantization parameter is a parameter that determines whether to prioritize image quality or the amount of coding (data size). When image quality is prioritized, the number of times block division is executed is increased so that the coding unit is often small. Therefore, it is expected that the amount of coding processing can be reduced more without deteriorating the rate distortion cost by changing the thresholds a1, a2, and c, which are parameters that affect the ease of block division, using the quantization parameter. For example, when it is expected that block division will be executed frequently, it is expected that the amount of coding processing can be reduced more without deteriorating the rate distortion cost by setting the thresholds a1, a2, and c to small values.

[0080] (ii) Either one of the methods according to the first embodiment and the second embodiment may be executed, or both may be executed. When both methods are executed, a division pattern belonging to either one of the division pattern candidate groups output by both methods may be output as a final division pattern candidate group, or a division pattern belonging to both may be output as a final division pattern candidate group. For example, when a predicted pixel of a search block is generated, if none of planar prediction, DC prediction, angular prediction, and wide angular prediction is executed for some reason, such as intra prediction being skipped, all division patterns may be output as a division pattern candidate group.

[0081] (iii) Instead of the output method of the split pattern candidate group described in the method according to the first and second embodiments, the split pattern candidate group may be output by machine learning using one or more of the pixel value of the search block, the predicted pixel, the intra prediction mode, the prediction error for each small region, and the maximum value group as input. Here, the machine learning may use, for example, a convolutional neural network or a LightGBM (Light Gradient Boosting Machine). As described above, each piece of information on the pixel value of the search block, the predicted pixel, the intra prediction mode, the prediction error for each small region, and the maximum value group includes information required to estimate a split mode with a small rate distortion cost. This is because the use of machine learning makes it possible to generate a split pattern candidate group including a split pattern with a small rate distortion cost.

[0082] (4) Summary (i) The image encoding device 100 according to this embodiment determines a candidate group of division patterns for a block to be processed based on pixel values ​​of the block to be processed (search block), values ​​of predicted pixels of the block to be processed, and a prediction error value calculated using information on intra-prediction mode. By doing so, it is possible to omit processing of division patterns that are not necessary for generating encoded data, and therefore it is possible to reduce the amount of encoding processing.

[0083] Specifically, the image coding device 100 holds information on a plurality of block division patterns (see FIG. 1) in the storage device 102. Then, based on the calculated prediction error value, the image coding device 100 limits the types of the plurality of block division patterns (five types in FIG. 1) to a group of division pattern candidates (for example, blocks divided only horizontally). In this way, the efficiency of the coding process is improved.

[0084] (ii) In the above-mentioned first and second embodiments, when the intra prediction mode (intra prediction mode with the smallest prediction error) used for encoding the block to be processed is planar prediction or DC prediction, the image encoding device 100 sets the information of the division pattern candidate group as non-split. This is because encoding the search block as is rather than further dividing the search block results in higher encoding efficiency. In other words, at this time (when the information of the division pattern candidate group is non-split), the image encoding device 100 does not determine a division pattern group for the block to be processed (search block), and encodes the search block as one processing unit.

[0085] When the intra prediction mode used to encode the block to be processed is planar prediction or DC prediction, the image encoding device 100 may further determine that the candidate split pattern group is not split when the prediction error of the block to be processed is equal to or smaller than a predetermined threshold (threshold a1).

[0086] (iii) In addition, in the first and second embodiments, when the intra prediction mode (the prediction error is smaller than the threshold value or the smallest intra prediction mode) used for encoding the target block is angular prediction or wide angular prediction, the image encoding device 100 determines, as a group of candidate division patterns, division patterns that perform division in a direction that includes more information on the prediction direction from the target block (search block) with respect to the reference block used for prediction. For example, when the angle of the prediction direction is from -45° to 45° or from 135° to 225°, the area divided in the horizontal direction includes a higher proportion of vectors in the prediction direction than the area divided in the vertical direction. Also, for example, when the angle of the prediction direction is from 45° to 135° or from 225° to 315°, the area divided in the vertical direction includes a higher proportion of vectors in the prediction direction than the area divided in the horizontal direction. In this way, the block division pattern candidates are determined so that the areas constituting the block division pattern include more information (vectors) on the prediction direction.

[0087] When the intra prediction mode used to encode the block to be processed is angular prediction or wide angular prediction, the image encoding device 100 may further determine, when the prediction error of the block to be processed is equal to or smaller than a predetermined threshold (threshold a2), a partitioning pattern that partitions in a direction that includes more prediction direction information as a candidate partitioning pattern group.

[0088] (iv) According to the second embodiment, the image encoding device 100 further divides the block to be processed (search block) into a plurality of small regions (e.g., 2×2 pixels or 4×4 pixels), and calculates prediction errors for each of the plurality of small regions from predicted pixels generated in an intra prediction mode used for encoding (an intra prediction mode in which the prediction error is smaller than or minimum than a threshold). The image encoding device 100 then counts the number of small regions whose prediction errors are equal to or greater than a first threshold (threshold b) and the number of small regions whose prediction errors are smaller than the first threshold for each divided region in the plurality of block division patterns, and determines a division pattern that occupies a large number of small regions whose prediction errors are equal to or greater than the first threshold and small regions whose prediction errors are smaller than the first threshold in each divided region as a group of division pattern candidates. Specifically, when determining a group of candidate partition patterns (when selecting a block partition pattern suitable for reducing the amount of coding processing from the multiple block partition patterns in FIG. 1), the image coding device 100 calculates, for each region in the block partition pattern, an occupancy rate 1 of a small region whose prediction error is equal to or greater than a first threshold (b) and an occupancy rate 2 of a small region whose prediction error is smaller than the first threshold, and generates information on a maximum occupancy rate group (maximum value group) by collecting the larger value of the occupancy rate 1 and the occupancy rate 2 in each region. Then, the image coding device 100 identifies, from the multiple block partition patterns, a block partition pattern in which the average value of the maximum occupancy calculated using the information on the maximum occupancy rate group (maximum value group) of each of the multiple block partition patterns (see FIG. 1) is equal to or greater than a predetermined second threshold (c). This makes it possible to accurately and efficiently separate regions with different properties (for example, a region with an edge and a region without an edge) in the search block.

[0089] (v) At least one of the thresholds used in the first and second embodiments (thresholds a1, a2, and c) can be expressed as a function of the quantization parameter and the height and width of the search block. In other words, at least one of the thresholds a1, a2, and c can be a function that increases when the quantization parameter is large or when the width or height of the search block is small. This makes it possible to reduce the amount of coding processing without deteriorating the rate-distortion cost.

[0090] (vi) The functions of the present embodiment and each example can also be realized by software program code. In this case, a storage medium on which the program code is recorded is provided to a system or device, and the computer (or CPU or MPU) of the system or device reads the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-mentioned embodiment, and the program code itself and the storage medium on which it is stored constitute the present disclosure. Examples of storage media for supplying such program code include flexible disks, CD-ROMs, DVD-ROMs, hard disks, optical disks, magneto-optical disks, CD-Rs, magnetic tapes, non-volatile memory cards, and ROMs.

[0091] Also, an operating system (OS) running on a computer may perform all or a part of the actual processing based on the instructions of the program code, and the functions of the above-mentioned embodiments may be realized by the processing. Furthermore, after the program code read from a storage medium is written into a memory on a computer, a CPU of the computer may perform all or a part of the actual processing based on the instructions of the program code, and the functions of the above-mentioned embodiments may be realized by the processing.

[0092] Furthermore, the program code of the software that realizes the functions of the embodiments and each example may be distributed via a network and stored in a storage means such as a hard disk or memory of the system or device, or in a storage medium such as a CD-RW or CD-R, so that when used, the computer (or CPU or MPU) of the system or device reads out and executes the program code stored in the storage means or storage medium.

[0093] The processes and techniques described herein are not inherently related to any particular device, and may be implemented by a combination of components. Various types of general-purpose devices may also be added. A dedicated device may be constructed to execute the functions of the present embodiment and each example. Various functions may also be formed by appropriately combining multiple components disclosed in the present embodiment and each example. For example, some components may be deleted from all the components shown in the embodiment and each example, or components across different examples may be appropriately combined.

[0094] In this disclosure, specific examples are described, but they are in all respects for the purpose of explanation (understanding the technology of the present disclosure) and not for the purpose of limitation. It is understood by those skilled in the art that there are many combinations of hardware, software, and firmware suitable for implementing the technology of the present disclosure. For example, the described software can be implemented in a wide range of program or script languages, such as assembler, C / C++, perl, Shell, PHP, Java (registered trademark), etc.

[0095] Furthermore, in the above-described embodiment, the control lines and information lines are those that are considered necessary for the explanation, and not all of the control lines and information lines in the product are necessarily shown. All of the components may be connected to each other.

[0096] In addition, other implementations of the present disclosure will become apparent to those skilled in the art from consideration of the present embodiments and examples. The specification and examples are exemplary only, with the scope and spirit of the present disclosure being indicated by the following claims. [Explanation of symbols]

[0097] 10 Image Processing System 100 Image encoding device 101 Processor 102 Storage Devices 103 Input Devices 104 Output Devices 105 Communication Devices 111 Inter Prediction Unit 112 Division pattern candidate group output unit 121 Subtractor 122 Adder 131 Transformation and Quantization Unit 132 Inverse transformation and inverse quantization section 140 Encoding section 150 In-loop filter processing section 160 Frame Buffer 170 Block division section 200 Image Decoding Device 300 Transmission Line 1011 Encoding processing unit 1121 Intra prediction unit 1122 Division pattern candidate group generation unit 1123 Counting Department 1124 Occupancy rate derivation part

Claims

1. An image encoding device that divides an input image into a plurality of blocks and encodes the input image on a block-by-block basis, a storage device that stores a program for encoding the input image in units of blocks; a processor that reads the program from the storage device and encodes the input image; The processor, A process of generating a predicted pixel of a target block based on pixels adjacent to the target block and an intra prediction mode; calculating a prediction error using pixel values ​​of the current block, values ​​of the predicted pixels, and information on the intra prediction mode; determining a candidate group of division patterns for the target block based on the value of the prediction error; An image encoding device that executes the above.

2. In claim 1, the storage device holds information on a plurality of block division patterns; The processor limits the types of the plurality of block division patterns based on the value of the prediction error, and determines a number of block division patterns that is smaller than the number of the stored block division patterns as the group of candidate division patterns.

3. In claim 1, The processor sets the information of the partitioning pattern candidate group to non-partition when the intra prediction mode used for encoding the current block is planar prediction or DC prediction.

4. In claim 3, When the information of the split pattern candidate group indicates non-splitting, the processor does not determine the split pattern candidate group for the block to be processed, and encodes the block to be processed as a single processing unit.

5. In claim 3, The processor further sets the group of partitioning pattern candidates to non-partition when a prediction error of the block to be processed is equal to or smaller than a first threshold.

6. In claim 2, When the intra prediction mode used to encode the target block is angular prediction or wide angular prediction, the processor determines, as the candidate group of partitioning patterns, partitioning patterns that partition the target block in a direction that includes more information on the prediction direction from the target block to a reference block used for prediction.

7. In claim 6, The processor further determines, when a prediction error of the block to be processed is equal to or less than a second threshold, a partitioning pattern that performs partitioning in a direction that includes more information of the prediction direction as the partitioning pattern candidate group.

8. In claim 2, The processor further comprises: A process of further dividing the target block into a plurality of small regions; A process of calculating a prediction error for each of the plurality of small regions from a predicted pixel generated in the intra prediction mode used for encoding the target block; counting the number of the small regions whose prediction error is equal to or greater than a third threshold and the number of the small regions whose prediction error is smaller than the third threshold for each divided region in the plurality of block division patterns; a process of determining, as the group of candidate division patterns, a division pattern that occupies a large proportion of the small regions in which the prediction error in each of the divided regions is equal to or greater than the third threshold value and the small regions in which the prediction error is smaller than the third threshold value; An image encoding device that executes the above.

9. In claim 8, The processor, In the process of determining the division pattern candidate group, A process of calculating an occupancy rate 1 of the small area having the prediction error equal to or greater than the third threshold and an occupancy rate 2 of the small area having the prediction error smaller than the third threshold for each divided area in the plurality of block division patterns; a process of collecting the larger value of the occupancy rate 1 and the occupancy rate 2 in each of the divided regions as a maximum occupancy rate group; A process of calculating an average value of maximum occupancy rates by using the maximum occupancy rate groups of each of the plurality of block division patterns; a process of identifying a block division pattern from the plurality of block division patterns, the block division pattern having the average value equal to or greater than a fourth threshold value; An image encoding device that executes the above.

10. In claim 5, An image encoding device, wherein the first threshold is expressed as a function of a quantization parameter and the height and width of the block to be processed.

11. In claim 7, An image encoding device, wherein the second threshold is expressed as a function of a quantization parameter and the height and width of the block to be processed.

12. In claim 9, An image encoding device, wherein the fourth threshold is expressed as a function of a quantization parameter and the height and width of the block to be processed.

13. An image coding method for dividing an input image into a plurality of blocks and coding the input image on a block-by-block basis, comprising the steps of: A processor that encodes the input image generates a predicted pixel of the current block based on pixels adjacent to the current block and an intra prediction mode; The processor calculates a prediction error using pixel values ​​of the current block, values ​​of the predicted pixels, and information on the intra prediction mode; determining a candidate group of division patterns for the processing target block based on the value of the prediction error; An image encoding method comprising:

14. A program for causing a computer to divide an input image into a plurality of blocks and execute an encoding process on a block-by-block basis, The encoding process includes: generating a predicted pixel of a block to be processed based on pixels adjacent to the block to be processed and an intra prediction mode; calculating a prediction error using pixel values ​​of the current block, values ​​of the predicted pixels, and information on the intra prediction mode; determining a candidate group of division patterns for the target block based on the value of the prediction error; Including, the program.