Encoding device, decoding device, and program
By optimizing the selection of intra prediction modes and the encoding order in intra prediction of H.265/HEVC, the problems of low intra prediction accuracy and low coding efficiency are solved, and more efficient encoding processing is achieved.
Patent Information
- Application Number
- CN202410973027.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2018-08-20
- Filing Date
- 2019-08-20
- Publication Date
- 2024-09-24
AI Technical Summary
In the intra prediction of H.265/HEVC, the selection of the encoding processing order of the intra prediction mode results in reduced prediction accuracy, low coding efficiency, and increased calculation time.
By introducing a coding processing order determination unit in the encoding device and the decoding device, generating intra prediction mode candidates, and performing intra prediction processing and entropy coding processing based on the determined order and mode, optimizing the selection of the intra prediction mode and the coding sequence, to reduce the amount of information and calculation time.
The accuracy and coding efficiency of intra-frame prediction are improved, and the amount of information and calculation time transmitted by the coding device are reduced.
Smart Images

Figure CN118694935A
Abstract
Description
[0001] This application is a divisional application of the invention patent application with application number 201980054533.9, application date August 20, 2019, and invention name “Encoding device, decoding device and program”. Technical Field
[0002] The present invention relates to an encoding device, a decoding device, and a program. Background Art
[0003] In the H.265 / HEVC (High Efficiency Video Coding) moving picture (video) coding method represented by the next generation video compression technology, two predictions, inter-frame prediction using temporal correlation between frames and intra-frame prediction using spatial correlation within frames, are switched while performing prediction and generating a residual signal, and then orthogonal transformation processing, loop filtering processing, and entropy coding processing are performed. Furthermore, the stream obtained by the entropy coding processing is output.
[0004] HEVC intra prediction provides a total of 35 intra prediction modes, including planar prediction, DC prediction, and directional prediction. In the decoding device, according to the intra prediction mode determined by the encoding device (encoder), the adjacent decoded reference pixels are used for intra prediction to generate a predicted image. In the following, "reference pixel" refers to a decoded reference pixel unless otherwise specified.
[0005] Conventional HEVC divides an original image, which is a frame unit constituting a moving image, into a plurality of blocks of a fixed size (hereinafter referred to as CTU: Coding Tree Unit), and then performs encoding by applying recursive quadtree partitioning to each CTU.
[0006] The coding device performs coding processing on the divided coding target blocks (hereinafter referred to as CU: Coding Unit) while switching between intra-frame prediction and inter-frame prediction. Moreover, the coding processing is performed in a predetermined coding processing order from the upper left to the lower right (the coding processing order of the upper left CU→the upper right CU→the lower left CU→the lower right CU is hereinafter referred to as Z scan).
[0007] As described above, the intra prediction mode generates a predicted image using reference pixels. However, since the intra prediction mode performs encoding processing in the order of Z scan described later, there is a case where the upper right and lower left reference pixels of the CU are not completely decoded.
[0008] In such a case, a predicted image is generated using a value obtained by performing zero-order extrapolation on the most recent decoded reference pixel as a reference pixel (see, for example, Non-Patent Document 1).
[0009] In addition, in HEVC, for blocks that do not have adjacent decoded reference pixels, such as the upper leftmost block in the frame, reference pixels used in generating predicted images are created by filling them with specified values (for example, "512" for a 10-bit moving image).
[0010] As described above, when there are reference pixels that have not been decoded yet, if directional prediction is performed starting from the direction in which the reference pixels that have not been decoded yet are located, the prediction accuracy decreases, thereby causing a decrease in encoding efficiency.
[0011] Therefore, the following techniques are known in intra-frame prediction: in addition to the Z scan, the coding process order is given freedom by means of inverse N scan (the coding process order is upper right CU → lower right CU → upper left CU → lower left CU) and inverse Z scan (the coding process order is lower left CU → lower right CU → upper left CU → upper right CU), thereby improving the prediction accuracy (refer to non-patent document 2).
[0012] In the technology specified in Non-Patent Document 2, after transmitting a flag indicating what encoding process order is used in units of CUs, a flag indicating an intra prediction mode applicable to each CU is transmitted.
[0013] In addition, in the technology specified in Non-Patent Literature 2, similarly to HEVC, the intra prediction mode of each CU is selected from 35 fixed intra prediction modes, and the entropy coding process of the transmitted intra prediction mode also becomes the same as that of HEVC.
[0014] Prior art literature
[0015] Non-patent literature
[0016] Non-patent document 1: Editor-in-chief Ei Okubo, "Standard Textbook of Standard Textbook H.265 / HEVC Textbook"
[0017] Non-patent document 2: Xiulian Peng et al., "Improved intra frame coding by PU / TUreordering", JVTVC-C275, October 2010 Summary of the invention
[0018] Problem that the invention aims to solve
[0019] However, as described in Non-Patent Document 2, even when the encoding process order (scan order) can be selected and the inverse Z scan or N scan is selected, there is a problem that the accuracy of intra-frame prediction may be reduced.
[0020] For example, Fig.14 As shown, when the reverse Z scan is selected for the encoding processing order for the divided CUs, intra-frame prediction processing is performed in the order of CU#3 (lower left CU) →CU#4 (lower right CU) →CU#1 (upper left CU) →CU#2 (upper right CU).
[0021] Here, if Fig.14 As shown in the example of , when the intra prediction mode of each CU is an intra prediction mode that uses adjacent reference pixels on the left or upper side, the encoding process is performed with inverse Z scanning. Therefore, for CU#4 (CU at the lower right) or CU#3 (CU at the lower left), it becomes impossible to use the reference pixels on the upper side that can be referenced if Z scanning is used.
[0022] That is, Fig.14 As shown in the example of , when the reverse Z scan is selected, the possibility of selecting the intra-frame prediction mode using the reference pixel located on the left or upper side becomes low.
[0023] As described above, in non-patent document 2, although there is a deviation in the probability of the intra-frame prediction mode selected based on the encoding processing order, the entropy encoding of the mark indicating the intra-frame prediction mode is still the same as HEVC, and the deviation in the probability of the above-mentioned intra-frame prediction mode is not taken into consideration.
[0024] Furthermore, in non-patent document 2, the encoding device needs to try all combinations of which intra prediction mode to select for each CU in all selectable encoding process orders, which leads to a problem that the calculation time on the encoding device side increases.
[0025] Therefore, the present invention is made to solve the above-mentioned problems, and an object of the present invention is to provide an encoding device, a decoding device and a program that can reduce the amount of information transmitted by the encoding device, reduce the calculation time on the encoding device side and improve the encoding efficiency.
[0026] Means used to solve problems
[0027] The first feature of the present invention is a coding device that divides an original image of a frame unit constituting a moving image into multiple blocks and encodes the blocks. The main point is that the coding device includes: a coding process order determination unit that determines the coding process order of the object block to be encoded; a generation unit that generates intra-frame prediction mode candidates for the object block based on the determined coding process order; an intra-frame prediction mode determination unit that determines the intra-frame prediction mode applied to the object block from the generated intra-frame prediction mode candidates; an intra-frame prediction unit that performs intra-frame prediction processing on the object block based on the determined coding process order and the determined intra-frame prediction mode; and an entropy coding unit that performs entropy coding processing on the determined coding process order and the determined intra-frame prediction mode.
[0028] The second feature of the present invention is a decoding device that decodes each block obtained by dividing an image into frame units constituting a moving image, and its main point is that the decoding device includes: a decoding process order acquisition unit that obtains a decoding process order of a decoded object block by performing entropy decoding processing on a stream output from an encoding device; a generation unit that generates intra-frame prediction mode candidates for the object block based on the acquired decoding process order; an intra-frame prediction mode acquisition unit that performs entropy decoding processing on the stream based on the generated intra-frame prediction mode candidates, thereby obtaining an intra-frame prediction mode applied to the object block; and an intra-frame prediction unit that performs intra-frame prediction processing on the object block based on the acquired decoding process order and the acquired intra-frame prediction mode.
[0029] The third feature of the present invention is, in its essence, a program for causing a computer to function as the encoding device according to the first feature.
[0030] A fourth feature of the present invention is, as its essence, a program for causing a computer to function as the decoding device according to the second feature.
[0031] Effects of the Invention
[0032] According to the present invention, it is possible to provide an encoding device, a decoding device, and a program that can reduce the amount of information transmitted by the encoding device, reduce the calculation time on the encoding device side, and improve the encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 1 is a diagram showing an example of a functional block configuration of the encoding device according to the first embodiment.
[0034] Figure 2 is a diagram showing an example of a scanning order used in the encoding device and the decoding device according to the first embodiment.
[0035] Figure 3It is a diagram showing an example of the encoding process order (scanning order) used in the encoding device and the decoding device according to the first embodiment.
[0036] Figure 4 This is a diagram showing an example of the full range of intra prediction modes used in the encoding device and the decoding device according to the first embodiment.
[0037] Figure 5 It is a diagram showing an example of intra prediction processing by the encoding device and the decoding device according to the first embodiment.
[0038] Figure 6 It is a diagram showing an example of the functional block configuration of the decoding device according to the first embodiment.
[0039] Figure 7 It is a diagram for explaining a modification example of the first embodiment.
[0040] Figure 8 It is a diagram showing an example of a functional block configuration of a coding process order determination unit of the coding device according to the second embodiment.
[0041] Fig. 9 is a diagram showing one example of the operation of the adjacent block detection section according to the second embodiment.
[0042] Fig.10 This is a diagram showing an example of a functional block configuration of a decoding process order acquisition unit in the decoding device according to the second embodiment.
[0043] Fig.11 This is a diagram showing an example of a functional block configuration of an intra-prediction mode candidate generation unit of an encoding device according to the third embodiment.
[0044] Fig.12 This is a diagram showing an example of the intra prediction mode used in the encoding device and the decoding device according to the third embodiment.
[0045] Fig.13 This is a diagram showing an example of a functional block configuration of an intra prediction mode candidate generation unit of a decoding device according to the third embodiment.
[0046] Fig.14 This is a diagram for explaining the prior art. DETAILED DESCRIPTION
[0047] (First Embodiment)
[0048] Below, refer to Figures 1 to 6 The encoding device 1 and the decoding device 3 according to the first embodiment of the present invention will be described.
[0049] Here, the encoding device 1 and the decoding device 3 according to this embodiment correspond to intra-frame prediction in a moving picture encoding method such as HEVC. In addition, the encoding device 1 and the decoding device 3 according to this embodiment can correspond to any moving picture encoding method as long as it is a moving picture encoding method that performs intra-frame prediction.
[0050] According to the encoding device 1 of this embodiment, an original image constituting a frame unit of a moving image is divided into encoding target CUs and encoded. In the following, in this embodiment, a case where an original image constituting a frame unit of a moving image is recursively divided into quadtrees and encoded is taken as an example for explanation.
[0051] like Figure 1 As shown, the encoding device 1 according to the present embodiment includes an encoding process order determination unit 11 , an intra prediction mode candidate generation unit 12 , an intra prediction mode determination unit 13 , an intra prediction unit 14 , and an entropy encoding unit 15 .
[0052] The coding process order determination unit 11 determines (selects) the coding process order (hereinafter referred to as "scanning order") of the coding target CU (coding target block). Specifically, the coding process order determination unit 11 determines the order in which the coding process is performed on each divided CU. In addition, in the decoding device 3, each CU is decoded according to the scanning order determined by the coding process order determination unit 11. Therefore, in the decoding device 3, the scanning order is equivalent to the decoding process order.
[0053] Figure 2 An example of the scanning order selectable by the encoding process order determination unit 11 is shown in FIG. Figure 2 The scanning order shown in (a) is called Z scanning (upper left CU→upper right CU→lower left CU→lower right CU). Figure 2 The scanning order shown in (b) is called inverse Z scanning (lower left CU → lower right CU → upper left CU → upper right CU). Figure 2 The scanning order shown in (c) is called N scan (upper right CU→lower right CU→upper left CU→lower left CU).
[0054] In this specification, the following description takes the Z scan, the reverse Z scan, and the N scan that can be selected by the encoding process order determination unit 11 as examples, but except Figure 2 In addition to the scanning sequence shown, the present invention can also be applied Figure 3 Here, in the application Figure 3 In the case of the scanning order shown in (a), the same processing as N scanning can be applied. Figure 3In the case of the scanning order shown in (b), the same processing as the reverse Z scan can be applied.
[0055] The intra prediction mode candidate generator 12 generates intra prediction mode candidates for the encoding target CU based on the scanning order determined (selected) by the encoding process order determiner 11. In the following, an intra prediction mode applicable in HEVC is described as an example.
[0056] like Figure 4 As shown, 35 intra prediction modes are classified into A, B, and C according to the reference direction. In the present embodiment, the intra prediction mode of HEVC is described as an example, but it is also applicable to any encoding process that performs intra prediction using adjacent decoded reference pixels.
[0057] In HEVC, a total of 9 intra-frame prediction modes from mode 2 to mode 10 are classified as category A, a total of 15 intra-frame prediction modes from mode 11 to mode 25 are classified as category B, and a total of 9 intra-frame prediction modes from mode 26 to mode 34 are classified as category C.
[0058] In addition, in methods other than HEVC, for the mode for directional prediction in the applicable intra-frame prediction mode, the mode is set as follows: the intra-frame prediction mode group that does not utilize the reference pixels located on the upper side is set as category A; the intra-frame prediction mode group that does not utilize the reference pixels located on the left side is set as category C; the intra-frame prediction mode group that utilizes both the reference pixels located on the upper side and the left side is set as category B.
[0059] The intra prediction mode candidate generator 12 generates intra prediction mode candidates for the encoding target CU based on the scanning order determined by the encoding process order determiner 11 .
[0060] For example, when the scanning order determined by the encoding processing order determination unit 11 is Z scan, as in the case of HEVC, the intra-frame prediction mode candidate generation unit 12 uses three categories of A, B, and C, the DC mode, and the Planar mode as intra-frame prediction mode candidates selectable for each CU.
[0061] On the other hand, when the encoding process order determined by the encoding process order determination unit 11 is the reverse Z scan, the intra prediction mode candidate generation unit 12 uses the intra prediction mode belonging to category A, the DC mode, and the Planar mode as intra prediction mode candidates selectable for each CU.
[0062] Furthermore, when the scan order determined by the encoding process order determination unit 11 is N scan, the intra prediction mode candidate generation unit 12 uses the intra prediction mode belonging to category C, the DC mode, and the Planar mode as intra prediction mode candidates selectable for each CU.
[0063] The intra-prediction mode determination unit 13 determines the intra-prediction mode to be applied to the encoding target CU from the intra-prediction mode candidates generated by the intra-prediction mode candidate generation unit 12. For example, the intra-prediction mode determination unit 13 determines the intra-prediction mode to be applied to each CU from the intra-prediction modes belonging to the category determined by the intra-prediction mode candidate generation unit 12 by optimization on the encoding device 1 side.
[0064] The intra prediction unit 14 performs intra prediction processing on the encoding target CU based on the scanning order determined by the encoding process order determination unit 11 and the intra prediction mode determined by the intra prediction mode determination unit 13. Specifically, the intra prediction unit 14 performs intra prediction processing on the encoding target CU according to the intra prediction mode applied to each CU and the position of the decoded reference pixels adjacent to each CU.
[0065] Below, refer to Figure 5 An example of the intra prediction process according to the present embodiment will be described.
[0066] As described above, when the scan order determined by the encoding process order determination unit 11 is the reverse Z scan, the intra prediction mode candidate generation unit 12 uses the intra prediction mode belonging to category A, the DC mode, and the Planar mode as intra prediction mode candidates selectable for each CU.
[0067] like Figure 5 (a) and Figure 5 As shown in (b), the intra prediction unit 14 performs intra prediction processing on CU#3 (CU on the lower left) and CU#4 (CU on the lower right) in the same manner as in the conventional HEVC. In HEVC, when performing intra prediction processing, decoded images are sequentially generated, so that the decoded images can be reused in the intra prediction processing of the CU that is subsequently encoded.
[0068] Therefore, if Figure 5 (c) and Figure 5 As shown in (d), when the intra-frame prediction unit 14 performs intra-frame prediction for CU#1 (CU on the upper left) and CU#2 (CU on the upper right), since the CUs located on the lower side (CU#3 and CU#4) are decoded, the decoded images of these CUs can be reused as reference pixels.
[0069] Therefore, when the scanning order of each CU is the reverse Z scan, the intra prediction unit 14 performs intra prediction processing on the decoded CU below the CU, using at least reference pixels adjacent to the lower and left sides, instead of performing intra prediction processing in normal HEVC.
[0070] Similarly, when the scanning order of each CU is N scan, the intra prediction unit 14 performs intra prediction processing on the decoded CU on the right side using at least reference pixels adjacent to the right and above, instead of performing intra prediction processing in normal HEVC.
[0071] The entropy coding unit 15 performs entropy coding processing on the scanning order determined by the coding process order determination unit 11 and the intra-frame prediction mode determined by the intra-frame prediction mode determination unit 13. Specifically, Figure 1 As shown, the entropy coding unit 15 includes a coding process order coding unit 151 and an intra prediction mode coding unit 152 .
[0072] The encoding process order encoding unit 151 performs entropy encoding processing on the scanning order determined by the encoding process order determination unit 11 .
[0073] The intra prediction mode encoding unit 152 performs entropy encoding processing on the intra prediction mode based on the intra prediction mode candidates generated by the intra prediction mode candidate generation unit 12 and the intra prediction mode determined by the intra prediction mode determination unit 13 .
[0074] In conventional HEVC, a 5-bit flag information stream is output for 32 intra prediction modes out of 35 intra prediction modes except for three intra prediction modes registered as the most probable modes (MPM) arranged in order of high probability of being selected.
[0075] In addition, in the conventional HEVC, the intra prediction mode applied to the blocks above and to the left adjacent to the encoding target CU is registered as the MPM.
[0076] On the other hand, in the present embodiment, when the intra-prediction mode coding unit 152 determines that only the intra-prediction mode, DC mode, and Planar mode belonging to category A can be selected by the intra-prediction mode candidate generation unit 12 (i.e., when it is determined that the inverse Z scan is applied to the CU to be coded), or when it is determined that only the intra-prediction mode, DC mode, and Planar mode belonging to category C can be selected by the intra-prediction mode candidate generation unit 12 (i.e., when it is determined that the N scan is applied to the CU to be coded), the intra-prediction modes that may be selected become a total of 10. In this case, it can be configured as follows: for 7 modes other than the 3 intra-prediction modes registered as MPM, a 3-bit flag information stream is output. According to this configuration, the amount of information required for encoding the intra-prediction mode can be reduced, and the encoding efficiency can be improved.
[0077] In this embodiment, there is a case where not only the blocks adjacent to the upper and left sides of the CU to be encoded but also the blocks adjacent to the upper and right sides of the CU to be encoded are decoded. Therefore, the intra-frame prediction mode encoding unit 152 determines the position of the encoded CU to be referenced for registration as the MPM based on the scanning order applied to the CU to be encoded.
[0078] Specifically, when the scanning order of the encoding object CU is the Z scanning order, the intra-frame prediction mode encoding unit 152 will register the intra-frame prediction mode applied to the encoded CU located on the left and upper sides as MPM. When the scanning order of the encoding object CU is the reverse Z scanning order, the intra-frame prediction mode applied to the encoded CU located on the left and lower sides will be registered as MPM. When the scanning order of the encoding object CU is the N scanning order, the intra-frame prediction mode applied to the encoded CU located on the right and upper sides will be registered as MPM.
[0079] In the above example, the case of fixed-length coding is described using 3 bits as an example, but when entropy coding is performed using variable-length coding, context-based adaptive arithmetic coding (CABAC), etc., the number of bits of the stream output is not limited to 3 bits.
[0080] In addition, the decoding device 3 according to the present embodiment decodes each CU obtained by dividing the image of the frame unit constituting the moving image. Here, the decoding device 3 according to the present embodiment decodes the block obtained by recursively quadtree-dividing the image of the frame unit by the encoding device 1 according to the present embodiment.
[0081] like Figure 6 As shown, the decoding device 3 according to the present embodiment includes an entropy decoding unit 31 , an intra prediction mode candidate generation unit 32 , and an intra prediction unit 33 .
[0082] The entropy decoding unit 31 acquires the scanning order of the decoding target CU by performing entropy decoding processing on the stream output from the encoding device 1. Specifically, the entropy decoding unit 31 includes a decoding processing order acquisition unit 311 and an intra prediction mode acquisition unit 312.
[0083] The decoding process order acquisition unit 311 performs entropy decoding processing on the stream output from the encoding device 1 to acquire flag information indicating the scanning order for each CU.
[0084] The intra prediction mode candidate generation unit 32 generates intra prediction mode candidates for the decoding target CU based on the scan order indicated by the flag information acquired by the decoding process order acquisition unit 311 .
[0085] Specifically, similarly to the intra-prediction mode candidate generation unit 12 constituting the encoding device 1, the intra-prediction mode candidate generation unit 32 generates the intra-prediction mode candidate based on the scanning order applied to each CU. Figure 4 The intra prediction mode candidates applicable to each CU in the categories A, B, C, DC mode, and Planar mode are shown.
[0086] The intra prediction mode acquisition unit 312 performs entropy decoding processing on the stream output from the encoding device 1 based on the intra prediction mode candidates generated by the intra prediction mode candidate generation unit 32 , thereby acquiring an intra prediction mode applied to each CU.
[0087] The intra prediction unit 33 performs intra prediction processing on the decoding target CU based on the scanning order obtained by the decoding process order acquisition unit 311 and the intra prediction mode obtained by the intra prediction mode acquisition unit 312. Specifically, the intra prediction unit 33 performs intra prediction processing based on the intra prediction mode applied to each CU and the positions of decoded reference pixels adjacent to each CU, similarly to the intra prediction unit 14 constituting the encoding device 1.
[0088] According to the encoding device 1 and the decoding device 3 of this embodiment, the encoding device 1 controls the scanning order, thereby improving the intra-frame prediction efficiency. In addition, the amount of information of the intra-frame prediction mode transmitted based on the applied scanning order can be reduced, thereby improving the encoding efficiency.
[0089] (Modification of the first embodiment)
[0090] Next, the encoding device 1 and the decoding device 3 according to the first embodiment described above will be described with reference to Figure 7 An encoding device 1 and a decoding device 3 according to a modification of the first embodiment of the present invention will be described.
[0091] The encoding device 1 according to the present variation divides an original image, which is a frame unit constituting a moving image, into CUs by recursive binary tree partitioning and performs encoding.
[0092] In the above-mentioned first embodiment, the determination of the scanning order of the CU divided by quadtree partitioning, the generation of intra-frame prediction mode candidates, and the entropy coding processing of the intra-frame prediction mode and the scanning order are recorded, but in this variant example, the case where binary tree partitioning is applied to the CU is recorded.
[0093] When binary tree partitioning is applied to a CU, it is possible to further select from two partitioning methods: a case of partitioning into two vertically long CUs and a case of partitioning into two horizontally long CUs.
[0094] In addition, when split into two vertically long CUs, it is possible to select Figure 7 The left-right sequential scanning of CU#1 (CU on the left) →CU#2 (CU on the right) shown in (a) and Figure 7 (b) shows two scanning orders of left and right inverse scanning of CU#2 (CU on the right)→CU#1 (CU on the left).
[0095] On the other hand, when the CU is split into two horizontally long CUs, it is possible to select Figure 7 The top-to-bottom sequential scanning of CU#1 (upper CU) → CU#2 (lower CU) shown in (c) and Figure 7 (d) shows two scanning orders of up and down reverse scanning of CU#2 (lower CU)→CU#1 (upper CU).
[0096] When a CU is divided into two vertically long CUs, the encoding process order determination unit 11 determines which scanning order to apply, horizontal sequential scanning or horizontal reverse scanning.
[0097] On the other hand, when the CU is divided into two horizontally long CUs, the encoding process order determination unit 11 determines which scanning order to apply, the top-bottom sequential scanning or the top-bottom reverse scanning.
[0098] The intra prediction mode candidate generator 12 generates intra prediction mode candidates applicable to each CU based on the scan order determined by the encoding process order determiner 11 .
[0099] The intra-frame prediction process according to this modification example is described below.
[0100] When the scanning order determined by the encoding processing order determination unit 11 is left-right sequential scanning and top-bottom sequential scanning, the intra-frame prediction mode candidate generation unit 12 uses the three categories of A, B, and C, the DC mode, and the Planar mode as selectable intra-frame prediction mode candidates for each CU (i.e., the same as the intra-frame prediction mode candidates in HEVC).
[0101] On the other hand, when the scanning order determined by the encoding process order determination unit 11 is left-right inverse scanning, the intra prediction mode candidate generation unit 12 uses the intra prediction mode belonging to category C, the DC mode, and the Planar mode as selectable intra prediction mode candidates for each CU.
[0102] When the scanning order determined by the encoding process order determination unit 11 is the top-bottom reverse scanning order, the intra prediction mode candidate generation unit 12 uses the intra prediction mode, DC mode, and Planar mode belonging to category A as selectable intra prediction mode candidates for each CU.
[0103] In addition, in the first embodiment described above, the case of recursive quadtree partitioning is described, and in this modification, the case of recursive binary tree partitioning is described, but for these encoding methods that can be recursively partitioned and can be selected, it is possible to switch between the quadtree partitioning and the binary tree partitioning according to which partitioning is selected for each CU. That is, it is also possible to configure such that the encoding target CU can be obtained by recursively applying at least one of the quadtree partitioning and the binary tree partitioning to the original image.
[0104] (Second Embodiment)
[0105] Next, the encoding device 1 and the decoding device 3 according to the first embodiment described above will be described with reference to Figures 8 to 10 , Table 1 illustrates the encoding device 1 and the decoding device 3 according to the second embodiment of the present invention.
[0106] The encoding device 1 according to the present embodiment divides an original image in a frame unit constituting a moving image into CUs by recursive quadtree division and performs encoding.
[0107] In the first embodiment described above, the encoding process order determination unit 11 determines which of the three scanning orders of Z scan, inverse Z scan and N scan is applied to the CU after quadtree division, and the encoding process order encoding unit 151 performs entropy encoding on the determined scanning order.
[0108] On the other hand, the encoding process order determination unit 11 of the present embodiment generates selectable scanning orders, i.e., processing order candidates, for sub-CUs (sub-blocks) obtained by quadtree-dividing the CU based on information on whether each block adjacent to the upper, lower, left, and right sides of the encoding target CU has been encoded, and determines which scanning order to apply from the generated processing order candidates. In addition, the encoding process order encoder 151 according to the present embodiment performs entropy encoding on the scanning order determined by the encoding process order determination unit 11.
[0109] Figure 8An example of the functional block structure of the encoding process order determination unit 11 according to this embodiment is shown in FIG. Figure 8 As shown, the encoding process order determination unit 11 according to the present embodiment includes a neighboring block detection unit 11 a , a process order candidate generation unit 11 b , and a process order determination unit 11 c .
[0110] The adjacent block detection unit 11 a detects whether blocks located above, below, and to the left and right of the encoding target CU have been encoded, and based on the detection result, outputs an available_block flag to the processing order candidate generation unit 11 b . Fig. 9 An example of the operation of the adjacent block detection unit 11a according to the present embodiment is shown in FIG. Fig. 9 In the figure, in the encoding target CU, the position corresponding to the encoded adjacent block is indicated by a bold line.
[0111] like Fig. 9 As shown, when only the left side and the top side of the encoding target CU have been encoded (the same as the conventional HEVC), the adjacent block detection unit 11a sets the available_block flag to 0 and outputs it. When only the left side of the CU has been encoded, the adjacent block detection unit 11a sets the available_block flag to 1 and outputs it. When only the top side of the CU has been encoded, the adjacent block detection unit 11a sets the available_block flag to 2 and outputs it. When only the top, left and bottom sides of the CU have been encoded, the adjacent block detection unit 11a sets the available_block flag to 3 and outputs it. When only the top, left and right sides of the CU have been encoded, the adjacent block detection unit 11a sets the available_block flag to 4 and outputs it. When only the left and bottom sides of the CU have been encoded, the adjacent block detection unit 11a sets the available_block flag to 5 and outputs it. When only the top and right sides of the CU have been encoded, the adjacent block detection unit 11a sets the available_block flag to 6 and outputs it.
[0112] The processing order candidate generating unit 11 b generates processing order candidates, which are candidates of scan orders selectable when the encoding target CU is further quadtree-divided, based on the available_block flag output by the adjacent block detecting unit 11 a .
[0113] Specifically, as shown in Table 1, when the available_block mark output by the adjacent block detection unit 11a is 0, the processing order candidate generation unit 11b outputs the Z scan, the inverse Z scan, and the N scan to the processing order determination unit 11c as processing order candidates. When the available_block mark is 1, the processing order candidate generation unit 11b outputs the Z scan and the inverse Z scan to the processing order determination unit 11c as processing order candidates. When the available_block mark is 2, the processing order candidate generation unit 11b outputs the Z scan and the N scan to the processing order determination unit 11c as processing order candidates. When the available_block mark is 3, the processing order candidate generation unit 11b outputs the Z scan and the inverse Z scan to the processing order determination unit 11c as processing order candidates. When the available_block mark is 4, the processing order candidate generation unit 11b outputs the Z scan and the N scan to the processing order determination unit 11c as processing order candidates. When the available_block mark is 5, the processing order candidate generation unit 11b outputs the Z scan and the inverse Z scan to the processing order determination unit 11c as processing order candidates. When the available_block flag is 6, the processing order candidate generating unit 11 b outputs the Z scan and the N scan as processing order candidates to the processing order determining unit 11 c .
[0114] [Table 1]
[0115] available_block Z-scan Inverse Z scan N-Scan 0 ○ ○ ○ 1 ○ ○ × 2 ○ × ○ 3 ○ ○ × 4 ○ × ○ 5 ○ ○ × 6 ○ × ○
[0116] However, the processing order selectable based on the available_block flag is not limited to the example shown in Table 1 as long as it is predetermined by the encoding device 1 and the decoding device 3 .
[0117] The processing order determination unit 11 c determines which scanning order to apply from among the processing order candidates generated by the processing order candidate generation unit 11 b .
[0118] Furthermore, the encoding process order encoding unit 151 according to the present embodiment performs entropy encoding on the scanning order determined by the encoding process order determination unit 11 (processing order determination unit 11c) based on the process order candidates output by the process order candidate generation unit 11b.
[0119] Specifically, when there are three processing order candidates output by the processing order candidate generation unit 11b, the encoding processing order encoding unit 151 first entropy encodes the flag Zscan_flag indicating whether it is a Z scan order. When the scanning order of the encoding target CU (sub-CU) after segmentation is a Z scan order, the encoding processing order encoding unit 151 sets Zscan_flag to 1 and performs entropy encoding, and ends the processing. On the other hand, when the scanning order of the encoding target CU after segmentation is not a Z scan order, the encoding processing order encoding unit 151 sets Zscan_flag to 0 and performs entropy encoding, and also entropy encodes the scan_mode_flag flag indicating which scanning order of the inverse Z scan and the N scan is applied.
[0120] On the other hand, when there are two processing order candidates output by the processing order candidate generation unit 11b, the encoding processing order encoding unit 151 only performs entropy encoding on Zscan_flag indicating whether it is a Z scan order. When the scan order of the encoding target CU after the division is the Z scan order, the encoding processing order encoding unit 151 sets Zscan_flag to 1 and performs entropy encoding, and ends the processing. On the other hand, even when the scan order of the encoding target CU after the division is not the Z scan order, the encoding processing order encoding unit 151 ends the processing without performing entropy encoding on scan_mode_flag because the scanning order to be applied can be uniquely determined.
[0121] Fig.10 2 shows an example of a functional block configuration of the decoding process order acquisition unit 311 of the decoding device 3 according to the present embodiment. The decoding process order acquisition unit 311 performs entropy decoding on the stream output from the encoding device 1 to acquire flag information indicating a scanning order for each CU.
[0122] Specifically, Fig.10 As shown, the decoding process order acquisition unit 311 includes a neighboring block detection unit 311 a , a process order candidate generation unit 311 b , and a process order determination unit 311 c .
[0123] The adjacent block detection unit 311a detects whether the blocks located above, below, left, and right of the decoding target CU have been decoded, and based on the detection result, outputs an available_block flag to the processing order candidate generation unit 311b (see Fig. 9 ).
[0124] The processing order candidate generation unit 311b generates processing order candidates that are candidates for scan orders selectable for the divided decoding target CU (sub-CU) based on the available_block flag output by the adjacent block detection unit 311a (see Table 1).
[0125] The processing order determination unit 311 c determines which scan order to apply from the processing order candidates generated by the processing order candidate generation unit 311 b , based on the flag information transmitted from the encoding device 1 .
[0126] Specifically, when there are three processing order candidates output by the processing order candidate generation unit 311b, the processing order determination unit 311c first decodes the flag Zscan_flag indicating whether it is the Z scan order. When Zscan_flag is 1, the processing order determination unit 311c determines that the scanning order of the decoding target CU (sub-CU) after the division is the Z scan order. On the other hand, when Zscan_flag is 0, the processing order determination unit 311c also decodes the scan_mode_flag flag indicating which scanning order of the inverse Z scan and the N scan is applied.
[0127] On the other hand, when there are two processing order candidates output by the processing order candidate generation unit 311b, the processing order determination unit 311c only decodes the Zscan_flag indicating whether it is the Z scan order. When Zcan_flag is 1, the processing order determination unit 311c determines that the scan order of the decoding target CU (sub-CU) after the division is the Z scan order. On the other hand, when Zscan_flag is 0, since the processing order determination unit 311c can uniquely determine the scan order to be applied, the processing order determination unit 311c ends the processing without decoding scan_mode_flag.
[0128] According to the encoding device 1 and the decoding device 3 of this embodiment, the encoding device 1 controls the scanning order based on the information of whether the surrounding blocks have been encoded, so that the intra-frame prediction efficiency can be improved. In addition, the amount of information of the scanning order and the amount of information of the intra-frame prediction mode to be transmitted can be reduced. Therefore, the coding efficiency can be improved.
[0129] (Variation of the Second Embodiment)
[0130] Hereinafter, the encoding device 1 and the decoding device 3 according to the modification of the second embodiment of the present invention will be described with reference to Table 2, focusing on the differences from the encoding device 1 and the decoding device 3 according to the second embodiment described above.
[0131] The encoding device 1 according to the present variation divides an original image, which is a frame unit constituting a moving image, into CUs by recursive binary tree partitioning and performs encoding.
[0132] In the above-mentioned second embodiment, the determination of the scanning order of the CU divided by quadtree partitioning, the generation of intra-frame prediction mode candidates, and the entropy coding processing for the intra-frame prediction mode and the scanning order are recorded, but in this variant example, the case where binary tree partitioning is applied to the CU is recorded.
[0133] When binary tree partitioning is applied to a CU, it is possible to further select from two partitioning methods: a case of partitioning into two vertically long CUs and a case of partitioning into two horizontally long CUs.
[0134] In addition, when split into two vertically long CUs, it is possible to select Figure 7 The left-right sequential scanning of CU#1 (CU on the left) →CU#2 (CU on the right) shown in (a) and Figure 7 (b) shows two scanning orders of left and right inverse scanning of CU#2 (CU on the right)→CU#1 (CU on the left).
[0135] On the other hand, when the CU is split into two horizontally long CUs, it is possible to select Figure 7 The top-to-bottom sequential scanning of CU#1 (upper CU) → CU#2 (lower CU) shown in (c) and Figure 7 (d) shows two scanning orders of up and down reverse scanning of CU#2 (lower CU)→CU#1 (upper CU).
[0136] In this modification, Figure 8 The adjacent block detection unit 11a shown in FIG. 1 detects whether the blocks adjacent to the upper, lower, left, and right sides of the encoding target CU have been encoded, and outputs an available_block flag (see FIG. 11a ) to the processing order candidate generation unit 11b based on the detection result. Fig. 9 ).
[0137] The processing order candidate generation unit 11b generates the processing order candidates shown in Table 2 based on the available_block flag output by the adjacent block detection unit 11a, and outputs the generated processing order candidates to the processing order determination unit 11c. However, the processing order selectable based on the available_block flag is not limited to the example shown in Table 2 as long as it is predetermined by the encoding device 1 and the decoding device 3.
[0138] [Table 2]
[0139]
[0140] Specifically, when the encoding target CU is binary-tree-split into two vertically-long CUs, the processing order candidate generation unit 11b generates processing order candidates in the following manner. When the available_block flag is any one of 0, 2, 4, and 6, the processing order candidate generation unit 11b generates left-right sequential scanning and left-right reverse sequential scanning as processing order candidates, and when the available_block flag is any one of 1, 3, and 5, the processing order candidate generation unit 11b generates only left-right sequential scanning as processing order candidates.
[0141] On the other hand, when the encoding target CU is binary-tree-split into two horizontally long CUs, the processing order candidate generation unit 11b generates processing order candidates in the following manner. When the available_block flag is any one of 0, 2, 4, and 6, the processing order candidate generation unit 11b generates a top-down sequential scan and a top-down reverse sequential scan as processing order candidates, and when the available_block flag is any one of 1, 3, and 5, the processing order candidate generation unit 11b generates only a top-down sequential scan as a processing order candidate.
[0142] The processing order determination unit 11 c determines which scan order to apply from the processing order candidates generated by the processing order candidate generation unit 11 b , and outputs the determined scan order to the encoding processing order encoding unit 151 .
[0143] The encoding process order encoding unit 151 performs entropy encoding on the scanning order determined by the encoding process order determination unit 11 (processing order determination unit 11 c ) based on the process order candidates output by the process order candidate generation unit 11 b .
[0144] Specifically, when there are two processing order candidates output by the processing order candidate generation unit 11b, the encoding processing order encoding unit 151 entropy encodes the flag scan_flag indicating whether it is a sequential scan. When the encoding processing order of the encoding target CU after the division is a sequential scan, the encoding processing order encoding unit 151 sets scan_flag to 1 and performs entropy encoding, and ends the processing. On the other hand, when the encoding processing order of the encoding target CU after the division is not a sequential scan (when it is a reverse sequential scan), the encoding processing order encoding unit 151 sets scan_flag to 0 and performs entropy encoding, and ends the processing.
[0145] On the other hand, when the processing order candidate generator 11 b outputs one processing order candidate, since there is no need to transmit a flag indicating the scan order to be applied, the encoding processing order encoder 151 ends the processing without entropy encoding scan_flag.
[0146] In the decoding device 3 of this variation, Fig.10 The adjacent block detection unit 311a shown in FIG. 1 detects whether the blocks located above, below, left, and right of the decoding target CU have been decoded, and outputs an available_block flag to the processing order candidate generation unit 311b based on the detection result (see Fig. 9 ).
[0147] The processing order candidate generation unit 311b generates processing order candidates, which are candidates for scan orders selectable for the divided decoding target CU (sub-CU), based on the available_block flag output by the adjacent block detection unit 311a (see Table 2).
[0148] The processing order determination unit 311 c determines which scan order to apply from the processing order candidates based on the processing order candidates generated by the processing order candidate generation unit 311 b and the flag information transmitted from the encoding device 1 .
[0149] Specifically, when there are two processing order candidates output by the processing order candidate generation unit 311b, the processing order determination unit 311c decodes the flag scan_flag indicating whether it is a sequential scan. When scan_flag is 1, the processing order determination unit 311c determines that the scanning order of the decoding target CU (sub-CU) after the split is a sequential scan, and when scan_flag is 0, the processing order determination unit 311c determines that the scanning order of the decoding target CU (sub-CU) after the split is a reverse sequential scan.
[0150] On the other hand, when the number of processing order candidates output by the processing order candidate generating unit 311 b is one, the processing order determining unit 311 c ends the processing without decoding scan_flag.
[0151] According to the encoding device 1 and the decoding device 3 of this variation, the encoding device 1 controls the scanning order based on information on whether surrounding blocks have been encoded, thereby improving the efficiency of intra-frame prediction. In addition, the amount of information on the transmitted scanning order and the amount of information on the intra-frame prediction mode can be reduced, thereby improving the encoding efficiency.
[0152] (Third Embodiment)
[0153] Next, the differences between the encoding device 1 and the decoding device 3 according to the third embodiment described above will be described with reference to Figures 11 to 13 , Table 3 illustrates the encoding device 1 and the decoding device 3 according to the second embodiment of the present invention.
[0154] The encoding device 1 according to the present embodiment divides an original image, which is a frame unit constituting a moving image, into CUs by recursive quadtree division and performs encoding.
[0155] In the above-mentioned second embodiment, the processing order candidate generation unit 11b generates a processing order candidate indicating which of the three scanning orders of Z scanning, inverse Z scanning and N scanning can be selected for the CU after quadtree segmentation according to whether the upper, lower, left and right adjacent blocks have been encoded, the processing order determination unit 11c determines which scanning order among the generated processing order candidates to apply, and the intra-frame prediction mode candidate generation unit 12 determines the intra-frame prediction mode candidates applicable to each CU (sub-CU) after segmentation based on the determined scanning order.
[0156] On the other hand, the encoding device 1 of the present embodiment determines candidates of intra prediction modes applicable to each CU divided into quadtrees based on information on whether vertically and horizontally adjacent blocks have been encoded and the scanning order to be applied.
[0157] Specifically, in the encoding device 1 of this embodiment, as Fig.11 As shown, the intra prediction mode candidate generation unit 12 includes a neighboring block detection unit 12a and a sub-CU intra mode candidate generation unit 12b.
[0158] The adjacent block detection unit 12a performs the same processing as the adjacent block detection unit 11a of the second embodiment described above. However, while the adjacent block detection unit 11a of the second embodiment outputs an available_block flag indicating whether the blocks located above, below, left, and right of the encoding target CU have been encoded, the adjacent block detection unit 12a of this embodiment outputs an available_block flag indicating whether the adjacent blocks of each CU (sub-CU) after further quadtree division of the CU have been encoded.
[0159] When the encoding target CU is further quadtree-partitioned, the sub-CU intra mode candidate generation unit 12b generates intra prediction mode candidates selectable for each sub-CU after the division based on the applied scanning order and the available_block flag input from the neighboring block detection unit 12a.
[0160] Here, use Figure 4 , Fig.12 And Table 3 illustrates the operation of the sub-CU intra mode candidate generation unit 12b.
[0161] In HEVC, such as Figure 4As shown, as the directional prediction of the intra-frame prediction, a total of 33 modes from mode 2 to mode 34 are allocated from the lower left direction to the upper right direction. In the first embodiment, the total of 33 modes are classified into a total of three categories of categories A, B, and C, and according to the scanning order determined by the encoding process order determination unit 11, the intra-frame prediction mode, DC mode, and Planar mode corresponding to at least one of categories A, B, and C are generated as applicable intra-frame prediction mode candidates.
[0162] On the other hand, the sub-CU intra mode candidate generation unit 12b of the present embodiment generates a sub-CU intra mode candidate in addition to the A category, the B category, and the C category. Fig.12 As shown in (a), the FlipLR categories are assigned to a total of 33 modes clockwise from the upper left to the lower right, and Fig.12 As shown in (b), the intra prediction mode, DC mode, and Planar mode corresponding to at least one of the FlipUD categories allocated counterclockwise from the upper left to the lower right to a total of 33 modes are selected as applicable intra prediction mode candidates.
[0163] In addition, the number of modes applicable to the FlipLR category and the FlipUD category in HEVC is the same, but the prediction directions are different. The intra prediction mode indicating the prediction direction may be assigned in any manner as long as it is predetermined by the encoding device 1 and the decoding device 3 .
[0164] Specifically, when the encoding object CU is further quadtree-partitioned, the sub-CU intra-mode candidate generation unit 12b generates an intra-prediction mode group, a DC mode, and a Planar mode corresponding to a predetermined category as intra-prediction mode candidates selectable by each sub-CU after the division based on the available_block flag of the sub-CU input from the adjacent block detection unit 12a and the scanning order of the CU determined by the encoding processing order determination unit 11.
[0165] When the CU is quadtree-divided as shown in Table 3, the sub-CU intra-mode candidate generation unit 12b generates intra-prediction mode candidates applicable to each sub-CU based on the scanning order of the divided sub-CUs and whether the blocks adjacent to the top, bottom, left, and right of each divided sub-CU have been decoded.
[0166] [Table 3]
[0167] avaialble_block Z-scan Inverse Z scan N-Scan 0 A, B, C - - 1 A.B A - 2 B.C - C 3 A, B, C FlipUD - 4 A, B, C - FlipLR 5 - FlipUD - 6 - - FlipLR
[0168] For example, in Table 3, when "B, C" is recorded in the category record of the applicable intra-frame prediction mode candidate, the intra-frame prediction mode candidate is composed of the intra-frame prediction mode, DC mode, and Planar mode included in category B and category C. In addition, when it is recorded as "FlipLR", the intra-frame prediction mode candidate is composed of the intra-frame prediction mode, DC mode, and Planar mode that are allocated to the prediction direction of a total of 33 modes clockwise from the upper left direction to the lower right direction.
[0169] In addition, it is shown that there is no CU in the state described by "-" in Table 3. For example, when the CU is quadtree-divided and the sub-CUs after the division are encoded in the reverse Z scan order, the two sub-CUs located at the lower side of the sub-CU after the division do not necessarily have their upper adjacent blocks encoded, so there is no possibility that the available_block flag becomes 0. In addition, the two sub-CUs located at the upper side do not have the possibility that the available_block flag becomes 0 because the lower adjacent blocks are definitely encoded.
[0170] In the decoding device 3 of the present embodiment, the intra-frame prediction mode candidate generation unit 32 is configured similarly to the intra-frame prediction mode candidate generation unit 12 of the encoding device 1. Specifically, Fig.13 As shown, the intra prediction mode candidate generation unit 32 includes a neighboring block detection unit 32a and a sub-CU intra mode candidate generation unit 32b.
[0171] The adjacent block detection unit 32a outputs an available_block flag indicating whether adjacent blocks of each CU (sub-CU) obtained by further quadtree-dividing the decoding target CU have been decoded.
[0172] When the decoding target CU is further quadtree-divided, the sub-CU intra mode candidate generation unit 32b generates intra prediction mode candidates selectable for each sub-CU after the division based on the applied scanning order and the available_block flag input from the adjacent block detection unit 32a (see Table 3).
[0173] According to the encoding device 1 and the decoding device 3 of the present embodiment, the encoding device 1 controls the scanning order and the applicable intra-frame prediction mode candidates based on the information whether the surrounding blocks have been encoded, so that the intra-frame prediction efficiency can be improved. In addition, the amount of information on the scanning order and the amount of information on the intra-frame prediction mode transmitted can be reduced, thereby improving the encoding efficiency.
[0174] (Variation of the Third Embodiment)
[0175] Hereinafter, the encoding device 1 and the decoding device 3 according to the modification of the third embodiment of the present invention will be described with reference to Table 4, focusing on the differences from the encoding device 1 and the decoding device 3 according to the third embodiment described above.
[0176] The encoding device 1 according to the present variation divides an original image, which is a frame unit constituting a moving image, into CUs by recursive binary tree partitioning and performs encoding.
[0177] In the above-mentioned third embodiment, the determination of the scanning order of the CU divided by quadtree partitioning, the generation of intra-frame prediction mode candidates, and the entropy coding processing of the intra-frame prediction mode and the scanning order are recorded, but in this variant example, the case where binary tree partitioning is applied to the CU is recorded.
[0178] When binary tree partitioning is applied to a CU, it is possible to further select from two partitioning methods: a case of partitioning into two vertically long CUs and a case of partitioning into two horizontally long CUs.
[0179] In addition, when split into two vertically long CUs, it is possible to select Figure 7 The left-right sequential scanning of CU#1 (CU on the left) →CU#2 (CU on the right) shown in (a) and Figure 7 (b) shows two scanning orders of left and right inverse scanning of CU#2 (CU on the right)→CU#1 (CU on the left).
[0180] On the other hand, when the CU is split into two horizontally long CUs, it is possible to select Figure 7 The top-to-bottom sequential scanning of CU#1 (upper CU) → CU#2 (lower CU) shown in (c) and Figure 7 (d) shows two scanning orders of up and down reverse scanning of CU#2 (lower CU)→CU#1 (upper CU).
[0181] In this modification, Fig.10 The neighboring block detection unit 12a shown in the figure outputs an available_block flag indicating whether the neighboring blocks of each CU (sub-CU) obtained by further binary tree division of the encoding target CU have been encoded.
[0182] When the encoding target CU is further divided into a binary tree, the sub-CU intra mode candidate generation unit 12b generates intra prediction mode candidates selectable for each sub-CU after the division based on the applied scanning order and the available_block flag input from the neighboring block detection unit 12a.
[0183] When the CU is divided into a binary tree as shown in Table 4, the sub-CU intra-mode candidate generation unit 12b generates intra-prediction mode candidates applicable to each sub-CU based on the scanning order of the divided sub-CUs and whether the blocks adjacent to the top, bottom, left, and right of each divided sub-CU have been decoded.
[0184] [Table 4]
[0185]
[0186] For example, in Table 4, when "B, C" is recorded in the category description of the applicable intra-frame prediction mode candidate, the intra-frame prediction mode candidate is composed of the intra-frame prediction mode, DC mode, and Planar mode included in category B and category C. In addition, when it is recorded as "FlipLR", the intra-frame prediction mode candidate is composed of the intra-frame prediction mode, DC mode, and Planar mode that are allocated to the prediction direction of a total of 33 modes clockwise from the upper left direction to the lower right direction.
[0187] In addition, it is shown that there is no CU in the state recorded as "-" in Table Y. For example, when the CU binary tree is divided into two horizontally long CUs, when the divided sub-CUs are encoded in the reverse scanning order from top to bottom, the sub-CU located at the lower side of the divided sub-CUs does not have the possibility of the available_block mark becoming 0 because the adjacent block on the upper side is not necessarily encoded, and the sub-CU located at the upper side does not have the possibility of the available_block mark becoming 0 because the adjacent block on the lower side is definitely encoded.
[0188] In addition, in the decoding device 3 of this variation, Fig.13 The neighboring block detection unit 32a shown in the figure outputs an available_block flag indicating whether the neighboring blocks of each CU (sub-CU) obtained by further binary tree division of the decoding target CU have been decoded.
[0189] When the decoding target CU is further divided into a binary tree, the sub-CU intra mode candidate generation unit 32b generates intra prediction mode candidates selectable for each sub-CU after the division based on the applied scanning order and the available_block flag input from the adjacent block detection unit 32a (see Table 4).
[0190] According to the encoding device 1 and the decoding device 3 of this variation, the encoding device 1 controls the scanning order and the applicable intra-frame prediction mode candidates based on the information of whether the surrounding blocks have been encoded, so that the intra-frame prediction efficiency can be improved. In addition, the amount of information on the scanning order and the amount of information on the intra-frame prediction mode transmitted can be reduced, thereby improving the encoding efficiency.
[0191] (Other Embodiments)
[0192] As described above, the present invention is described by the above-mentioned embodiments, but the discussion and drawings constituting part of the disclosure of the embodiments should not be understood as limiting the present invention. Various alternative embodiments, examples, and application techniques are obvious to those skilled in the art based on this disclosure.
[0193] In addition, although not specifically mentioned in the above-mentioned embodiment, a program that enables a computer to execute each process performed by the above-mentioned encoding device 1 and decoding device 3 may be provided. In addition, the program may be stored in a computer-readable medium. If a computer-readable medium is used, the program may be installed on a computer. Here, the computer-readable medium storing the program may be a non-transitory storage medium. Non-transitory storage media are, for example, storage media such as CD-ROM and DVD-ROM, but are not particularly limited.
[0194] Alternatively, a chip including a memory storing a program for realizing at least a part of the functions in the above-mentioned encoding device 1 and decoding device 3 and a processor executing the program stored in the memory may be provided.
[0195] The present invention claims the priority of Japanese Patent Application No. 2018-154249 (filed on August 20, 2018), the entire contents of which are incorporated into this specification.
Claims
1. A coding device for dividing an original image of a frame unit constituting a moving image into a plurality of blocks and encoding the blocks, characterized in that: The encoding device comprises: A coding process order determination unit that determines a coding process order of a coding target block; a generation unit that determines positions of reference pixels used in prediction based on the determined encoding process order, and generates intra-prediction mode candidates for the target block based on the positions of the reference pixels used; an intra prediction mode determination unit that determines an intra prediction mode to be applied to the target block from among the generated intra prediction mode candidates; and The intra prediction unit performs intra prediction processing on the target block based on the determined encoding process order and the determined intra prediction mode.
2. A decoding device that decodes each block obtained by dividing an image in frame units constituting a moving image, characterized in that: The decoding device comprises: a decoding process order acquisition unit that acquires a decoding process order of a target block to be decoded by performing entropy decoding processing on a stream output from the encoding device; a generating unit that determines positions of reference pixels used in prediction based on the acquired decoding process order, and generates intra prediction mode candidates for the target block based on the positions of the reference pixels used; and The intra prediction mode acquisition unit performs entropy decoding processing on the stream based on the generated intra prediction mode candidates, thereby acquiring the intra prediction mode applied to the target block.
3. A computer-readable storage medium storing a program which, when executed, causes a computer to function as the encoding device according to claim 1. 4 . A computer-readable storage medium storing a program which, when executed, causes a computer to function as the decoding device according to claim 2 .
