Image decoding device, image decoding method, and image decoding program
By employing recursive block division with boundary restrictions, the method addresses inefficiencies in image encoding and decoding by ensuring appropriate block sizes and shapes, particularly at screen edges, thereby enhancing encoding efficiency.
Patent Information
- Application Number
- JP2024172479
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-11-30
- Filing Date
- 2024-10-01
- Publication Date
- 2024-12-19
- Estimated Expiration
- 2039-10-01
AI Technical Summary
Existing image encoding and decoding methods suffer from decreased efficiency due to inappropriate block sizes and shapes, particularly at the edges of the screen, leading to inefficiencies in encoding and decoding processes.
The method involves recursive block division, where blocks are divided into four, two, or three parts, with restrictions on division when blocks exceed picture boundaries to ensure appropriate block shapes and sizes, improving encoding efficiency.
This approach enhances encoding efficiency by ensuring blocks are divided suitably, reducing the need for encoding small pixel changes and minimizing the amount of code required, thereby improving overall encoding efficiency.
Smart Images

Figure 2024177293000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a technique for encoding and decoding an image in units of divided blocks. [Background technology]
[0002] In encoding and decoding an image, an image is divided into blocks, which are a set of a predetermined number of pixels, and the blocks are Processing is done in units of locks. In that case, by dividing it into appropriate blocks, The efficiency of prediction, inter-prediction, orthogonal transformation, entropy coding, etc. is improved, resulting in This improves the encoding efficiency. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Special Publication No. 2015-526008 [Non-patent literature]
[0004] [Non-Patent Document 1] JVET, Versatile Video Coding (Draft 2), July 2018 Summary of the Invention [Problem to be solved by the invention]
[0005] If the blocks are not divided into appropriate sizes and shapes, the coding efficiency will decrease. At the edge of a screen, blocks containing pixels beyond the picture boundary are of an inappropriate size and shape. This resulted in a decrease in coding efficiency.
[0006] The present invention has been made in view of the above circumstances, and its object is to provide an image encoding and decoding method. To provide a technique for improving coding efficiency by dividing a signal into blocks suitable for coding. is located. [Means for solving the problem]
[0007] In one aspect of the present invention for solving the above problem, the block division unit Divide the elephant block into 4 halves horizontally and vertically to generate 4 blocks. The division part and the target block in the recursive division are divided into two or three horizontally or vertically. and a 2-3 division unit for dividing the 2-3 blocks to generate two or three blocks, the 2-3 division unit comprising: If the target block is divided horizontally, the divided target block is on the picture boundary. If it exceeds the right side, the target block is prohibited from being divided horizontally. If the vertical division were to occur, the divided target block would exceed the bottom edge of the picture boundary. In this case, dividing the target block vertically is prohibited. Effect of the Invention
[0008] According to the present invention, block division suitable for encoding and decoding of an image is possible, and encoding Efficiency can be improved. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram of an image encoding device according to a first embodiment. [Diagram 2] FIG. 1 is a block diagram of an image decoding device according to a first embodiment. [Diagram 3] 11 is a flowchart illustrating division into tree blocks and division within tree blocks. [Figure 4] FIG. 13 is a diagram showing how an input image is divided into tree blocks. [Diagram 5]FIG. 1 is a diagram illustrating a z-scan. [Figure 6] FIG. 13 is a diagram illustrating division of a tree block. [Figure 7] 13 is a flowchart illustrating a process for each divided block when a tree block is divided into four. [Figure 8] 13 is a flowchart illustrating a process for each divided block when a tree block is divided into two or three. [Figure 9] FIG. 13 is a diagram showing the relationship between tree blocks and picture boundaries. [Figure 10] FIG. 2 is a diagram showing the relationship between picture boundaries and pixels. [Figure 11] 4 is a flowchart illustrating block division according to the first embodiment. [Figure 12] FIG. 2 is a diagram showing block division in the first embodiment. [Figure 13] FIG. 2 is a diagram showing syntax relating to block division in the first embodiment. [Figure 14] 13 is a flowchart illustrating block division according to the second embodiment. [Figure 15] FIG. 11 is a diagram illustrating block division according to the second embodiment. [Figure 16] 13 is a flowchart illustrating block division according to the third embodiment. [Figure 17] FIG. 13 is a diagram illustrating block division according to the third embodiment. [Figure 18] 13 is a flowchart illustrating block division according to the third embodiment. [Figure 19] FIG. 13 is a diagram illustrating block division in the fourth embodiment. [Figure 20] 13 is a flowchart illustrating block division according to the fourth embodiment. [Figure 21] FIG. 13 is a diagram illustrating block division in the fifth embodiment. [Figure 22] FIG. 2 is a diagram illustrating an example of a hardware configuration of a coding / decoding device according to a first embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] The embodiment of the present invention provides a technique for encoding and decoding an image in units of divided blocks. Provide. (First embodiment) Regarding the image encoding device 100 and the image decoding device 200 according to the first embodiment of the present invention, In the first embodiment, when a block is divided into two or three, Limit block splitting.
[0011] FIG. 1 is a block diagram of an image coding device 100 according to a first embodiment. It only shows the data flow related to the image signal, and does not include image information such as motion vectors and prediction modes. The flow of data related to additional information other than the signal is not shown. At least one screen's worth of image signal is input.
[0012] The block division unit 101 divides an image into blocks to be coded, which are units of coding processing. , the image signal in the block to be coded is supplied to the residual signal generator 103. In order to evaluate the degree of coincidence of the predicted image, the division unit 101 divides the image signal of the block to be coded into The predicted image is supplied to the predicted image generating unit 102.
[0013] The block division unit 101 recursively divides an image into rectangles of a predetermined size, and divides the blocks to be coded. The block division unit 101 divides the target block in the recursive division into four. The 4-part division generates 4 blocks by dividing the target block into 2 parts in the recursive division. and a 2-3 division part which divides the data into 3 or 4 to generate 2 or 3 blocks. The detailed operation of the dividing portion 101 will be described later.
[0014] The predicted image generating unit 102 receives the image signal of the block to be coded from the block dividing unit 101 and , and a decoded image signal is supplied from the decoded image memory 108. Using the signal, intra prediction (intra-picture prediction) or inter prediction ( In intra prediction, the coding target block is coded by using the inter-frame prediction (inter-frame prediction) to generate a predicted image signal. The coded blocks adjacent to the coding target block in the same picture (coding picture) The image signal of the block is supplied from the decoded image memory 108 to the predicted image generating unit 102 . The predicted image generating unit 102 receives this image signal and the block division unit 101. A prediction image signal is generated using the image signal of the block to be coded. , a coded picture (reference picture) that is chronologically before or after the coding picture The image signal is supplied from the decoded image memory 108 to the predicted image generating unit 102. The predicted image generating unit 102 receives the image signal and the coding pair supplied from the block dividing unit 101. The degree of match is evaluated by block matching, etc., and the motion is calculated. The predicted image generating unit 102 calculates a motion vector from the reference image based on the motion vector. The predicted image generator 102 performs compensation on the thus generated predicted image signal. The prediction image signal is supplied to a residual signal generating unit 103 .
[0015] The residual signal generator 103 receives the image signal to be coded and the predicted image generated by the predictive image generator 102. The prediction signal is subtracted from the residual signal to generate a residual signal, which is supplied to the orthogonal transform and quantization unit 104 .
[0016] The orthogonal transform and quantization unit 104 performs orthogonal transformation on the residual signal supplied from the residual signal generation unit 103. The orthogonal transform and quantization unit 104 converts the orthogonally transformed and quantized residual signal into a code. The resulting signal is supplied to the inverse quantization / inverse orthogonal transformation unit 105 and the inverse quantization / inverse orthogonal transformation unit 106.
[0017] The encoding unit 105 receives the orthogonally transformed and quantized signal supplied from the orthogonal transform and quantization unit 104. The encoding unit 105 generates an encoded bit stream corresponding to the residual signal. Regarding additional information such as motion vectors, prediction modes, and block division information provided by the component elements, Then, the encoding unit 105 generates a corresponding encoded bit stream. The bitstream is output from the image coding device 100.
[0018] The inverse quantization and inverse orthogonal transformation unit 106 converts the orthogonal transformation signal supplied from the orthogonal transformation and quantization unit 104 into an inverse quantization signal. The quantized residual signal is inverse quantized and inverse orthogonally transformed to obtain the residual signal. The cross conversion unit 106 supplies the residual signal to a decoded image signal superimposition unit 107 .
[0019] The decoded image signal superimposing unit 107 superimposes the predicted image signal generated by the predicted image generating unit 102. A decoded image is generated by superimposing the residual signal obtained by the inverse quantization and inverse orthogonal transformation unit 106. The decoded image signal superimposing unit 107 stores the decoded image in the image memory 108. The image is then filtered to reduce block distortion and other artifacts caused by the decoding process. It may be stored in 8.
[0020] FIG. 2 is a block diagram of an image decoding device 200 according to the first embodiment. It only shows the data flow related to the signal, and image signals such as motion vectors and prediction modes The flow of data related to additional information other than the above is not shown. The encoded bitstream is input.
[0021] The decoding unit 201 decodes the supplied coded bit stream and performs orthogonal transformation and quantization. The decoding unit 201 supplies the motion vector-encoded residual signal to the block division unit 202. Additional information such as vector, prediction mode, and block division information is supplied to each component. It is used for processing the corresponding information.
[0022] The block division unit 202 divides the block to be decoded based on the decoded block division information. The shape of the determined block to be decoded is determined, and the orthogonally transformed and quantized residual signal is inversely transformed. The resulting signal is supplied to the quantization and inverse orthogonal transformation unit 203 .
[0023] The block division unit 202 divides a block of a predetermined size based on the decoded block division information. The block division unit 202 recursively divides an image into rectangles to generate blocks to be decoded. is a 4-part division part that divides the target block into 4 parts in the recursive division to generate 4 blocks. ,The target block in the recursive partition is divided into two or three blocks. The detailed operation of the block division unit 202 will be described later. do.
[0024] The inverse quantization and inverse orthogonal transformation unit 203 inversely quantizes the orthogonally transformed and quantized residual signal. The residual signal is then supplied to the decoded image signal superimposition unit 205.
[0025] The predicted image generating unit 204 generates a predicted image from the decoded image signal supplied from the decoded image memory 206. An image signal is generated and supplied to a decoded image signal superimposing unit 205 .
[0026] The decoded image signal superimposing unit 205 superimposes the predicted image signal generated by the predicted image generating unit 204 and the inverse A decoded image signal is generated by superimposing this with the residual signal obtained by the quantization and inverse orthogonal transformation unit 203 . Furthermore, the decoded image signal superimposing unit 205 stores the decoded image signal in the decoded image memory 206 . The decoded image signal superimposing unit 205 reduces block distortion and the like caused by coding in the decoded image. The decoded image may be stored in the decoded image memory 206 after a filtering process. The decoded image signal superimposing unit 205 outputs the decoded image from the image decoding device 200 .
[0027] Next, the operation of the block division unit 101 in the image coding device 100 will be described with reference to FIG. FIG. 3 shows how the block division unit 101 divides an image into tree blocks. This shows the operation of dividing a portion into blocks.
[0028] First, an input image is divided into tree blocks of a predetermined size (S1000). Here, the tree block is 128x128 pixels. The size of the image is not limited to the above, and any size and aspect ratio may be used as long as the image is rectangular. The size of the tree block may be predetermined between the device and the decoding device. The coding device determines the size of the tree block and records it in the coding bit stream. A configuration in which the encoding device uses the size of the treeblock recorded in the encoded bitstream. Fig. 4 shows how an input image is divided into tree blocks. The blocks are coded in raster scan order, ie, from left to right, top to bottom.
[0029] The inside of the tree block is further divided into rectangular blocks. The inside of the tree block is shown in Fig. The z-scan order shown in Figure 5 is upper left, upper right, lower left, lower right, The order of the tree blocks is shown below. The division inside the tree block can be 4-way, 2-way, or 3-way. .
[0030] The blocks are divided into four parts, one in each of the horizontal and vertical directions, as shown in Fig. 6(a). This is done by dividing the 16-bit number into four blocks.
[0031] The division of a block into two or three parts is done by dividing it horizontally or vertically. When dividing a block into two in the horizontal direction, it is divided in half as shown in Fig. 6(b) and the two Also, when dividing the block into three horizontally, as shown in Figure 6(c), Divide the image into three blocks in a 1:2:1 ratio. Divide the image into two blocks vertically. If the pixel size is 1, the pixel size is divided in half as shown in Fig. 6(d) to generate two blocks. When dividing the blocks into three, the ratio is 1:2:1 as shown in Fig. 6(e), and the three blocks are Generate.
[0032] Referring again to FIG. 3, the operation of the block division unit 101 will be described. It is determined whether to divide the inside of the block into four halves both horizontally and vertically (S1001 ).
[0033] How to determine the optimal case based on multiple conditions, including whether to divide a block into four There is an existing method called RD optimization (Rate-Distortion Optimization). In the optimization, the coding cost is calculated from the code amount and coding distortion. For each of the cases where the coding cost is calculated, the coding cost is minimized. In other words, the decision to divide a block into four is made according to the The coding cost is calculated when the block is divided into four and when it is not divided into four. This is done by selecting the case where the cost is the smallest. To achieve this, methods other than RD optimization may be used.
[0034] If it is determined that the inside of the tree block is to be divided into four (S1001: YES), The inside of the block is divided into four (S1002). The re-division process of the block divided into four will be described later. This is described in Figure 7.
[0035] If it is determined that the inside of the tree block is not to be divided into four (S1001: NO), It is determined whether the inside of the block is to be divided into two or three (S1003).
[0036] If it is determined that the inside of the tree block is to be divided into two or three (S1003: YES) Then, it is determined whether the division direction is the vertical direction (S1004).
[0037] If the split direction is determined to be vertical (S1004: YES), inside the tree block It is determined whether to divide the image into two (S1005).
[0038] If it is determined that the inside of the tree block is to be divided into two (S1005: YES), The inside of the tree block is divided vertically into two parts (S1006). On the other hand, the inside of the tree block is divided into three parts. If it is determined that the tree block is divided into three parts vertically (S1005: NO), S1007). The re-division process for blocks that are divided into two or three vertically will be described later. This is described in Figure 8.
[0039] If the direction of division is determined to be horizontal (S1004: NO), the inside of the tree block is It is determined whether or not to divide into two (S1008).
[0040] If it is determined that the inside of the tree block is to be divided into two (S1008: YES), The inside of the tree block is divided into two parts horizontally (S1009). On the other hand, the inside of the tree block is divided into three parts. If it is determined that the tree block is divided into three parts horizontally (S1008: NO), S1010). The process of re-division of blocks divided into two or three horizontally will be described later. This is described in Figure 8.
[0041] When it is determined that the inside of the tree block is not to be divided into two or three (S1003: NO) The block division process is terminated without dividing the inside of the tree block into blocks (S1011 ).
[0042] Next, the tree block is divided into four halves horizontally and vertically. The processing of each block will be described with reference to the flowchart in FIG.
[0043] First, decide whether to divide the block into 4 halves again horizontally and vertically. (S1101).
[0044] If it is determined that the block interior is to be divided into four again (S1101: YES), is again divided into four (S1102).
[0045] If it is determined that the block interior is not to be divided into four again (S1101: NO), It is then determined whether to divide the image into two or three (S1103).
[0046] If it is determined that the block is to be divided into two or three parts (S1103: YES), the division It is then determined whether the direction to be scanned is the vertical direction (S1104).
[0047] If the division direction is determined to be vertical (S1104: YES), the block is divided into two. It is determined whether or not to divide (S1105).
[0048] If it is determined that the inside of the block is to be divided into two (S1105: YES), the inside of the block is divided vertically. Divide it into two in the perpendicular direction (S1106). On the other hand, if it is determined that the inside of the block should be divided into three ( S1105: NO), and then divide the inside of the block vertically into three (S1107).
[0049] If the direction of division is determined to be horizontal (S1104: NO), the inside of the block is divided into two. It is determined whether or not to do so (S1108).
[0050] If it is determined that the inside of the block is to be divided into two (S1108: YES), the inside of the block is divided into two. Divide the block into two in the horizontal direction (S1109). On the other hand, if it is determined that the inside of the block should be divided into three ( S1108: NO), and then divide the inside of the block horizontally into three (S1110).
[0051] If it is determined that the block is not to be divided into two or three parts (S1103: NO), The block division process ends without further dividing the inside of the block (S1111).
[0052] The process shown in the flowchart of FIG. 7 is executed recursively for each of the four divided blocks. The four divided blocks are coded in z-scan order.
[0053] Next, the tree block is divided vertically into two or three blocks. The check process will be described with reference to the flowchart in FIG.
[0054] If a tree block is divided vertically into two or three blocks, Then, it is determined whether the inside of the block should be divided again into two or three parts (S1201).
[0055] If it is determined that the block is to be divided into two or three parts (S1201: YES), the division It is then determined whether the direction in which the image is to be displayed is the vertical direction (S1202).
[0056] If the division direction is determined to be vertical (S1202: YES), the block is divided into two. It is determined whether or not to divide (S1203).
[0057] If it is determined that the inside of the block is to be divided into two (S1203: YES), the inside of the block is divided vertically. Divide the block into two in the perpendicular direction (S1204). On the other hand, if it is determined that the inside of the block should be divided into three ( S1203: NO), and then divide the inside of the block vertically into three (S1205).
[0058] If the division direction is determined to be horizontal (S1202: NO), the block is divided into two. It is determined whether or not to do so (S1206).
[0059] If it is determined that the inside of the block is to be divided into two (S1206: YES), the inside of the block is divided into two parts. Divide the block into two in the horizontal direction (S1207). On the other hand, if it is determined that the inside of the block should be divided into three ( S1206: NO), and then divide the inside of the block horizontally into three (S1208).
[0060] If it is determined that the block interior will not be divided into two or three again (S1201: NO), The block division process ends without dividing the inside of the block again (S1209).
[0061] For each block divided into two or three vertically, the flow of Fig. 8 The process shown in the chart is executed recursively. Inside the block divided into two or three are encoded from left to right.
[0062] Similarly, for each block divided into two or three horizontally, The process shown in the flowchart in 8 is executed recursively. The inside of the block is coded from top to bottom.
[0063] In addition, we have explained how to re-divide the divided blocks when the tree block is divided. However, the parent block does not have to be a treeblock. For example, a treeblock (128x1 When a block (28 pixels) is divided into 4 and each of the 4 blocks (64x64 pixels) is further divided Then, the above process is applied to the division of the further divided blocks.
[0064] The recursive block division may be performed by limiting the number of divisions by determining the number of divisions. In addition, the number of times to divide may be determined in advance between the encoding device and the decoding device. The encoding device determines the number of divisions and records it in the encoded bit stream, and the decoding device The number of divisions recorded in the encoded bit stream may be used.
[0065] Next, we will explain how to divide an image into blocks at the edge of the screen. As shown in Figure 9, the image size is Since the size of the tree block is not necessarily an integer multiple of the size of the tree block, the tree block at the edge of the screen is It may include both on-screen and off-screen parts across the picture boundary. The locks are tree blocks 1001, 1002, and 1003. In this case, the locks are shown in FIG. As shown in Fig. 1, the part outside the picture border is treated as the outermost pixel in the screen. The pixels 1011, 1012, and 1013 are treated as the outermost pixels in the screen.
[0066] Pixel 1011 is in the tree block 1001 and is the pixel located at the top right corner of the screen. The pixels to the right of pixel 1011 that are outside the picture boundary are Treated the same as 1.
[0067] Pixel 1012 is in the tree block 1002 and is the pixel located at the bottom left of the screen. The pixels below pixel 1012 that are outside the screen and beyond the picture boundary are pixel 101. Treated the same as 2.
[0068] Pixel 1013 is in the tree block 1003 and is the pixel located at the bottom right of the screen. The pixels to the right, below, and to the lower right of pixel 1013 are outside the picture boundary. The pixel is treated as the same as pixel 1013.
[0069] Then, when dividing a block into two or three, the block division is restricted. This allows the blocks at the edges of the screen to be divided into appropriate shapes, improving coding efficiency. can be done.
[0070] Block division restrictions apply when dividing a block into two or three at the edge of the screen. In other words, the process of dividing into two or three parts (S1004 to S1010) in FIG. , is replaced by the process described below. Also, the process of dividing into two or three in FIG. 1104 to S1110) are replaced with the process described below. The process of dividing into two or three parts (S1202 to S1208) is replaced with the process described below. Replace.
[0071] The restriction on block division will be explained with reference to FIG. 11. First, all of the block divisions It is determined whether or not to restrict block division for a combination (S1301). All combinations of block division are the combinations of dividing a block horizontally into two, dividing the block vertically into two, and If you divide the block into two in the horizontal direction, if you divide the block into three in the vertical direction, In addition, whether or not to restrict block division depends on whether or not the picture boundary is crossed. For example, if a block is divided into two horizontally, If dividing the blocks causes pixels beyond the picture boundary to be split, the blocks are divided horizontally. Limit splitting into two.
[0072] Here, restricting the division of blocks horizontally means dividing blocks horizontally. This means that dividing a block in the vertical direction is prohibited. Restricting this means that you cannot split a block vertically. Similarly, restricting the division of a block into two means dividing the block into two This means that it is prohibited to divide a block into three parts. This means that dividing a block into thirds is prohibited.
[0073] Next, it is judged whether or not to restrict block division for all combinations of block division ( S1302). When restricting block division in all combinations (S1302: YES) , the block is not divided (S1314). On the other hand, block division is restricted in all combinations. If not (S1302: NO), it is determined whether or not to restrict block division in the horizontal direction. (S1303).
[0074] If horizontal block division is to be restricted (S1303: YES), proceed to the next process (S On the other hand, if the horizontal block division is not restricted (S1303: NO), It is determined whether or not to restrict block division in the vertical direction (S1304).
[0075] If vertical block division is to be restricted (S1304: YES), proceed to the next process (S On the other hand, if vertical block division is not restricted (S1304: NO), It is determined whether the block is to be divided vertically (S1305).
[0076] If the direction of block division is determined to be vertical (S1305: YES), It is determined whether or not to limit the division into three parts (S1306). If it is determined to be a direction (S1305: NO), the process proceeds to the next step (S1310).
[0077] When limiting the division of a block into thirds (S1306: YES), divide the block vertically into two. On the other hand, if the division of the block into 3 is not restricted (S1306: NO), Then, it is determined whether or not the block should be divided into two (S1307).
[0078] If it is determined that the block should be divided into two (S1307: YES), the block is divided vertically. Divide the block into two (S1308). On the other hand, if it is determined that the block should be divided into three (S1307: NO), and then divide the block vertically into thirds (S1309).
[0079] If vertical division is restricted (S1304: YES), and the direction of block division If it is determined that the direction is horizontal (S1305: NO), the division of the block into 3 parts is limited. A determination is made (S1310).
[0080] When limiting the division of a block into thirds (S1310: YES), divide the block into two horizontally. On the other hand, if the division of the block into three is not restricted (S1310: NO), Then, it is determined whether or not the block should be divided into two (S1311).
[0081] If it is determined that the block is to be divided into two (S1311: YES), the block is divided horizontally. Divide the block into two (S1312). On the other hand, if it is determined that the block should be divided into three (S1311: NO), and then divide the block horizontally into thirds (S1313).
[0082] In other words, if a pixel beyond a picture boundary is divided by block division, Restrict block division in the direction.
[0083] Here is a concrete example. At the bottom of the screen, the tree block is not divided into four. (S1001: NO), the inside of the tree block is divided into two or three parts (S1003: Y Fig. 12(a) shows a tree block divided into an on-screen part and an off-screen part by a picture boundary. In this case, when the tree block is divided in all combinations, Then, it is determined whether or not to restrict block division (S1301).
[0084] For all combinations of tree block division, the results are shown in Fig. 12(a) to As shown in Fig. 12(a), if a block is divided into two vertically, This block division is restricted because pixels beyond the picture boundary are divided. In addition, if the block is divided vertically into three parts as shown in Fig. 12(b), the picture boundary is crossed. Since the pixel at the position where the pixel is located is divided, this block division is restricted. If the block is divided horizontally into two parts as shown, the pixels beyond the picture boundary are divided. Since the block division is not possible, we do not restrict this block division. If you divide the block horizontally into thirds, the pixels beyond the picture boundary will not be divided. There are no restrictions on block division.
[0085] Therefore, block division is not restricted in all combinations of block division (S1302: In addition, the horizontal block division is not restricted (S1303: NO), and the vertical block division is restricted (S1304: NO). Restrict lock division (S1304: YES). And do not restrict division of blocks into 3 (S1310: NO). Therefore, it is determined whether or not to divide the block into two (S1311). Now, if we decide to divide the block into two (S1311: YES), we divide the block into Divide it into two horizontally (S1312).
[0086] These block division restrictions ensure that blocks have the correct shape because In a block that contains pixels, the pixel values outside the screen are constant. The pixel value change in the part of the screen of the lock is relative to the block that does not include the pixels outside the screen. Therefore, there is little need to code small pixel changes. By grouping pixels into blocks as close together as possible, the amount of code is reduced and coding efficiency is improved. It can be improved.
[0087] This block division restriction also applies to the right edge of the screen. The case where the lock is divided is shown in Fig. 12(e) to Fig. 12(h). If the block is divided into two horizontally as shown in Fig. 12(e), the picture boundary is crossed. The pixel at the position where the pixel is located is divided. Also, the block is divided into 3 parts horizontally as shown in FIG. When dividing the blocks, the pixels beyond the picture boundary are divided. This restriction on block division can improve coding efficiency. do.
[0088] Next, the operation of the block division unit 202 of the image decoding device 200 will be described. The block division unit 202 performs the same processing as the block division unit 101 in the image encoding device 100 described above. The block division unit 101 selects a block division pattern. On the other hand, the block division unit 202 selects one of the coded blocks and outputs the selected block division information. The blocks are divided using the block division information decoded from the bit stream. The block division restrictions are the same as those of the image encoding device 100 described above.
[0089] Syntax for block division in the first embodiment (structure of encoded bit stream) The syntax rules are shown in Figure 13. In Figure 13, QT() is the syntax for dividing a block into four parts. MTT() represents the syntax for dividing a block into two or three parts. The image coding device 100 performs coding according to this syntax, and the image decoding device 200 performs Decode according to this syntax.
[0090] First, whether or not to divide a block into four is indicated by QTflag. To divide into four, set QTflag=1. If you do not want to divide it into four, set QTflag=0. If you want to divide it into four (QTflag=1), If it is possible to divide it into four parts (QTvalid=1), it will be divided into four parts recursively. If there is no QTflag (QTflag=0), whether to split into 2 or 3 is indicated by MTTflag. When dividing into 3 parts (MTTflag=1), whether to divide vertically is indicated by vertical_flag. Whether or not to split is indicated by BTflag. To split vertically, use vertical_flag=1, and to split horizontally, use If you want to split the image in the vertical direction, set vertical_flag=0. If you want to split the image in two, set BTflag=1. When dividing, set BTflag=0. Each block divided into 2 or 3 is further divided into 2. Or, if it is possible to divide it into three parts (MTTvalid=1), it will recursively divide it into two or three parts.
[0091] Here, we consider the variable QTvalid, which indicates whether each block can be further divided into four. QTvalid is defined for each block divided into four. Blocks divided into four If the pixel does not include any pixel on the screen, QTvalid=0. Otherwise, QTvalid=1. become.
[0092] In addition, each block divided into two or three can be further divided into two or three. The variable MTTvalid that indicates the validity of each block divided into two or three is explained below. If the pixel in the screen is not included in the block to be divided into two or three, MTTvalid = 0. In other cases, MTTvalid = 1.
[0093] In this embodiment, since the direction of block division is restricted, vertical_flag is not necessary. Therefore, the vertical_flag in FIG. 13 may be omitted.
[0094] Due to these block division restrictions, it is difficult to divide the blocks at the edge of the screen into appropriate shapes. This allows for improved coding efficiency. Locks can be split. (Second embodiment) An image encoding device and an image decoding device according to a second embodiment of the present invention will be described. In the second embodiment, when the depth of the block division reaches the limit depth, the block division is The rest of the configuration is the same as in the first embodiment, so a description thereof will be omitted.
[0095] Here, the depth of block division will be described. After dividing into two or three parts, recursively divide each part into two or three parts. The process of dividing the image into two or three parts has been described. The third division process is defined as depth 0. Also, the first division into two or three parts is The second bisection or trisection process for each block is defined as depth 1. The third bisection or trisection for each block divided by the division or trisection process The division process is defined as depth 2, and so on. Also, to limit block division, The depth at which the hole is to be cut is determined in advance and defined as the limit depth.
[0096] Block division restrictions apply when dividing a block into two or three at the edge of the screen. In other words, the process of dividing into two or three parts (S1004 to S1010) in FIG. , is replaced by the process described below. Also, the process of dividing into two or three in FIG. 1104 to S1110) are replaced with the process described below. The process of dividing into two or three parts (S1202 to S1208) is replaced with the process described below. Replace.
[0097] The restrictions on block division will be explained with reference to FIG. 14. First, when a block is divided into two or When dividing the image into three parts, it is judged whether the depth of the block division has reached the limit depth (S1 401).
[0098] If the limit depth has not been reached (S1401: NO), it is determined that block division is not limited. On the other hand, if the limit depth is reached (S1401: YES), the block For all combinations of block division, it is determined whether or not to restrict block division (S13 01). Since S1301 is the same as in the first embodiment, the explanation will be omitted.
[0099] Next, it is judged whether or not to restrict block division for all combinations of block division ( S1302). The process from S1302 onwards is the same as in the first embodiment, so the description will be omitted. do.
[0100] In other words, the pixels beyond the picture boundary are divided by the block division, and When the depth of block division reaches the limit depth, the block division is restricted.
[0101] Here is a concrete example. At the bottom of the screen, the tree block is not divided into four. (S1001: NO), divide the inside of the tree block into two or three (S1003: Y ES). The limiting depth is set to 1. Figure 12(a) shows a tree block that is located on the picture boundary. This shows how the tree block includes both the inside and outside of the screen. When splitting, the vertical split splits the pixels beyond the picture boundary. However, the depth is 0, which is not the limit depth of 1 (S1401: NO). Therefore, it is decided not to restrict block division (S1402). No restriction on division (S1302: NO), no restriction on horizontal block division (S1303 : NO), and does not restrict vertical block division (S1304: NO). It is determined whether or not to divide the block vertically (S1305). If it is determined that a block should be divided (S1305: YES), there is no restriction on dividing the block into 3. Then (S1306: NO), it is determined whether or not to divide the block into two (S1307). If it is determined that the block is to be divided into two (S1307: YES), the block is divided vertically. The image is then divided into two in the vertical direction (S1308). This is shown in FIG. 12(a).
[0102] Next, of the blocks divided vertically into two, the left block is divided into two or three. At this time, the depth is 1, which means the limit depth of 1 has been reached (S1401: YES). Therefore, for all combinations of block division, we can decide whether to restrict block division or not. Decide (S1301).
[0103] When the blocks are divided in all combinations, the results are shown in Fig. 15(a) to Fig. 1 As shown in Fig. 15(a), when a block is divided into two vertically, the picture Since pixels beyond the pixel boundary are split, we limit this block split. If the block is divided vertically into thirds as shown in 15(b), the position beyond the picture boundary Since the pixels are divided, this block division is restricted. On the other hand, as shown in FIG. If a block is divided horizontally into two, the pixels beyond the picture boundary will not be divided. Therefore, we do not restrict this block division. Similarly, we divide the block into water as shown in Figure 15(d). When dividing the image into thirds horizontally, the pixels beyond the picture boundary are not divided, so this block Do not limit block splitting.
[0104] Therefore, block division is not restricted in all combinations of block division (S1302: In addition, the horizontal block division is not restricted (S1303: NO), and the vertical block division is restricted (S1304: NO). Lock division is restricted (S1304: YES). And division of blocks into 3 is not restricted. (S1310: NO). Therefore, it is determined whether or not to divide the block into two (S1311). Now, if we decide to divide the block into two (S1311: YES), we divide the block into Divide it into two horizontally (S1312).
[0105] These block division restrictions ensure that blocks have the appropriate size and shape. Therefore, in a block that includes pixels outside the screen, the pixel values of the pixels outside the screen are constant. Therefore, the change in pixel value of the part of the block that is on the screen is not reflected in the block that does not include pixels outside the screen. Therefore, there is little need to code small pixel changes. By grouping pixels outside the screen as a block as possible, the amount of coding is reduced. This can improve the encoding efficiency.
[0106] This block division restriction also applies to the right edge of the screen. When dividing into 3, the depth is 0 and the limit depth 1 is not reached, so the block division is not restricted and the limit is 2. Divide or divide into 3. When dividing a divided block, the depth is 1 and the limit depth is Since the number of blocks has reached 1, it is judged whether to limit block division. When dividing a block into two horizontally and into three horizontally, the picture boundary is crossed. The pixels at the positions where the pixel is located are divided. Therefore, these block divisions are restricted. By limiting the block division, the coding efficiency can be improved.
[0107] In this embodiment, the depth of block division is defined as division into two or three. This may be defined for four divisions. In this embodiment, the depth of block division is This limits the block division to the picture boundary that the block contains. The number or ratio of pixels at the position may be limited. In other words, these values are set to predetermined values. If the value is greater than 1, the block splitting is limited. In addition, these values are , may be set to different values for each depth of block division. Blocks with a small percentage of pixels outside the screen are divided, and blocks with a large number or percentage of pixels outside the screen are not divided. The pixels beyond the limit depth of block division and the picture boundary that the block contains are The number and ratio of blocks that are used to limit the number of blocks are used by the encoder to The decoder uses the values recorded in the coded bit stream. This is also fine.
[0108] In the first embodiment, block division is restricted regardless of the depth of block division. In this embodiment, block division is restricted according to the depth of block division. Blocks with a small percentage of off-screen pixels are divided, and blocks with a large percentage of off-screen pixels are divided. Therefore, it is necessary to divide the blocks at the edge of the screen into appropriate sizes and shapes. This makes it possible to improve the coding efficiency. It is possible to divide the data into blocks. (Third embodiment) An image encoding device and an image decoding device according to a third embodiment of the present invention will be described. In the third embodiment, the block division is performed according to the number of pixels beyond the picture boundary. The rest of the configuration is the same as in the first embodiment, so a description thereof will be omitted.
[0109] Block division control is applied when dividing a block into two or three at the edge of the screen. In other words, the process of dividing into two or three parts (S1004 to S1010) in FIG. , is replaced by the process described below. Also, the process of dividing into two or three in FIG. 1104 to S1110) are replaced with the process described below. The process of dividing into two or three parts (S1202 to S1208) is replaced with the process described below. Replace.
[0110] The control of block division will be described with reference to FIG. 16. First, all of the block division For each combination, the number of pixels that cross the picture boundary is counted (S1601). All combinations of block division are the combinations of all combinations of blocks when the block is divided horizontally into two. If you divide a block vertically into two, if you divide a block horizontally into three, There are four when divided into three directions.
[0111] And for each of the cases where the block is divided into two and three, A division direction that maximizes the number of pixels at a position beyond a picture boundary is determined (S1602).
[0112] Next, it is determined whether or not the block should be divided into two (S1603).
[0113] If it is determined that the data should be divided into two (S1603: YES), the data is divided into two parts as determined in S1602. On the other hand, if it is determined that the image should be divided into three parts (S1603: O), and then divide it into three in the division direction determined in S1602 (S1605).
[0114] In other words, the block is selected so that the pixels beyond the picture boundary are included in the block as much as possible. Controls the direction of the lock split.
[0115] Here, we will explain a specific example. Now, the image is 1920x1080 pixels, and the tree block is The pixel size is 128x128. Also, the tree block is not divided into four (S1101: NO). The inside of the block is divided into two or three parts (S1103: YES). Then, the block is divided into two or three parts (S1103: YES). ), there are 72 vertical pixels beyond the picture boundary at the bottom of the screen. In this case, the number of pairs of trees in each block when the tree block is divided into all combinations is The number of pixels at positions beyond the texture boundary is counted (S1601).
[0116] For all combinations of tree block division, As shown in Fig. 17(a), if a block is divided into two vertically, The left side (500) and the right side (501) of the divided block each have 4608 pixels. On the other hand, if a block is divided horizontally into two as shown in Fig. 17(b), the divided block The upper side (510) is 1024 pixels, and the lower side (511) is 8192 pixels. The maximum number of pixels beyond the pixel boundary is the lower 8192 pixels when dividing horizontally. Therefore, the division direction that maximizes the number of pixels is the horizontal direction (S1602).
[0117] Similarly, if we divide the block vertically into three parts as shown in Figure 17(c), the divided parts are The left side (520) and right side (522) of the block each have 2304 pixels, and the center (52 1) is 4608 pixels. On the other hand, if the block is divided horizontally into three as shown in Fig. 17(d), For example, the upper part of the divided block is 0 pixels, the center (531) is 5120 pixels, and the lower part is (532) is 4096 pixels. In other words, the maximum number of pixels beyond the picture boundary is The maximum number of pixels is 5120 pixels in the center when dividing the image horizontally. The division direction is the horizontal direction (S1602).
[0118] Finally, it is determined whether or not the block should be divided into two (S1603). If the result is YES in S1603, the block is divided into two in the horizontal direction, which is the determined division direction. On the other hand, if it is determined that the image should be divided into three parts (S1603: NO), the image is decided. The block is divided into three in the horizontal direction, which is the division direction (S1605).
[0119] In this embodiment, when dividing a block into two or three, the position beyond the picture boundary is The direction of block division is controlled so that the pixels at the current position are included in the block as much as possible. In the block including pixels outside the screen, the pixel values of the pixels outside the screen are constant, so There is little need to code small pixel changes. By combining as many blocks as possible into one, the amount of code is reduced and coding efficiency is improved. It can be done.
[0120] Furthermore, not only the direction in which the blocks are divided but also the number of blocks into which the blocks are divided may be determined. As shown in the figure, the maximum number of pixels beyond the picture boundary is 8192 pixels in the case of two divisions. In the case of three divisions, the number of pixels is 5120. In other words, the pixels beyond the picture boundary are black. Since the block is often divided into two, the block is divided into two.
[0121] This is because, compared to splitting into two, splitting into three means that the block is split closer to the edge of the block. The number of pixels beyond the picture boundary tends to be smaller in the 3-division case than in the 2-division case. Therefore, at the edge of the screen, it is necessary to decide the direction to divide the block into two, not into three. This reduces the processing required for dividing a block into three parts, and reduces the processing time required for dividing a block. It can be made faster.
[0122] Block division control is applied when dividing a block into two or three at the edge of the screen. In other words, the process of dividing into two or three parts (S1004 to S1010) in FIG. , is replaced by the process described below. Also, the process of dividing into two or three in FIG. 1104 to S1110) are replaced with the process described below. The process of dividing into two or three parts (S1202 to S1208) is replaced with the process described below. Replace.
[0123] The control of block division will be described with reference to FIG. 18. First, all of the block divisions For each combination, the number of pixels that cross the picture boundary is counted (S1651). All combinations of block division are the case where the block is divided into two horizontally and the case where the block is divided into two horizontally. These are the two that result when the block is divided vertically into two.
[0124] Next, when the block is divided into two, the maximum number of pixels beyond the picture boundary is Then, the division direction is determined so that the blocks are divided into two in the determined division direction (S1652). Split (S1654).
[0125] The syntax for block division in this embodiment is vertical_flag in FIG. This is because in this embodiment, the direction of block division is controlled, and ve In this embodiment, the number of divisions of the block is set to 1. Alternatively, the block may not be divided into three parts. In that case, BTflag is not necessary. Since this is not necessary, it may be omitted. The syntax may be the same as that in FIG.
[0126] In the case of 1920x1080 pixels, the pixel beyond the picture boundary on the right edge of the screen However, if the image width is not an integer multiple of the treeblock size, Since there are pixels beyond the boundary of the block, the block division is controlled in the same manner as described above.
[0127] In this embodiment, the block division method is determined based on the number of pixels beyond the picture boundary. This is because the percentage of pixels that lie beyond the picture boundary determines the block orientation. The direction of the division may also be controlled.
[0128] By controlling the block division in this way, the blocks at the edge of the screen are divided into appropriate sizes and shapes. This makes it possible to improve the coding efficiency. This allows for block division suitable for (Fourth embodiment) An image encoding device and an image decoding device according to a fourth embodiment of the present invention will be described. In the fourth embodiment, a case where the picture boundary is different from that in the previous embodiment will be described. Other than this, the configuration is the same as in the first embodiment, so a description thereof will be omitted.
[0129] Here, we consider a pattern in which the picture boundaries are different from those in FIG. Even if the number of blocks is increased, the result of the decision on whether to limit block division is the same as in the case of Figure 12. For example, in FIG. 12(a), if the picture boundary is located slightly above Even in this case, block division is restricted because pixels beyond the picture boundary are divided. In other words, in FIG. 12(a), even if the picture boundary changes in the vertical direction, the block division is The result of the decision to limit the number of shares remains unchanged. This is also the case in Figure 12(b). 12(e) and 12(f) show that the picture boundary is changed horizontally without changing the block division. The decision to limit the share remains unchanged.
[0130] In the end, the patterns with picture boundaries different from those in FIG. 12 are those in FIG. 19(a) to FIG. 19(d). The picture boundary in FIG. 19(a) is located above that in FIG. 12(c). 9(b) is located above the picture boundary in FIG. 12(d). Similarly, FIG. 19(d) is located to the left of FIG. 12(g) and FIG. 12(h). is.
[0131] Figure 19(a) and Figure 19(b) are both horizontal divisions. However, In the case of 3-division, the pixels beyond the picture boundary are not divided. The pixels beyond the threshold are divided. In other words, block division is limited to 3 divisions. do.
[0132] Figure 19(c) and Figure 19(d) are both vertical divisions. However, In the case of 3-division, the pixels beyond the picture boundary are not divided. The pixels beyond the threshold are divided. In other words, block division is limited to 3 divisions. do.
[0133] In other words, the decision to restrict block division is different for 2-division and 3-division. This is because the 3-way split divides the block closer to the edge of the block than the 3-way split. In contrast to splitting the picture into two, pixels beyond the picture boundary tend to be split. At the edge, it is possible to determine whether to restrict the direction of dividing the block into two instead of dividing it into three. This reduces the processing required for dividing a block into three parts, and speeds up the block division processing. It can be made.
[0134] Block division restrictions apply when dividing a block into two or three at the edge of the screen. In other words, the process of dividing into two or three parts (S1004 to S1010) in FIG. , is replaced by the process described below. Also, the process of dividing into two or three in FIG. 1104 to S1110) are replaced with the process described below. The process of dividing into two or three parts (S1202 to S1208) is replaced with the process described below. Replace.
[0135] The block division restriction will be explained with reference to FIG. 20. FIG. 20 is a diagram similar to FIG. 11. Therefore, the same step numbers as in FIG. 11 are used for the explanation. It may be omitted.
[0136] First, we decide whether to restrict block division for all combinations of block division. All combinations of block division are defined as the combinations of dividing a block into two parts horizontally. When a block is divided, it is divided vertically into two. Whether or not to limit the number of pixels is determined by whether or not the pixels beyond the picture boundary are split. For example, if a block is divided into two horizontally, the pixels beyond the picture boundary are divided. If the block is divided, the division into two parts horizontally is restricted. The process is the same as in FIG. 11 except that the process for dividing into three parts is eliminated, so the explanation is omitted. do.
[0137] Here, a specific example will be described with reference to FIG. 19(a). In the case of FIG. 19(a), For all combinations of block division, it is determined whether or not to restrict block division (S1 901). Now, if we divide the block into two horizontally, the position beyond the picture boundary Since the pixels in the block are not divided, the division in the horizontal direction is not restricted. When dividing the image into two, the pixels beyond the picture boundary are divided, so the vertical division Therefore, block division is restricted for all combinations of block division. (S1302: NO). And, the horizontal block division is not restricted (S1303 :NO), and vertical block division is restricted (S1304:YES). The lock is divided into two horizontally (S1312).
[0138] Now consider a pattern in which the picture boundary is further up or further to the left than in Figure 19. In any pattern, pixels beyond the picture boundary are divided. , it is permissible to always limit division of blocks into two or three at the edges of the screen.
[0139] By controlling the block division in this way, the blocks at the edge of the screen are divided into appropriate sizes and shapes. This makes it possible to improve the coding efficiency. This allows for block division suitable for (Fifth embodiment) An image encoding device and an image decoding device according to a fifth embodiment of the present invention will be described. In the fifth embodiment, a restriction on block division at the bottom right edge of the screen will be described. The rest of the configuration is the same as in the first embodiment, so a description thereof will be omitted.
[0140] As shown in FIG. 9, the tree blocks at the edge of the screen are separated by picture boundaries. In particular, the tree block 1001 at the right edge of the screen and the image The area at the bottom right of the screen is smaller than the area outside the screen that includes the tree block 1002 at the bottom of the screen. The area of the tree block 1003 that is included outside the screen tends to be larger. There is a lot of room for improving coding efficiency by restricting block division. If the block is split, the split blocks contained in the tree block In this case, block division is restricted.
[0141] The restriction on block division at the bottom right corner of the screen will be explained with reference to FIG. The block at the bottom end corresponds to treeblock 1003 in FIG.
[0142] First, we decide whether to restrict block division for all combinations of block division. All combinations of block division are defined as the combinations of dividing a block into two parts horizontally. When a block is divided, it is divided vertically into two. Whether or not to limit the number of pixels is determined by whether or not the pixels beyond the picture boundary are split. For example, if a block is divided into two horizontally, the pixels beyond the picture boundary are divided. If divided, restricts the horizontal division of a block into two parts.
[0143] Now, since this is the block at the bottom right of the screen, all combinations of block divisions For each combination, the pixels beyond the picture boundary are divided into blocks. If division is restricted (S1302: YES), the block is not divided (S1314).
[0144] Here, a specific example will be described with reference to FIG. 21. In FIG. 21(a) and FIG. 21(b), , all combinations of block partitions are shown for the treeblock at the end of In both Fig. 21(a) and Fig. 21(b), the pixel beyond the picture boundary is a division pixel. If you restrict block division for all combinations (S1302: YES), Do not split the block (S1314).
[0145] In Fig. 21(c), the tree block is divided into four parts at the same picture boundary as in Fig. 21(a). This is an example of dividing each block into four parts into blocks 601, 602, 603, and 604 in z-scan order. 03,604. Each step of block division will be explained with reference to FIG.
[0146] FIG. 21(c) is divided into blocks in the following steps. First, in the process of FIG. Then, the image is divided into tree blocks (S1000), and the inside of the tree block is divided into four parts. (S1001: YES), and divides the tree block into four (S1002). For each of the blocks 601, 602, 603, and 604, the process shown in FIG. 7 is carried out. .
[0147] In FIG. 7, it is determined that the inside of the divided block is not to be divided into four again (S1101: If the block is divided into two or three parts (S1103: YES), the block is determined to be divided into two or three parts (S1104: YES). The process of dividing the image into two or three parts (S1104 to S1110) in 7 corresponds to the process in FIG. To be replaced.
[0148] In FIG. 20, block division is restricted for all combinations of block division. It is determined whether or not the block is in the bottom right corner of the screen (S1901). For all combinations of block splits, pixels beyond the picture boundary are split. If you want to restrict block division for all combinations (S1302: YES), No division is performed (S1314). This completes the block division process in FIG.
[0149] FIG. 21(d) shows a case where the tree block is divided into four parts at a different picture boundary than in FIG. 21(c). This example shows a complex block division that combines the above-mentioned embodiments. Of the four divided blocks, blocks 602 and 603 are further divided into blocks. After dividing the tree block into four (S1002), each of the four blocks is divided into 6 Each step of block division will be explained for 01, 602, 603, and 604.
[0150] Block 601 performs the process shown in FIG. 7. In FIG. 7, the inside of the divided block is reconstructed. It is determined that the block is not to be divided into four parts (S1101: NO), and the inside of the block is not to be divided into two or three parts. The block 601 is not divided into blocks (S1103: NO). The block division process ends (S1111).
[0151] Block 602 performs the process shown in FIG. 7. In FIG. 7, the inside of the divided block is reconstructed. It is determined that the block is not to be divided into four (S1101: NO), and the inside of the block is divided into two or three. (S1103: YES). 4 to S1110) are replaced with the processing of FIG.
[0152] In FIG. 20, block division is restricted for all combinations of block division. If the block is divided into two in the horizontal direction, the pixel count is determined (S1901). Since pixels beyond the boundary of the block will be split, splitting in the horizontal direction is limited. If the block is split vertically into two, the pixels beyond the picture boundary will not be split. Therefore, we do not restrict the vertical division. Therefore, block division is not restricted (S1302: NO). (S1303: YES). In other words, the block is divided into two vertically (S13 08). Eventually, block 602 is divided vertically by division 612.
[0153] Block 603 performs the process shown in FIG. 7. In FIG. 7, the inside of the divided block is reconstructed. It is determined that the block is not to be divided into four (S1101: NO), and the inside of the block is divided into two or three. (S1103: YES). 4 to S1110) are replaced with the processing of FIG.
[0154] In FIG. 18, for all combinations of block division, the position beyond the picture boundary is The number of pixels in each block is counted (S1651). There are two types: splitting the block horizontally in half and splitting the block vertically in half. Now, in block 603, as shown in FIG. 17(a) and FIG. 17(b), The number of pixels beyond the pixel boundary is the largest when dividing the pixel horizontally. When a block is divided into two, the number of pixels beyond the picture boundary is the maximum. The dividing direction is determined to be the horizontal direction (S1652). Then, the blocks are divided in the determined dividing direction. The block 603 is then divided horizontally into two parts (S1654).
[0155] Block 604 performs the process shown in FIG. 7. In FIG. 7, the inside of the divided block is reconstructed. It is determined that the block is not to be divided into four (S1101: NO), and the inside of the block is divided into two or three. (S1103: YES). 4 to S1110) are replaced with the processing of FIG.
[0156] In FIG. 20, block division is restricted for all combinations of block division. Now, the block is divided horizontally into two by the division 624 (S1901). In the case of dividing the picture, the pixels beyond the picture boundary are divided, so the division in the horizontal direction is In addition, when the block is divided into two vertically by the division 614, the picture Vertical division is limited because pixels beyond the block boundary are divided. For all combinations of block division, pixels beyond the picture boundary are divided. If you want to restrict block division for all combinations (S1302: YES), divide the block. Not divided (S1314).
[0157] By controlling the block division in this way, the blocks at the edge of the screen are divided into appropriate sizes and shapes. This makes it possible to improve the coding efficiency. This allows for block division suitable for
[0158] In all the embodiments described above, the object of block division control is picture boundaries. This is because an arbitrary boundary is defined and the block is placed beyond the boundary. In addition, as an arbitrary boundary, a pixel that overlaps with the surrounding pixels may be controlled. The pixels with high importance are determined, and the positions beyond the boundary are used as the object of block division control. Furthermore, the position beyond any given boundary does not necessarily have to be the bottom or right edge of the screen, but may be the top or bottom edge of the screen. It can be the left edge or the right edge, or it doesn't have to be the edge. In that case, the block can be placed even if it is not at the edge of the screen. The image can be divided into suitable sizes and shapes, and the coding efficiency can be improved.
[0159] All of the above-described embodiments may be combined in multiple forms.
[0160] In all the embodiments described above, the encoded bitstream output by the image encoding device is The stream is specified so that it can be decoded according to the encoding method used in the embodiment. The encoded bit stream is stored on HDD, SSD, flash memory, and other storage devices. Provided by recording it on a computer-readable recording medium such as a flash memory or optical disk. Alternatively, the information may be provided from a server via a wired or wireless network. Therefore, the image decoding device corresponding to this image coding device can reproduce this specific data regardless of the providing means. The present invention is capable of decoding encoded bitstreams in the data format.
[0161] In order to exchange encoded bitstreams between an image encoding device and an image decoding device, When a wired or wireless network is used, the data format appropriate for the transmission mode of the communication path In this case, the image coding device may convert the output bit stream into The encoded bit stream is converted into encoded data in a data format suitable for the transmission mode of the communication channel. a transmitting device that converts the encoded data into a digital signal and transmits it to a network; A receiving device is provided for restoring the encoded bit stream to an image decoding device and supplying the bit stream to the image decoding device.
[0162] The transmitting device includes a memory for buffering the coded bit stream output by the image coding device. a packet processing unit for packetizing the coded bit stream; and a transmitting unit for transmitting the packetized encoded data. A receiver for receiving packetized coded data via a packetizer, and a memory for packet processing of the encoded data to generate an encoded bit stream. and a packet processing unit for providing the packet to an image decoding device.
[0163] In order to exchange encoded bitstreams between an image encoding device and an image decoding device, When a wired or wireless network is used, in addition to a transmitting device and a receiving device, Even if a relay device is provided to receive the encoded data transmitted by the transmitting device and supply it to the receiving device, The relay device includes a receiving section for receiving packetized encoded data transmitted from the transmitting device. a memory for buffering the received coded data; and a transmitting unit for transmitting the packetized coded data to the network. a reception packet processing unit that processes the received data into packets to generate an encoded bit stream; A recording medium for storing the encoded bit stream and a transmission device for packetizing the encoded bit stream. The communication packet processing unit may include a communication packet processing unit.
[0164] In addition, by adding a display unit for displaying the image decoded by the image decoding device to the configuration, In this case, the display unit may display the decoded image signal generated by the decoded image signal superimposing unit 205. The decoded image signal stored in the decoded image memory 206 is read out and displayed on the screen.
[0165] In addition, an imaging unit is added to the configuration, and the captured image is input to the image encoding device. In this case, the imaging unit inputs an image signal captured by the imaging unit to the block division unit 101. To exert effort.
[0166] FIG. 22 shows an example of a hardware configuration of the encoding / decoding device of the present application. The present invention includes the configurations of an image encoding device and an image decoding device according to the embodiments of the present invention. The encoding / decoding device 9000 includes a CPU 9001, a codec IC 9002, an I / O interface interface 9003, memory 9004, optical disk drive 9005, network interface A video interface 9009 and a computer interface 9006 are connected to each other via a bus 9010. are connected by.
[0167] The image encoding unit 9007 and the image decoding unit 9008 are typically a codec IC 9002 and The image encoding process of the image encoding device according to the embodiment of the present invention is implemented as an image encoding The image decoding process is executed by the decoding unit 9007 in the image decoding device according to the embodiment of the present invention. The image encoding process is performed by the image encoding unit 9007. The I / O interface 9003 For example, a USB interface can be used to connect an external keyboard 9104 and mouse 9 105, etc. The CPU 9001 receives input via the I / O interface 9003. The encoding / decoding device 9 is controlled to execute an operation desired by the user based on the user's operation. 000. As a user's operation using the keyboard 9104, mouse 9105, etc. allows you to select whether to perform encoding or decoding functions, set the encoding quality, and There are input / output destinations for frames, and input / output destinations for images, etc.
[0168] When the user desires to play back the images recorded on the disk recording medium 9100 The optical disk drive 9005 reads the encoded video from the inserted disk recording medium 9100. The read encoded stream is then transmitted to the decoder 9010 via the bus 9010. The image decoding unit 9008 of the block IC 9002 receives the encoded image data and sends it to the image decoding unit 9008 of the block IC 9002. The image decoding process in the image decoding device according to the embodiment of the present invention is performed on the data stream. The decoded image is then displayed on an external monitor 9103 via a video interface 9009. The encoding / decoding device 9000 also includes a network interface 9006. 9101, the system is connected to an external distribution server 9106 and a mobile terminal 9107 via a network 9101. The user can change the image recorded on the disk recording medium 9100 to a distribution service. When it is desired to play back images recorded on the server 9106 or the mobile terminal 9107, The network interface 9006 receives the code from the input disk recording medium 9100. Instead of reading the encoded bitstream, the network 9101 receives the encoded stream. Also, when the user wishes to play back an image recorded in the memory 9004, In this case, the embodiment of the present invention is applied to the coded stream recorded in the memory 9004. The image decoding device according to the present invention performs image decoding processing.
[0169] The user captures an image using an external camera 9102, encodes the image, and records it in memory 9004. When an operation is desired, the video interface 9009 receives an image from the camera 9102. The image data is inputted and sent to the image encoding unit 9007 of the codec IC 9002 via the bus 9010. The image encoding unit 9007 performs the following on the image input via the video interface 9009: The image encoding process is performed in the image encoding device according to the embodiment of the present invention, The encoded bit stream is then sent to the memory via bus 9010. The user changes the memory 9004 and codes the data on the disk recording medium 9100. If it is desired to record the encrypted stream, the optical disk drive 9005 may be The encoded stream is written onto the inserted disk recording medium 9100 .
[0170] A hardware configuration that has an image encoding device but does not have an image decoding device, or a hardware configuration that has an image decoding device It is also possible to realize a hardware configuration that does not include an image coding device. The hardware configuration is, for example, a codec IC 9002, an image encoding unit 9007, or This is realized by replacing the image decoding unit 9008 with the image decoding unit 9009.
[0171] The above encoding and decoding processes are carried out by hardware-based transmission, storage, and reception devices. It can be realized as a read-only memory (ROM) or flash memory. The firmware stored in the memory, etc., and the software of the computer, etc. The firmware program or software program may be implemented in a computer. The information may be provided by recording it on a recording medium that can be read by a computer or the like, or by providing it over a wired or wireless network. It may be provided from a server through a network, or it may be provided as terrestrial or satellite digital broadcast data. It may also be provided as a digital broadcast.
[0172] The present invention has been described above based on the embodiments. The embodiments are merely examples, and each of the structures The combination of components and processes can be modified in many different ways, and these modifications It will be appreciated by those skilled in the art that the embodiments are within the scope of the present invention. [Explanation of symbols]
[0173] 100 image encoding device, 101 block division unit, 102 predicted image generation unit, 103 residual signal generation unit, 104 orthogonal transformation and quantization unit, 105 encoding unit, 10 6 inverse quantization and inverse orthogonal transformation unit, 107 decoded image signal superposition unit, 108 decoded image memory 200 image decoding device, 201 decoding unit, 202 block division unit, 2 03 inverse quantization and inverse orthogonal transformation unit, 204 predicted image generation unit, 205 decoded image signal overlap Folding section, 206 decoded image memory.
Claims
1. An image decoding device that decodes an image in units of divided blocks, comprising: a decoding unit that decodes block division information including a first flag indicating whether to divide a target block into four and a second flag indicating whether to divide the target block by a horizontal division line or a vertical division line; a block division unit that recursively divides the image into rectangles of a predetermined size based on the block division information to generate the target block; The block division unit a quartering unit that divides the target block in the recursive division into four halves in both the horizontal and vertical directions to generate four blocks; a 2-3 division unit that divides the target block in the recursive division into two or three blocks in a horizontal or vertical direction to generate two or three blocks; the 2-3 division unit prohibits dividing the target block by the horizontal division line and permits dividing the target block by the vertical division line if the divided target block exceeds the right side of a picture boundary when dividing the target block into two by a horizontal division line; the 2-3 division unit prohibits dividing the target block by the vertical division line and permits dividing the target block by the horizontal division line if the divided target block exceeds a lower side of a picture boundary when dividing the target block into two by a vertical division line; the decoding unit, when decoding the first flag to be false, does not decode the second flag under a condition that prohibits dividing the target block along a horizontal or vertical division line; 13. An image decoding device comprising:
2. 1. An image decoding method for decoding an image in units of divided blocks, comprising the steps of: a decoding step of decoding block division information including a first flag indicating whether or not the target block is to be divided into four, and a second flag indicating whether the target block is to be divided along a horizontal division line or along a vertical division line; a block division step of recursively dividing the image into rectangles of a predetermined size based on the block division information to generate the target block; The block division step includes: a four-division step for dividing the target block in the recursive division into four halves in both the horizontal and vertical directions to generate four blocks; A 2-3 division step of dividing the target block in the recursive division into two or three blocks in a horizontal or vertical direction to generate two or three blocks; In the 2-3 division step, if the target block is divided into two by a horizontal division line, and the divided target block exceeds the right side of the picture boundary, the division of the target block by the horizontal division line is prohibited and the division of the target block by the vertical division line is permitted; the 2-3 division step prohibits dividing the target block by the vertical division line and permits dividing the target block by the horizontal division line if the divided target block exceeds a lower side of a picture boundary when dividing the target block by a vertical division line; the decoding step includes, when the first flag is decoded and is false, not decoding the second flag under a condition that the target block is prohibited from being divided along a division line in a horizontal or vertical direction.
2. An image decoding method comprising:
3. An image decoding program for decoding an image in units of divided blocks, comprising: a decoding step of decoding block division information including a first flag indicating whether or not the target block is to be divided into four, and a second flag indicating whether the target block is to be divided along a horizontal division line or along a vertical division line; a block division step of recursively dividing the image into rectangles of a predetermined size based on the block division information to generate the target block; The block division step includes: a four-division step for dividing the target block in the recursive division into four halves in both the horizontal and vertical directions to generate four blocks; A 2-3 division step of dividing the target block in the recursive division into two or three blocks in a horizontal or vertical direction to generate two or three blocks; In the 2-3 division step, if the target block is divided into two by a horizontal division line, and the divided target block exceeds the right side of the picture boundary, the division of the target block by the horizontal division line is prohibited and the division of the target block by the vertical division line is permitted; the 2-3 division step prohibits dividing the target block by the vertical division line and permits dividing the target block by the horizontal division line if the divided target block exceeds a lower side of a picture boundary when dividing the target block by a vertical division line; the decoding step includes, when the first flag is decoded and is false, not decoding the second flag under a condition that the target block is prohibited from being divided along a division line in a horizontal or vertical direction.
2. An image decoding program comprising:
4. An image coding device that codes an image in units of divided blocks, comprising: a block division unit that recursively divides the image into rectangles of a predetermined size to generate target blocks; an encoding unit that encodes block division information including a first flag indicating whether the target block is to be divided into four, and a second flag indicating whether the target block is to be divided by a horizontal division line or a vertical division line; The block division unit a quartering unit that divides the target block in the recursive division into four halves in both the horizontal and vertical directions to generate four blocks; a 2-3 division unit that divides the target block in the recursive division into two or three blocks in a horizontal or vertical direction to generate two or three blocks; the 2-3 division unit prohibits dividing the target block by the horizontal division line and permits dividing the target block by the vertical division line if the divided target block exceeds the right side of a picture boundary when dividing the target block into two by a horizontal division line; the 2-3 division unit prohibits dividing the target block by the vertical division line and permits dividing the target block by the horizontal division line if the divided target block exceeds a lower side of a picture boundary when dividing the target block into two by a vertical division line; the encoding unit, when encoding the first flag and the first flag is false, does not encode the second flag under a condition that prohibits dividing the target block along a horizontal or vertical division line.
1. An image encoding device comprising:
5. An image coding method for coding an image in units of divided blocks, comprising the steps of: a block division step of recursively dividing the image into rectangles of a predetermined size to generate target blocks; an encoding step of encoding block division information including a first flag indicating whether the target block is to be divided into four and a second flag indicating whether the target block is to be divided by a horizontal division line or a vertical division line; The block division step includes: a four-division step for dividing the target block in the recursive division into four halves in both the horizontal and vertical directions to generate four blocks; A 2-3 division step of dividing the target block in the recursive division into two or three blocks in a horizontal or vertical direction to generate two or three blocks; In the 2-3 division step, if the target block is divided into two by a horizontal division line, and the divided target block exceeds the right side of the picture boundary, the division of the target block by the horizontal division line is prohibited and the division of the target block by the vertical division line is permitted; the 2-3 division step prohibits dividing the target block by the vertical division line and permits dividing the target block by the horizontal division line if the divided target block exceeds a lower side of a picture boundary when dividing the target block by a vertical division line; the encoding step includes, when the first flag is encoded and the first flag is false, not encoding the second flag under a condition that the target block is prohibited from being divided by a horizontal or vertical division line.
13. An image coding method comprising:
6. An image encoding program for encoding an image in units of divided blocks, comprising: a block division step of recursively dividing the image into rectangles of a predetermined size to generate target blocks; an encoding step of encoding block division information including a first flag indicating whether the target block is to be divided into four and a second flag indicating whether the target block is to be divided along a horizontal division line or along a vertical division line; The block division step includes: a four-division step for dividing the target block in the recursive division into four halves in both the horizontal and vertical directions to generate four blocks; A 2-3 division step of dividing the target block in the recursive division into two or three blocks in a horizontal or vertical direction to generate two or three blocks; In the 2-3 division step, if the target block is divided into two by a horizontal division line, and the divided target block exceeds the right side of the picture boundary, the division of the target block by the horizontal division line is prohibited and the division of the target block by the vertical division line is permitted; the 2-3 division step prohibits dividing the target block by the vertical division line and permits dividing the target block by the horizontal division line if the divided target block exceeds a lower side of a picture boundary when dividing the target block by a vertical division line; the encoding step includes, when the first flag is encoded and the first flag is false, not encoding the second flag under a condition that the target block is prohibited from being divided by a horizontal or vertical division line.
2. An image encoding program comprising:
7. A method for storing a bit stream generated according to the image coding method according to claim 5 on a recording medium.
8. A transmission method for transmitting a bit stream generated according to the image coding method according to claim 5.
Citation Information
Patent Citations
Method and device for encoding or decoding encoding unit of picture outline
WO2018070550A1
Image decoding device and image coding device
WO2018110600A1
Methods and apparatus for picture encoding and decoding
WO2018177741A1
Apparatus and method for encoding and decoding a picture using picture boundary handling
WO2019185456A1
A method, encoding apparatus, and corresponding computer program for encoding a current block of a first image component with respect to at least one reference block of a second image component.
JP2015526008A
