Image processing device and method
By dynamically allocating context encoding bins within image blocks based on image characteristics, the method enhances encoding efficiency and maintains image quality in image processing devices.
Patent Information
- Application Number
- JP2023218038
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-02-07
- Filing Date
- 2023-12-25
- Publication Date
- 2024-10-02
- Estimated Expiration
- 2040-02-06
AI Technical Summary
Existing image encoding methods, such as CABAC, uniformly constrain the number of context-coded bins, leading to a reduction in encoding efficiency due to the inability to locally adjust according to image characteristics, potentially reducing image quality.
An image processing device and method that sets a first upper limit on the number of context encoding bins per block, allowing for dynamic allocation based on image data characteristics, distributing context encoding bins among non-zero subblocks to maintain encoding efficiency.
The solution effectively suppresses reductions in encoding efficiency by allowing flexible allocation of context encoding bins, thereby maintaining image quality and reducing processing overhead.
Smart Images

Figure 0007559917000001 
Figure 0007559917000002 
Figure 0007559917000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an image processing device and method, and more particularly to an image processing device and method capable of suppressing a decrease in encoding efficiency. [Background technology]
[0002] Conventionally, in CABAC image coding, the more the number of context-coded bins when expressing syntax element values, the more the coding efficiency improves and the more the degradation of image quality can be suppressed. However, since the more the number of context-coded bins, the more the amount of processing increases, a method of restricting the number of context-coded bins on a sub-block basis has been proposed (for example, Non-Patent Document 1). [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] T.-D. Chuang, S.-T. Hsiang, Z.-Y. Lin, C.-Y. Chen, Y.-W. Huang, S.-M. Lei (MediaTek), "CE7(Tests 7.1, 7.2, 7.3, and 7.4): Constraints on context-coded bins for coefficient coding", JVET-M0173, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 13th Meeting: Marrakech, MA, 9-18 Jan 2019 Summary of the Invention [Problem to be solved by the invention]
[0004] However, in this method, the number of context-coded bins is uniformly restricted, so it is not possible to locally increase or decrease coefficient data in accordance with the characteristics of an image, which may unnecessarily reduce coding efficiency.
[0005] The present disclosure has been made in consideration of such circumstances, and makes it possible to suppress a decrease in coding efficiency. [Means for solving the problem]
[0006] An image processing device according to one aspect of the present technology is an image processing device that includes: a syntax element value derivation unit that sets a first upper limit value that is an upper limit value of the number of context coding bins that can be assigned to a processing target block including a plurality of sub-blocks; and derives syntax element values for the processing target sub-blocks using coefficient data derived from image data so that the number of context coding bins assigned to the processing target block does not exceed the first upper limit value; and an encoding unit that encodes the derived syntax element values to generate encoded data.
[0007] An image processing method according to one aspect of the present technology is an image processing method that sets a first upper limit value that is an upper limit value for the number of context coding bins that can be assigned to a target block that includes a plurality of sub-blocks, derives syntax element values for the sub-blocks to be processed using coefficient data derived from image data so that the number of context coding bins assigned to the target block does not exceed the first upper limit value, and encodes the derived syntax element values to generate encoded data.
[0008] An image processing device according to another aspect of the present technology is an image processing device including: a decoding unit that decodes encoded data to generate a syntax element value; and a coefficient data derivation unit that sets a first upper limit value that is an upper limit value of the number of context encoding bins that can be assigned to a processing target block including a plurality of sub-blocks, and parses the generated syntax element value and derives coefficient data corresponding to image data for the processing target sub-block such that the number of context encoding bins assigned to the processing target block does not exceed the first upper limit value.
[0009] Another aspect of the image processing method of the present technology is an image processing method that decodes encoded data to generate a syntax element value, sets a first upper limit value that is an upper limit value of the number of context encoding bins that can be assigned to a target block including a plurality of sub-blocks, parses the generated syntax element value for the target sub-blocks so that the number of context encoding bins assigned to the target block does not exceed the first upper limit value, and derives coefficient data corresponding to image data.
[0010] In an image processing device and method according to one aspect of the present technology, a first upper limit value is set, which is an upper limit value for the number of context coding bins that can be assigned to a target block including a plurality of sub-blocks, and for the sub-block to be processed, syntax element values are derived using coefficient data derived from image data so that the number of context coding bins assigned to the target block does not exceed the first upper limit value, and the derived syntax element values are encoded to generate encoded data.
[0011] In an image processing device and method according to another aspect of the present technology, encoded data is decoded to generate syntax element values, a first upper limit value is set which is an upper limit value for the number of context encoding bins that can be assigned to a target block including a plurality of sub-blocks, the generated syntax element values are parsed for the target sub-blocks so that the number of context encoding bins assigned to the target block does not exceed the first upper limit value, and coefficient data corresponding to the image data is derived. [Brief description of the drawings]
[0012] [Figure 1] FIG. 2 is a diagram illustrating a sub-block. [Diagram 2] FIG. 13 is a diagram illustrating method #1. [Diagram 3] FIG. 13 is a diagram for explaining an application example of method #1. [Figure 4] FIG. 2 is a block diagram showing an example of the main configuration of an encoding device. [Diagram 5] FIG. 2 is a block diagram showing an example of the main configuration of CABAC. [Figure 6] 11 is a flowchart illustrating an example of the flow of an encoding process. [Figure 7] 13 is a flowchart illustrating an example of the flow of a syntax element value derivation process. [Figure 8] FIG. 11 is a diagram illustrating an example of syntax. [Figure 9] This is a continuation of FIG. 8 and shows an example of syntax. [Figure 10] This is a sequel to FIG. 9 showing an example of syntax. [Figure 11] This is a continuation of FIG. 10 and shows an example of syntax. [Figure 12] 11 is a flowchart illustrating an example of the flow of CABAC processing. [Figure 13] FIG. 2 is a block diagram showing an example of the main configuration of a decoding device. [Figure 14] FIG. 2 is a block diagram showing an example of the main configuration of CABAC. [Figure 15]13 is a flowchart illustrating an example of the flow of a decoding process. [Figure 16] 11 is a flowchart illustrating an example of the flow of CABAC processing. [Figure 17] 13 is a flowchart illustrating an example of the flow of a coefficient data derivation process. [Figure 18] FIG. 13 is a diagram illustrating method #2. [Figure 19] FIG. 13 is a diagram illustrating an application example of method #2. [Figure 20] 13 is a flowchart illustrating an example of the flow of a syntax element value derivation process. [Figure 21] FIG. 11 is a diagram illustrating an example of syntax. [Figure 22] This is a continuation of Figure 21 and shows an example of syntax. [Diagram 23] This is a continuation of Figure 22 and shows an example of syntax. [Figure 24] This figure is a sequel to Figure 23 and shows an example of syntax. [Diagram 25] 13 is a flowchart illustrating an example of the flow of a coefficient data derivation process. [Figure 26] FIG. 13 is a diagram illustrating method #3. [Figure 27] FIG. 13 is a diagram illustrating an application example of method #3. [Figure 28] 13 is a flowchart illustrating an example of the flow of a syntax element value derivation process. [Figure 29] FIG. 11 is a diagram illustrating an example of syntax. [Diagram 30] This is a sequel to Figure 29 showing an example of syntax. [Diagram 31] This is a continuation of Figure 30 and shows an example of syntax. [Diagram 32] This figure is a sequel to Figure 31 and shows an example of syntax. [Diagram 33] 13 is a flowchart illustrating an example of the flow of a coefficient data derivation process. [Diagram 34] FIG. 13 is a diagram illustrating method #4. [Diagram 35]FIG. 13 is a diagram for explaining an application example of method #4. [Diagram 36] 13 is a flowchart illustrating an example of the flow of a syntax element value derivation process. [Figure 37] 37 is a flowchart continuing from FIG. 36, illustrating an example of the flow of a syntax element value derivation process. [Figure 38] FIG. 11 is a diagram illustrating an example of syntax. [Figure 39] This figure is a sequel to Figure 38 and shows an example of syntax. [Diagram 40] This figure is a sequel to Figure 39 and shows an example of syntax. [Diagram 41] This is a continuation of Figure 40 and shows an example of syntax. [Diagram 42] 13 is a flowchart illustrating an example of the flow of a coefficient data derivation process. [Diagram 43] 43 is a flowchart continuing from FIG. 42, illustrating an example of the flow of the coefficient data derivation process. [Diagram 44] FIG. 13 is a diagram illustrating method #5. [Diagram 45] FIG. 13 is a diagram for explaining an application example of method #5. [Figure 46] FIG. 13 is a diagram illustrating method #6. [Figure 47] FIG. 13 is a diagram illustrating an application example of method #6. [Figure 48] FIG. 13 is a diagram illustrating method #7. [Figure 49] FIG. 13 is a diagram for explaining an application example of method #7. [Figure 50] 13 is a flowchart illustrating an example of the flow of a syntax element value derivation process. [Figure 51] FIG. 11 is a diagram illustrating an example of syntax. [Figure 52] This is a continuation of Figure 51 and shows an example of syntax. [Figure 53] This is a continuation of Figure 52 and shows an example of syntax. [Figure 54] 13 is a flowchart illustrating an example of the flow of a coefficient data derivation process. [Figure 55] FIG. 13 is a diagram illustrating method #8. [Figure 56] FIG. 13 is a diagram for explaining an application example of method #8. [Figure 57] 13 is a flowchart illustrating an example of the flow of a syntax element value derivation process. [Figure 58] 13 is a flowchart illustrating an example of the flow of a coefficient data derivation process. [Figure 59] FIG. 1 is a block diagram showing an example of the main configuration of an image encoding device. [Figure 60] 13 is a flowchart showing an example of the flow of an image encoding process. [Figure 61] FIG. 2 is a block diagram showing an example of the main configuration of an image decoding device. [Figure 62] 13 is a flowchart showing an example of the flow of an image decoding process. [Figure 63] FIG. 1 is a block diagram showing an example of a main configuration of a computer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, modes for carrying out the present disclosure (hereinafter referred to as embodiments) will be described in the following order. 1. CABAC 2. First embodiment (the number of bins in the zero subblock is transferred to the nonzero subblock) 3. Second embodiment (sharing maximum bin within nonzero subblock) 4. Third embodiment (using surplus bins in a nonzero subblock in another nonzero subblock) 5. Fourth embodiment (combination of #1, #2, and #3) 6. Fifth embodiment (application of #1) 7. Sixth embodiment (Extending the unit for managing the number of context coding bins to a size larger than TU (CU, VPDU, CTU, etc.)) 8. Seventh embodiment (removing the upper limit of the maximum number of context encoding bins in the syntax structure) 9. Eighth embodiment (maximizing the number of bins in the nonzero subblock next to the zero subblock) 10. Ninth embodiment (application to image encoding device and image decoding device) 11. Notes
[0014] <1.CABAC> <References supporting technical content and technical terms> The scope of disclosure of the present technology includes not only the contents described in the embodiments, but also the contents described in the following non-patent documents that were publicly known at the time of filing the application, and the contents of other documents referenced in the following non-patent documents.
[0015] Non-patent document 1: (mentioned above) Non-patent document 2: Recommendation ITU-T H.264 (04 / 2017) "Advanced video coding for generic audiovisual services", April 2017 Non-patent document 3: Recommendation ITU-T H.265 (12 / 2016) "High efficiency video coding", December 2016 Non-patent document 4: J. Chen, E. Alshina, GJ Sullivan, J.-R. Ohm, J. Boyce, "Algorithm Description of Joint Exploration Test Model (JEM7)", JVET-G1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 7th Meeting: Torino, IT, 13-21 July 2017 Non-Patent Document 5: B. Bross, J. Chen, S. Liu, "Versatile Video Coding (Draft 3)", JVET-L1001, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 12th Meeting: Macau, CN, 3-12 Oct. 2018 Non-Patent Document 6: J. J. Chen, Y. Ye, S. Kim, "Algorithm description for Versatile Video Coding and Test Model 3 (VTM 3)", JVET-L1002, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 12th Meeting: Macau, CN, 3-12 Oct. 2018 Non-Patent Document 7: J. Boyce (Intel), Y. Ye (InterDigital), Y.-W. Huang (Mediatek), M. Karczewicz (Qualcomm), E. Francois (Technicolor), W. Husak (Dolby), J. Ridge (Nokia), A. Abbas (GoPro), "Two tier test model", JVET-J0093, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 10th Meeting: San Diego, US, 10-20 Apr. 2018 Non-Patent Document 8: S. Yoo, J. Choi, J. Heo, J. Choi, L. Li, J. Lim, S. Kim (LGE), "Non-CE7: Residual rearrangement for transform skipped blocks", JVET-M0278, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 13th Meeting: Marrakech, MA, 9-18 Jan. 2019 Non-Patent Document 9: B. Bross, T. Nguyen, P. Keydel, H. Schwarz, D. Marpe, T. Wiegand (HHI), "Non-CE8: Unified Transform Type Signalling and Residual Coding for Transform Skip", JVET-M0464, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 13th Meeting: Marrakech, MA, 9-18 Jan. 2019 Non-Patent Document 10: Y. Zhao, H. Gao, H. Yang, J. Chen (Huawei), "CE6: Sub-block transform for inter blocks (Test 6.4.1)", JVET-M0140, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 13th Meeting: Marrakech, MA, 9-18 Jan. 2019 Non-patent document 11: S. De-Luxan-Hernandez, V. George, J. Ma, T. Nguyen, H. Schwarz, D. Marpe, T. Wiegand (HHI), "CE3: Intra Sub-Partitions Coding Mode (Tests 1.1.1 and 1.1.2)", JVET-M0102, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 13th Meeting: Marrakech, MA, 9-18 Jan. 2019 Non-patent document 12: B. Bross, J. Chen, S. Liu, "Versatile Video Coding (Draft 4)," JVET-M1001, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 12th Meeting: Macau, CN, 3-12 Oct. 2018
[0016] In other words, the contents described in the above non-patent documents are also the basis for determining the support requirements. For example, even if the Quad-Tree Block Structure and QTBT (Quad Tree Plus Binary Tree) Block Structure described in the above non-patent documents are not directly described in the examples, they are considered to be within the disclosure scope of the present technology and to satisfy the support requirements of the claims. Similarly, for example, technical terms such as parsing, syntax, and semantics are also considered to be within the disclosure scope of the present technology and to satisfy the support requirements of the claims, even if they are not directly described in the examples.
[0017] In addition, in this specification, a "block" (not a block indicating a processing unit) used in the description as a partial region or processing unit of an image (picture) indicates any partial region in a picture, and its size, shape, characteristics, etc. are not limited, unless otherwise specified. For example, a "block" includes any partial region (processing unit) such as a TB (Transform Block), TU (Transform Unit), PB (Prediction Block), PU (Prediction Unit), SCU (Smallest Coding Unit), CU (Coding Unit), LCU (Largest Coding Unit), CTB (Coding Tree Block), CTU (Coding Tree Unit), transform block, sub-block, macroblock, tile, or slice described in the above-mentioned non-patent document.
[0018] In addition, when specifying the size of such a block, the block size may be specified indirectly in addition to directly. For example, the block size may be specified using identification information for identifying the size. For example, the block size may be specified by a ratio or difference with respect to the size of a reference block (for example, LCU or SCU). For example, when transmitting information specifying a block size as a syntax element or the like, the information may be used to indirectly specify the size as described above. In this way, the amount of information can be reduced, and coding efficiency may be improved. The specification of the block size also includes specification of a range of block sizes (for example, specification of a range of allowable block sizes, etc.).
[0019] In this specification, encoding includes not only the whole process of converting an image into a bit stream, but also a part of the process. For example, it includes not only a process including prediction processing, orthogonal transformation, quantization, arithmetic coding, etc., but also a process collectively referring to quantization and arithmetic coding, a process including prediction processing, quantization, and arithmetic coding, etc. Similarly, decoding includes not only the whole process of converting a bit stream into an image, but also a part of the process. For example, it includes not only a process including inverse arithmetic decoding, inverse quantization, inverse orthogonal transformation, prediction processing, etc., but also a process including inverse arithmetic decoding and inverse quantization, a process including inverse arithmetic decoding, inverse quantization, and prediction processing, etc.
[0020] <Number of context coding bins> CABAC (Context-based Adaptive Binary Arithmetic Code), used in image coding such as HEVC (High Efficiency Video Coding), is a coding method that binarizes syntax element values expressing coefficient data derived from image data using a predetermined method, and performs arithmetic coding by switching an occurrence frequency model (context) for each bit of the binarized bit string. The coefficient data is expressed by syntax elements such as sig_flag indicating the sign of the coefficient, gt1_flag indicating whether the absolute value of the coefficient is 1 or not, par_flag indicating whether the coefficient is odd or even, and gt2_flag indicating whether the absolute value of the coefficient is 2 or not.
[0021] In general, the more the number of context-coded bins when expressing syntax element values, the more the coding efficiency improves and the more the degradation of image quality can be suppressed. However, the more the number of context-coded bins, the more the amount of processing increases. Therefore, for example, Non-Patent Document 1 proposes a method of restricting the number of context-coded bins on a sub-block basis.
[0022] However, in this method, the number of context coding bins is uniformly restricted, so that it is not possible to locally increase or decrease coefficient data according to the characteristics of an image, which may unnecessarily reduce coding efficiency, or in other words, reduce the image quality of a decoded image.
[0023] <Variable constraints on the number of context coding bins> Therefore, the constraint on the number of context coding bins for each subblock is made variable. By doing so, it is possible to locally increase or decrease coefficient data in accordance with the characteristics of the image, so that it is possible to suppress the decrease in coding efficiency. In other words, it is possible to suppress the decrease in image quality of the decoded image.
[0024] In this case, for example, the number of bins per block (picture, slice, CTU, VPDU (Virtual Pipeline Data Unit), CU, AU (Access Unit), or TU, etc.) may be the same as when each subblock has a fixed number of context coding bins. In this way, it is possible to suppress a decrease in coding efficiency while suppressing an increase in the amount of processing.
[0025] For example, the number of context coding bins may be distributed among non-zero sub-blocks in a block, and an upper limit may be set for the number of context coding bins assigned to each sub-block. Then, for a current sub-block, syntax element values may be derived from coefficient data corresponding to image data while ensuring that the number of context coding bins does not exceed the upper limit.
[0026] Also, for example, for the sub-block to be processed, the syntax element values may be parsed to derive coefficient data corresponding to image data while ensuring that the number of context coding bins does not exceed its upper limit.
[0027] Furthermore, for example, the number of bins assigned to the zero sub-block in the block may be distributed to the non-zero sub-blocks to set an upper limit on the number of context coding bins assigned to each sub-block, and syntax element values may be derived from coefficient data corresponding to image data while ensuring that the number of context coding bins for the current sub-block does not exceed the upper limit.
[0028] Also, for example, for the sub-block to be processed, the syntax element values may be parsed to derive coefficient data corresponding to image data while ensuring that the number of context coding bins does not exceed its upper limit.
[0029] <Block> For example, a block 10 as shown in A of FIG. 1 is assumed to be a processing target block. The block 10 is, for example, a TU of 8x8 pixels, and is composed of four subblocks (subblock 11-1, subblock 11-2, subblock 11-3, and subblock 11-4). In the following, when it is not necessary to distinguish between the subblocks, they will be referred to as subblocks 11. That is, in the example of A of FIG. 1, the block 10 is composed of 2x2 subblocks 11. Therefore, each subblock 11 is composed of 4x4 pixels.
[0030] 1A, the numerical value in each sub-block 11 indicates the number of context coding bins occurring in that sub-block 11. For example, if a constraint is imposed on the number of context coding bins per sub-block 11 being 30 bins, the number of context coding bins occurring in each sub-block 11 is limited to 30 bins or less.
[0031] The processing order of each sub-block 11 is the Morton code order (Z-order curve) as shown in FIG.
[0032] <2. First embodiment> <Method #1> For example, as shown in the top row of the table in FIG. 2, the context coding bin number of the zero subblock may be diverted to the nonzero subblock.
[0033] A zero subblock is a subblock whose coefficients are all zero (0). A nonzero subblock is a subblock in which at least one nonzero coefficient exists. In other words, the number of context coding bins assigned to the zero subblock when the upper limit of the number of context coding bins is uniformly set for each subblock as in the method described in Non-Patent Document 1 is assigned to the nonzero subblock.
[0034] For example, as shown in the second row from the top of the table in FIG. 2, the sub-block coefficient flag (coded_sub_block_flag) is moved outside the existing loop and made independent.
[0035] The subblock coefficient flag is a flag indicating whether or not the subblock includes a nonzero coefficient. For example, coded_sub_block_flag=1 indicates that the subblock corresponding to the flag is a nonzero subblock, and coded_sub_block_flag=0 indicates that the subblock corresponding to the flag is a zero subblock. The process of deriving the syntax element value is looped for each subblock, but in this method, the process of the subblock coefficient flag is performed outside the loop. That is, first, the subblock coefficient flags for all subblocks in the TU are parsed.
[0036] Then, the sub-blocks with coded_sub_block_flag=0, i.e., zero sub-blocks, are counted. Then, the number of zero sub-blocks x the number of context coding bins for one sub-block are allocated (added) to the non-zero sub-blocks. Since the number of context coding bins is not consumed in the zero sub-block, the amount is allocated to the non-zero sub-blocks.
[0037] Furthermore, the management of the number of context coding bins is closed within a TU (predetermined unit). That is, the number of context coding bins is distributed for each block as described above.
[0038] In this way, as shown in the third row from the top of the table in Fig. 2, the number of redundant context coding bins of the zero subblock can be used as the number of context coding bins of the non-zero subblock, so that it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of the decoded image.
[0039] For example, when a constraint of 30 bins is set for each subblock as shown in A of Fig. 3, even if subblocks 11-2 and 11-3 are zero subblocks, their excess context coding bin numbers cannot be used in subblocks 11-1 and 11-4, which are non-zero subblocks. In other words, the context coding bin numbers of subblocks 11-1 and 11-4 cannot be made larger than 30 bins.
[0040] In contrast, in the case of method #1, as shown in B of FIG. 3, even if subblocks 11-2 and 11-3 are zero subblocks, their excess context coding bin numbers can be assigned to subblocks 11-1 and 11-4, which are non-zero subblocks. In other words, syntax element values of 30 bins or more can be generated in those subblocks. Therefore, it is possible to suppress a decrease in coding efficiency.
[0041] <Encoding device> Fig. 4 is a block diagram showing an example of the configuration of an encoding device, which is one aspect of an image processing device to which the present technology is applied. The encoding device 100 shown in Fig. 4 is a device that encodes coefficient data derived from image data by CABAC to generate encoded data.
[0042] Note that Fig. 4 shows the main processing units, data flows, etc., and is not limited to all that is shown in Fig. 4. In other words, in encoding device 100, there may be processing units that are not shown as blocks in Fig. 4, and there may be processing and data flows that are not shown as arrows, etc. in Fig. 4.
[0043] As shown in FIG. 4, the encoding device 100 includes a sequencer 101 and a CABAC 102. The sequencer 101 acquires coefficient data derived from image data. The sequencer 101 also acquires control information such as flag information as appropriate. The sequencer 101 uses them to derive syntax element values. The sequencer 101 also supplies the derived syntax element values to the CABAC 102. The CABAC 102 acquires syntax element values supplied from the sequencer 101. The CABAC 102 binarizes the syntax element values by a predetermined method, switches contexts for each bit of the binarized bit string, and performs arithmetic coding to generate encoded data. The CABAC 102 outputs the generated encoded data to the outside of the encoding device 100.
[0044] In addition, these processing units (sequencer 101 and CABAC 102) have any configuration. For example, each processing unit may be configured by a logic circuit that realizes the above-mentioned processing. Also, each processing unit may have, for example, a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), etc., and may realize the above-mentioned processing by executing a program using them. Of course, each processing unit may have both configurations, and may realize part of the above-mentioned processing by a logic circuit and the other by executing a program. The configurations of each processing unit may be independent of each other, and for example, some processing units may realize part of the above-mentioned processing by a logic circuit, other processing units may realize the above-mentioned processing by executing a program, and still other processing units may realize the above-mentioned processing by both a logic circuit and executing a program.
[0045] <cabac> Fig. 5 is a block diagram showing a main configuration example of CABAC 102. Note that Fig. 5 shows main processing units, data flows, etc., and is not limited to all that are shown in Fig. 5. In other words, in CABAC 102, there may be processing units not shown as blocks in Fig. 5, and there may be processing and data flows not shown as arrows, etc. in Fig. 5.
[0046] As shown in FIG. 5, CABAC 102 includes a binarization unit 121, a selection unit 122, a context model 123, an arithmetic coding unit 124, an arithmetic coding unit 125, and a selection unit 126.
[0047] The binarization unit 121 acquires syntax element values supplied from the sequencer 101, binarizes the syntax element values using a method defined for each syntax element, and generates a binarized bit string. The binarization unit 121 supplies the binarized bit string to the selection unit 122.
[0048] The selection unit 122 acquires the binarized bit string and flag information isBypass supplied from the binarization unit 121. The selection unit 122 selects a supply destination of the binarized bit string based on the value of isBypass. For example, when isBypass=0, the selection unit 122 determines the normal mode, and supplies the binarized bit string to the context model 123. On the other hand, when isBypass=1, the selection unit 122 determines the bypass mode, and supplies the binarized bit string to the arithmetic coding unit 125.
[0049] The context model 123 dynamically switches the context model to be applied depending on the encoding target and surrounding circumstances. For example, the context model 123 holds a context variable ctx, and upon acquiring a binarized bit string from the selection unit 122, reads out a context variable ctx corresponding to each bin position (binIdx) of a bin string defined for each syntax element. The context model 123 supplies the binarized bit string and the read out context variable ctx to the arithmetic coding unit 124.
[0050] When the arithmetic coding unit 124 acquires the binarized bit string and the context variable ctx supplied from the context model 123, the arithmetic coding unit 124 refers to the probability state of the context variable ctx, and arithmetically codes the value of the bin at binIdx of the binarized bit string in the normal mode of CABAC (performs context coding). The arithmetic coding unit 124 supplies coded data generated by the context coding to the selection unit 126. The arithmetic coding unit 124 also supplies the context variable ctx after the context coding process to the context model 123, where it is held.
[0051] The arithmetic coding unit 125 arithmetically codes the binarized bit string supplied from the selection unit 122 in the bypass mode of CABAC (performs bypass coding). The arithmetic coding unit 125 supplies the coded data generated by the bypass coding to the selection unit 126.
[0052] The selection unit 126 acquires flag information isBypass, and selects coded data to be output based on the value of isBypass. For example, when isBypass=0, the selection unit 126 determines the normal mode, acquires coded data supplied from the arithmetic coding unit 124, and outputs the coded data to the outside of CABAC102 (coding device 100). When isBypass=1, the selection unit 126 determines the bypass mode, acquires coded data supplied from the arithmetic coding unit 125, and outputs the coded data to the outside of CABAC102 (coding device 100).
[0053] These processing units (the binarization unit 121 to the selection unit 126) may have any configuration. For example, each processing unit may be configured with a logic circuit that realizes the above-mentioned processing. Also, each processing unit may have, for example, a CPU, a ROM, a RAM, etc., and may realize the above-mentioned processing by executing a program using them. Of course, each processing unit may have both configurations, and may realize part of the above-mentioned processing by a logic circuit and the other by executing a program. The configurations of each processing unit may be independent of each other, and for example, some processing units may realize part of the above-mentioned processing by a logic circuit, other processing units may realize the above-mentioned processing by executing a program, and still other processing units may realize the above-mentioned processing by both a logic circuit and by executing a program.
[0054] <Encoding process flow> Next, an example of the flow of the encoding process executed by the encoding device 100 will be described with reference to the flowchart of FIG.
[0055] When the encoding process starts, in step S101, the sequencer 101 of the encoding device 100 executes a syntax element value derivation process to derive syntax element values from coefficient data input to the encoding device 100 (coefficient data derived from image data).
[0056] In step S102, the CABAC 102 performs CABAC processing, encodes the syntax element value derived in step S101 by CABAC, and generates encoded data. The CABAC 102 outputs the generated encoded data to the outside of the encoding device 100.
[0057] When the process of step S102 ends, the encoding process ends.
[0058] <Syntax element value derivation process flow> Next, an example of the flow of the syntax element value derivation process executed in step S101 in Fig. 6 will be described with reference to the flowchart in Fig. 7. Figs. 8 to 11 are diagrams showing examples of the syntax of residual coding. These diagrams will be used for explanation as necessary. In the syntax in Figs. 8 to 11, the thresholds (TH1 to TH4) can take the following values, for example:
[0059] TH1 = 6, TH2 = 28, TH3 = 2, TH4 = 4
[0060] Of course, the values of the thresholds are arbitrary and are not limited to this example.
[0061] When the syntax element value derivation process is started, the sequencer 101 encodes the sub-block coefficient flag (coded_sub_block_flag) in the block to be processed in step S121, for example, as shown in the second to eleventh rows from the top of FIG.
[0062] In step S122, the sequencer 101 counts the number of non-zero sub-blocks (numNonZeroSbk) based on the value of the sub-block coefficient flag, for example, as shown in the 13th to 16th rows from the top of Fig. 9. That is, the sequencer 101 counts the number of sub-blocks with coded_sub_block_flag=1 for the block to be processed.
[0063] In step S123, the sequencer 101 sets a provisional upper limit (remBinPass1Tmp) of the number of context-coded bins per sub-block, for example, as shown in the 18th and 19th rows from the top of FIG. 9. For example, in the case of FIG. 3, the sub-block is made up of 4x4 coefficient data, and sig_flag, gt1_flag, par_flag, and gt2_flag are derived, so that the number of context-coded bins per sub-block is a maximum of 64 bins. The sequencer 101 sets this 64 bins as the provisional upper limit (remBinPass1Tmp) described above. That is, this provisional upper limit (remBinPass1Tmp) may be set based on the size of the sub-block.
[0064] In step S124, the sequencer 101 sets the number of extra context coding bins (remBinPass1InZeroSbk) of the entire zero subblock based on the number of zero subblocks (numZeroSBk), as shown in the twentieth and twenty-first rows from the top of FIG. 9. Since the number of subblocks in the processing target block is known from the number of subblock coefficient flags, etc., the number of zero subblocks (numZeroSBk) can be obtained from the number of non-zero subblocks (numNonZeroSbk) counted in step S122. Since the number of bins required for the zero subblock is 0, the provisional upper limit value (remBinPass1Tmp) set in step S123 becomes the number of extra context coding bins. Therefore, the number of extra context coding bins (remBinPass1InZeroSbk) of the entire zero subblock is derived by the product of the number of zero subblocks (numZeroSBk) and the provisional upper limit value (remBinPass1Tmp).
[0065] In step S125, the sequencer 101 sets an average number of extra context coding bins (remBinPass1Extra) that can be additionally assigned per non-zero subblock, as shown in the 22nd and 23rd rows from the top of Fig. 9. This average number of extra context coding bins (remBinPass1Extra) can be derived by dividing the number of extra context coding bins (remBinPass1InZeroSbk) of all zero subblocks derived in step S124 by the number of zero subblocks (numZeroSBk). Note that in order to avoid division, the average number of extra context coding bins (remBinPass1Extra) may be derived using a lookup table.
[0066] Next, the process moves to processing for each subblock. That is, the process moves to processing within the loop of the for statement for each subblock in the syntax. In step S126, the sequencer 101 selects a subblock to be processed (subSetId=i) from among the subblocks in the block to be processed.
[0067] In step S127, the sequencer 101 sets an upper limit value (remBinPass1) of the number of context coding bins for the sub-block to be processed based on a tentative upper limit value (remBinPass1Tmp) and an average number of extra context coding bins (remBinPass1Extra) that can be additionally allocated from the zero sub-block, as shown in the 29th and 30th rows from the top of Fig. 9. In the example of Fig. 9, the upper limit value (remBinPass1) of the number of context coding bins is derived by adding the tentative upper limit value (remBinPass1Tmp) and the average number of extra context coding bins (remBinPass1Extra) that can be additionally allocated from the zero sub-block.
[0068] In step S128, the sequencer 101 derives the value of the syntax element so that the upper limit value of the number of context coding bins is not exceeded for the sub-block to be processed. This process corresponds to the syntax after FIG. 10.
[0069] In step S129, the sequencer 101 determines whether all sub-blocks have been processed. If it is determined that there is an unprocessed sub-block in the block to be processed, the process returns to step S126, and the subsequent processes are repeated. That is, each process from step S126 to step S129 is executed for each sub-block in the block to be processed. Then, in step S129, if it is determined that all sub-blocks in the block to be processed have been processed, the syntax element value derivation process ends, and the process returns to FIG. 6.
[0070] By executing the processes of each step as described above, the sequencer 101 can make the constraint of the number of context coding bins for each sub-block variable. For example, the number of context coding bins assigned to the zero sub-block in the block to be processed can be distributed to non-zero sub-blocks. Therefore, the number of context coding bins assigned to the zero sub-block can also be utilized. Therefore, it is possible to suppress the reduction of coding efficiency.
[0071] Note that by performing the coding of the sub-block coefficient flag (coded_sub_block_flag) before the processing for each sub-block and counting the number of zero sub-blocks and non-zero sub-blocks, the distribution of surplus context coding bins can be performed more freely (the constraints of the distribution can be reduced).
[0072] Also, by closing the management of the number of context coding bins within a block (for example, TU) as described above, an increase in the processing amount can be suppressed.
[0073] <Flow of CABAC processing> Next, an example of the flow of the CABAC process executed in step S102 in FIG. 6 will be described with reference to the flowchart in FIG.
[0074] When the CABAC process starts, in step S151, the binarization unit 121 of the CABAC 102 receives the syntax element value (syncVal) to be processed.
[0075] In step S152, the binarization unit 121 performs binarization processing defined for each syntax element, and derives a bin string (synBins) of the syntax element value (syncVal).
[0076] In step S153, the selection unit 122 reads out a context variable ctx corresponding to each bin position (binIdx) of the bin string defined for each syntax element, and a flag isBypass indicating whether or not the bypass mode is in effect.
[0077] In step S154, the selection unit 122 determines whether or not the mode is the bypass mode. If isBypass=0 and it is determined that the mode is the normal mode, the process proceeds to step S155.
[0078] In step S155, the arithmetic coding unit 124 performs context coding. That is, the arithmetic coding unit 124 refers to the probability state of the context variable ctx and codes the bin value at the bin position (binIdx) of the bin sequence (synBins) in the normal mode of CABAC. When the process of step S155 ends, the process proceeds to step S157.
[0079] Also, if it is determined in step S154 that isBypass=1 and the device is in the bypass mode, the process proceeds to step S156.
[0080] In step S156, the arithmetic coding unit 125 performs bypass coding. That is, the arithmetic coding unit 125 codes the value of the bin at the bin position (binIdx) of the bin sequence (synBins) in the bypass mode of CABAC. When the process of step S156 ends, the process proceeds to step S157.
[0081] In step S157, the selection unit 126 determines whether or not a predetermined break condition A is satisfied. The break condition A is defined based on the values of the bin string from binIdx=0 to binIdx=k (position k of the current binIdx) and the binarization method for each syntax element.
[0082] If it is determined that the break condition A is not satisfied, the process returns to step S153, and the subsequent processes are executed for the next bin position (binIdx). That is, the processes of steps S153 to S157 are executed for each bin position (binIdx).
[0083] Then, if it is determined in step S157 that break condition A is satisfied, the CABAC processing ends and the process returns to FIG.
[0084] By performing CABAC processing in this manner, syntax element values can be encoded and encoded data can be generated.
[0085] <Decryption device> Fig. 13 is a block diagram showing an example of the configuration of a decoding device, which is one aspect of an image processing device to which the present technology is applied. The decoding device 200 shown in Fig. 13 is a device that decodes encoded data and generates coefficient data corresponding to image data.
[0086] Note that Fig. 13 shows the main processing units, data flows, and the like, and is not limited to all that is shown in Fig. 13. In other words, in the decoding device 200, there may be processing units that are not shown as blocks in Fig. 13, and there may be processing and data flows that are not shown as arrows, etc. in Fig. 13.
[0087] As shown in FIG. 13, the decoding device 200 includes a CABAC 201 and a parser 202. The CABAC 201 acquires encoded data, switches contexts for each bit of a binarized bit string on the encoded data, performs arithmetic decoding to generate a binarized bit string, and multi-values the binarized bit string using a predetermined method to generate a syntax element value. The CABAC 201 supplies the generated syntax element value to the parser 202. The parser 202 acquires the syntax element value, parses it, and derives coefficient data corresponding to the image data. The parser 202 outputs the derived coefficient data to the outside of the decoding device 200.
[0088] In addition, these processing units (CABAC 201 and parser 202) may have any configuration. For example, each processing unit may be configured by a logic circuit that realizes the above-mentioned processing. Also, each processing unit may have, for example, a CPU, a ROM, a RAM, etc., and may realize the above-mentioned processing by executing a program using them. Of course, each processing unit may have both configurations, and may realize part of the above-mentioned processing by a logic circuit and the other by executing a program. The configurations of each processing unit may be independent of each other, and for example, some processing units may realize part of the above-mentioned processing by a logic circuit, other processing units may realize the above-mentioned processing by executing a program, and still other processing units may realize the above-mentioned processing by both a logic circuit and executing a program.
[0089] <cabac> Fig. 14 is a block diagram showing a main configuration example of CABAC 201. Note that Fig. 14 shows main processing units, data flows, etc., and is not limited to all that are shown in Fig. 14. In other words, in CABAC 201, there may be processing units not shown as blocks in Fig. 14, and there may be processing and data flows not shown as arrows, etc. in Fig. 14.
[0090] As shown in FIG. 14, CABAC 201 includes a selection unit 221, a context model 222, an arithmetic decoding unit 223, an arithmetic decoding unit 224, a selection unit 225, and a multi-value conversion unit 226.
[0091] The selection unit 221 acquires the coded data and flag information isBypass input to the decoding device 200. The selection unit 221 selects a supply destination of the coded data based on the value of isBypass. For example, when isBypass=0, the selection unit 221 determines the normal mode, and supplies the coded data to the context model 222. On the other hand, when isBypass=1, the selection unit 221 determines the bypass mode, and supplies the binarized bit string to the arithmetic decoding unit 224.
[0092] The context model 222 dynamically switches the context model to be applied depending on the decoding target and the surrounding circumstances. For example, the context model 222 holds a context variable ctx, and when the context model 222 acquires encoded data from the selection unit 221, it reads out a context variable ctx corresponding to each bin position (binIdx) of a bin string defined for each syntax element. The context model 222 supplies the encoded data and the read out context variable ctx to the arithmetic decoding unit 223.
[0093] When the arithmetic decoding unit 223 acquires the coded data and the context variable ctx supplied from the context model 222, the arithmetic decoding unit 223 refers to the probability state of the context variable ctx and arithmetically decodes the value of the bin in binIdx of the binarized bit string in the normal mode of CABAC (performs context decoding). The arithmetic decoding unit 223 supplies the binarized bit string generated by the context decoding to the selection unit 225. The arithmetic decoding unit 223 also supplies the context variable ctx after the context decoding process to the context model 222 to be held.
[0094] The arithmetic decoding unit 224 arithmetically decodes (performs bypass decoding) the coded data supplied from the selection unit 221 in the bypass mode of CABAC. The arithmetic decoding unit 224 supplies the binarized bit string generated by the bypass decoding to the selection unit 225.
[0095] The selection unit 225 acquires flag information isBypass, and based on the value of isBypass, selects a binarized bit string to be supplied to the multi-value conversion unit 226. For example, when isBypass=0, the selection unit 225 determines the normal mode, acquires the binarized bit string supplied from the arithmetic decoding unit 223, and supplies it to the multi-value conversion unit 226. On the other hand, when isBypass=1, the selection unit 225 determines the bypass mode, acquires the binarized bit string supplied from the arithmetic decoding unit 224, and supplies it to the multi-value conversion unit 226.
[0096] The multi-value conversion unit 226 acquires the binarized bit string supplied from the selection unit 225, converts it to multi-value using a method defined for each syntax element, and generates a syntax element value. The multi-value conversion unit 226 supplies the syntax element value to the parser 202.
[0097] Note that these processing units (selection unit 221 to multi-valued conversion unit 226) have an arbitrary configuration. For example, each processing unit may be configured by a logic circuit that realizes the above-described processing. Further, each processing unit may have, for example, a CPU, a ROM, a RAM, etc., and realize the above-described processing by executing a program using them. Of course, each processing unit may have both of these configurations, and realize a part of the above-described processing by a logic circuit and the other part by executing a program. The configurations of the respective processing units may be independent of each other. For example, some of the processing units may realize a part of the above-described processing by a logic circuit, some other processing units may realize the above-described processing by executing a program, and still other processing units may realize the above-described processing by both a logic circuit and program execution.
[0098] <Flow of Decoding Process> Next, an example of the flow of the decoding process executed by this decoding apparatus 200 will be described with reference to the flowchart of FIG. 15.
[0099] When the decoding process is started, the CABAC 201 of the decoding apparatus 200 performs CABAC processing in step S201, decodes the encoded data input to the decoding apparatus 200 by CABAC, and generates a syntax element value. In step S202, the parser 202 executes coefficient data derivation processing, parses the syntax element value, and derives coefficient data corresponding to the image data. The parser 202 outputs the derived coefficient data to the outside of the decoding apparatus 200.
[0100] When the processing in step S202 ends, the decoding process ends.
[0101] <Flow of CABAC Processing> Next, an example of the flow of the CABAC processing executed in step S201 of FIG. 15 will be described with reference to the flowchart of FIG. 16.
[0102] When the CABAC process starts, in step S221, the selection unit 221 of the CABAC 201 reads out a context variable ctx corresponding to each bin position (binIdx) of the bin string defined for each syntax element, and a flag isBypass indicating whether or not the bypass mode is selected.
[0103] In step S222, the selection unit 221 determines whether or not the mode is the bypass mode. If isBypass=0 and it is determined that the mode is the normal mode, the process proceeds to step S223.
[0104] In step S223, the arithmetic decoding unit 223 performs context decoding. That is, the arithmetic decoding unit 223 decodes the encoded data in the normal mode of CABAC by referring to the probability state of the context variable ctx, and generates a bin value at the bin position (binIdx) of the bin sequence (synBins). When the process of step S223 ends, the process proceeds to step S225.
[0105] Also, if it is determined in step S222 that isBypass=1 and the device is in the bypass mode, the process proceeds to step S224.
[0106] In step S224, the arithmetic decoding unit 224 performs bypass decoding. That is, the arithmetic decoding unit 224 decodes the encoded data in the bypass mode of CABAC, and generates a bin value at the bin position (binIdx) of the bin sequence (synBins). When the process of step S224 ends, the process proceeds to step S225.
[0107] In step S225, the selection unit 225 determines whether or not a predetermined break condition A is satisfied. The break condition A is defined based on the values of the bin string from binIdx=0 to binIdx=k (position k of the current binIdx) and the binarization method for each syntax element.
[0108] If it is determined that the break condition A is not satisfied, the process returns to step S221, and the subsequent processes for generating a value for the next bin position (binIdx) are executed. That is, the processes from step S221 to step S225 are executed for each bin position (binIdx).
[0109] Then, if it is determined in step S225 that break condition A is satisfied, the process proceeds to step S226.
[0110] In step S226, the multi-value conversion unit 226 derives a syntax element value (syncVal) from the bin sequence (synBins) by multi-value processing defined for each syntax element.
[0111] In step S227, the multi-value conversion unit 226 supplies the derived syntax element value (syncVal) to the parser 202.
[0112] By performing CABAC processing in this manner, it is possible to decode the coded data and generate syntax element values.
[0113] <Coefficient data derivation process flow> Next, an example of the flow of the coefficient data derivation process executed in step S202 in Fig. 15 will be described with reference to the flowchart in Fig. 17. This coefficient data derivation process is executed in a flow substantially similar to that of the syntax element value derivation process (Fig. 7). That is, the processes of each step of the coefficient data derivation process (steps S251 to S259 in Fig. 17) are executed in a substantially similar manner to the processes of the syntax element value derivation process (steps S121 to S129 in Fig. 7).
[0114] However, in step S251, the parser 202 decodes the sub-block coefficient flag (coded_sub_block_flag) in the block to be processed, for example, as shown in the second to eleventh rows from the top of Fig. 9. When the process of step S251 ends, the process proceeds to step S252.
[0115] In step S258, the parser 202 parses the values of syntax elements for the sub-block to be processed so as not to exceed the upper limit of the number of context coding bins, and derives coefficient data. This process corresponds to the syntax shown in Fig. 10 and subsequent figures. When the process of step S258 ends, the process proceeds to step S259.
[0116] By executing the processes of each step as described above, the parser 202 can vary the constraint of the number of context coding bins for each subblock. For example, the number of context coding bins assigned to the zero subblock in the processing target block can be distributed to the non-zero subblocks. Therefore, the number of context coding bins assigned to the zero subblock can also be used. Therefore, it is possible to suppress a decrease in coding efficiency.
[0117] In addition, by decoding the subblock coefficient flag (coded_sub_block_flag) before processing each subblock and counting the number of zero subblocks and non-zero subblocks, the number of surplus context coding bins can be distributed more freely (reducing distribution constraints).
[0118] Furthermore, by confining the management of the number of context coding bins within a block (eg, a TU) as described above, an increase in the amount of processing can be suppressed.
[0119] <3. Second embodiment> <Method #2> In the first embodiment, the method #1 has been described, but the present technology is not limited to this method. For example, as shown in the top row of the table in Fig. 18, the maximum number of context coding bins may be shared within a nonzero subblock.
[0120] That is, when an upper limit on the number of context coding bins is uniformly set for each sub-block as in the method described in Non-Patent Document 1, the number of context coding bins assigned to each non-zero sub-block is made to be shared.
[0121] For example, as shown in the second row from the top of the table in Fig. 18, the sub-block coefficient flag (coded_sub_block_flag) is taken out of the existing loop and made independent. That is, first, the sub-block coefficient flags for all sub-blocks in the TU are parsed.
[0122] Then, the sub-blocks with coded_sub_block_flag=1, that is, the non-zero sub-blocks, are counted, and the number of non-zero sub-blocks multiplied by the number of context coding bins for one sub-block is shared.
[0123] Furthermore, the management of the number of context coding bins is closed within a TU (predetermined unit). That is, the number of context coding bins is distributed for each block as described above.
[0124] In this way, as shown in the third row from the top of the table in Fig. 18, the number of redundant context coding bins of a non-zero sub-block can be used as the number of context coding bins of other non-zero sub-blocks, so that it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of a decoded image.
[0125] For example, as shown in A of Fig. 19, when a constraint of 30 bins is set for each subblock, even if only 24 bins are generated in subblock 11-1, which is a non-zero subblock, the upper limit of 6 bins cannot be diverted to other non-zero subblocks. Therefore, even in subblock 11-4, which is a non-zero subblock, the number of context coding bins cannot be increased beyond the upper limit of 30 bins.
[0126] In contrast, in the case of method #2, as shown in B of Fig. 19, the number of surplus context coding bins ("6" in this example) in the non-zero sub-block 11-1 can be allocated to the non-zero sub-block 11-4. In other words, the number of context coding bins can be shared among the non-zero sub-blocks, and depending on the allocation, syntax element values of 30 bins or more can be generated. This makes it possible to suppress a decrease in coding efficiency.
[0127] <Syntax element value derivation process flow> In this case, the configuration of the encoding device 100 is the same as that of the first embodiment (FIG. 4). The configuration of the CABAC 102 is also the same as that of the first embodiment (FIG. 5). The flow of the encoding process executed by the encoding device 100 is also the same as that of the first embodiment (FIG. 6). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 12).
[0128] An example of the flow of the syntax element value derivation process in this case will be described with reference to the flowchart in Fig. 20. Figs. 21 to 24 are diagrams showing examples of the syntax of residual coding. These diagrams will be used for explanation as necessary. In the syntax of Figs. 21 to 24, the thresholds (TH1 to TH3) can take the following values, for example:
[0129] TH1 = 6, TH2 = 28, TH3 = 3
[0130] Of course, the values of the thresholds are arbitrary and are not limited to this example.
[0131] When the syntax element value derivation process is started, the sequencer 101 encodes the sub-block coefficient flag (coded_sub_block_flag) in the block to be processed in step S301, for example, as shown in the first to tenth rows from the top of FIG.
[0132] In step S302, the sequencer 101 counts the number of non-zero sub-blocks (numNonZeroSbk) based on the value of the sub-block coefficient flag, for example, as shown in the 12th to 15th rows from the top of Fig. 22. That is, the sequencer 101 counts the number of sub-blocks with coded_sub_block_flag=1 for the block to be processed.
[0133] In step S303, the sequencer 101 sets a provisional upper limit (remBinPass1Tmp) of the number of context-coded bins per sub-block, for example, as shown in the 17th and 18th rows from the top of Fig. 22. For example, in the case of Fig. 19, the number of context-coded bins per sub-block is a maximum of 64 bins, similar to the case of Fig. 3. The sequencer 101 sets this 64 bins as the provisional upper limit (remBinPass1Tmp) described above. In other words, this provisional upper limit (remBinPass1Tmp) may be set based on the size of the sub-block.
[0134] In step S304, the sequencer 101 sets the number of redundant context coding bins (remBinPass1) that can be allocated to all non-zero sub-blocks based on the number of non-zero sub-blocks (numNonZeroSbk), for example, as shown in the 19th and 20th rows from the top of Fig. 22. This number of redundant context coding bins (remBinPass1) that can be allocated to all non-zero sub-blocks is derived from the product of the number of non-zero sub-blocks (numNonZeroSbk) counted in step S302 and the tentative upper limit value (remBinPass1Tmp) set in step S303, that is, the sum of the tentative upper limit values (remBinPass1Tmp) allocated to each non-zero sub-block.
[0135] Next, the process moves to processing for each subblock. That is, the process moves to processing within the loop of the for statement for each subblock in the syntax. In step S305, the sequencer 101 selects a subblock to be processed (subSetId=i) from among the subblocks in the block to be processed.
[0136] In step S306, the sequencer 101 derives the value of the syntax element for the sub-block to be processed so that the sum of the number of generated bins in each sub-block of the block to be processed does not exceed the number of redundant context coding bins (remBinPass1) that can be assigned to all the non-zero sub-blocks derived in step S304. This process corresponds to the syntax in FIG. 23 and subsequent figures.
[0137] In step S307, the sequencer 101 determines whether all sub-blocks have been processed. If it is determined that an unprocessed sub-block exists in the processing target block, the process returns to step S305, and the subsequent processes are repeated. That is, each process from step S305 to step S307 is executed for each sub-block in the processing target block. Then, if it is determined in step S307 that all sub-blocks in the processing target block have been processed, the syntax element value derivation process ends, and the process returns to FIG. 6.
[0138] By executing the processes of each step as described above, the sequencer 101 can change the constraint of the number of context coding bins for each sub-block. For example, the number of context coding bins can be distributed among non-zero sub-blocks in the processing target block. Therefore, it is possible to suppress a decrease in coding efficiency.
[0139] In addition, by coding the subblock coefficient flag (coded_sub_block_flag) before processing each subblock and counting the number of zero subblocks and non-zero subblocks, the number of surplus context coding bins can be distributed more freely (reducing distribution constraints).
[0140] Furthermore, by confining the management of the number of context coding bins within a block (eg, a TU) as described above, an increase in the amount of processing can be suppressed.
[0141] <Coefficient data derivation process flow> In this case, the configuration of the decoding device 200 is the same as that of the first embodiment (FIG. 13). The configuration of the CABAC 201 is also the same as that of the first embodiment (FIG. 14). The flow of the decoding process executed by the decoding device 200 is also the same as that of the first embodiment (FIG. 15). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 16).
[0142] An example of the flow of the coefficient data derivation process in this case will be described with reference to the flowchart in Fig. 25. This coefficient data derivation process is executed in a flow substantially similar to that of the syntax element value derivation process (Fig. 20). That is, the processes of each step of the coefficient data derivation process (steps S321 to S327 in Fig. 25) are executed in a substantially similar manner to the processes of the syntax element value derivation process (steps S301 to S307 in Fig. 20).
[0143] However, in step S321, the parser 202 decodes the sub-block coefficient flag (coded_sub_block_flag) in the block to be processed, for example, as shown in the first to tenth rows from the top of Fig. 22. When the process of step S321 ends, the process proceeds to step S322.
[0144] In step S326, the parser 202 parses syntax element values and derives coefficient data for the sub-block to be processed so that the sum of the numbers of generated bins in each sub-block of the block to be processed does not exceed the number of redundant context coding bins (remBinPass1) that can be assigned to all non-zero sub-blocks derived in step S324. This process corresponds to the syntax in and after FIG. 23. When the process of step S326 ends, the process proceeds to step S327.
[0145] By executing the processes of each step as described above, the parser 202 can vary the constraint on the number of context coding bins for each subblock. For example, the number of context coding bins can be distributed among the non-zero subblocks in the block to be processed. This makes it possible to suppress a decrease in coding efficiency. The number of context coding bins assigned to the zero subblock in the block to be processed can be distributed to the non-zero subblocks. This makes it possible to utilize the number of context coding bins assigned to the zero subblock. This makes it possible to suppress a decrease in coding efficiency.
[0146] In addition, by decoding the subblock coefficient flag (coded_sub_block_flag) before processing each subblock and counting the number of zero subblocks and non-zero subblocks, the number of surplus context coding bins can be distributed more freely (reducing distribution constraints).
[0147] Furthermore, by confining the management of the number of context coding bins within a block (eg, a TU) as described above, an increase in the amount of processing can be suppressed.
[0148] <4. Third embodiment> <Method #3> Also, for example, as shown in the top row of the table in FIG. 26, the number of redundant context coding bins in a nonzero subblock may be used in other nonzero subblocks.
[0149] For example, as shown in the second row from the top of the table in Figure 26, if there is a sub-block that does not have the maximum number of context coding bins per sub-block, the surplus context coding bins are pooled and used for the next and subsequent sub-blocks.
[0150] In this way, the sub-block coefficient flag can be applied without leaving the existing loop, as shown in the third row from the top of the table in Fig. 26. In other words, it is possible to suppress an increase in the amount of syntax changes, and this technology can be applied more easily.
[0151] In addition, since the number of redundant context coding bins of a non-zero sub-block can be used as the number of context coding bins of other non-zero sub-blocks, it is possible to suppress a decrease in coding efficiency, i.e., to suppress a decrease in image quality of a decoded image.
[0152] For example, as shown in A of Fig. 27, when a restriction of 30 bins is set for each sub-block, even if only 16 bins are generated in sub-block 11-3, sub-block 11-4 is restricted to 30 bins. In other words, the upper limit of 14 bins cannot be passed on to the next or subsequent sub-blocks.
[0153] In contrast, in the case of method #3, as shown in B of FIG. 27, the number of excess context coding bins in sub-block 11-3 ("14" in this example) can be assigned to sub-block 11-4 to be processed next. In other words, syntax element values of 30 bins or more can be generated in sub-block 11-4. Therefore, it is possible to suppress a decrease in coding efficiency.
[0154] <Syntax element value derivation process flow> In this case, the configuration of the encoding device 100 is the same as that of the first embodiment (FIG. 4). The configuration of the CABAC 102 is also the same as that of the first embodiment (FIG. 5). The flow of the encoding process executed by the encoding device 100 is also the same as that of the first embodiment (FIG. 6). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 12).
[0155] An example of the flow of the syntax element value derivation process in this case will be described with reference to the flowchart in Fig. 28. Figs. 29 to 32 are diagrams showing examples of the syntax of residual coding. These diagrams will be used for explanation as necessary. In the syntax in Figs. 29 to 32, the thresholds (TH1 to TH3) can take the following values, for example:
[0156] TH1 = 6, TH2 = 28, TH3 = 3
[0157] Of course, the values of the thresholds are arbitrary and are not limited to this example.
[0158] When the syntax element value derivation process is started, in step S341, the sequencer 101 initializes the number of excess context coding bins (remBinPass1Next) that can be assigned to the next sub-block (e.g., remBinPass1Next = 0), for example, as shown in the first and second rows from the top of Fig. 30. That is, in the initial value, the number of excess context coding bins is 0, indicating that no bins can be added to the next sub-block.
[0159] Next, the process moves to processing for each subblock. That is, the process moves to processing within the loop of the for statement for each subblock in the syntax. In step S342, the sequencer 101 selects a subblock to be processed (subSetId=i) from among the subblocks in the block to be processed.
[0160] In step S343, the sequencer 101 encodes the sub-block coefficient flag (coded_sub_block_flag) for the sub-block to be processed, as shown in the third to eleventh rows from the top of FIG.
[0161] In step S344, the sequencer 101 sets a provisional upper limit (remBinPass1Tmp) of the number of context-coded bins for the sub-block to be processed, for example, as shown in the 14th and 15th rows from the top of Fig. 30. For example, in the case of Fig. 27, the number of context-coded bins per sub-block is a maximum of 64 bins, similar to the case of Fig. 3. The sequencer 101 sets this 64 bins as the provisional upper limit (remBinPass1Tmp) described above. That is, this provisional upper limit (remBinPass1Tmp) may be set based on the size of the sub-block.
[0162] In step S345, the sequencer 101 sets an upper limit value (remBinPass1) of the number of context coding bins for the current sub-block based on the provisional upper limit value (remBinPass1Tmp) set in step S344 and the number of excess context coding bins (remBinPass1Next) in the sub-block processed immediately before that that can be assigned to the next sub-block, as shown in the 16th and 17th rows from the top of Fig. 30. For example, the upper limit value (remBinPass1) of the number of context coding bins for the current sub-block is derived as the sum of the provisional upper limit value (remBinPass1Tmp) and the number of excess context coding bins (remBinPass1Next) that can be assigned to the next sub-block.
[0163] In step S346, the sequencer 101 derives syntax element values for the sub-block to be processed so as not to exceed the upper limit (remBinPass1) of the number of context encoding bins set in step S345.
[0164] In step S347, the sequencer 101 sets the number of excess context coding bins of the sub-block to be processed (remBinPass1 after deriving the syntax element value) to the number of excess context coding bins that can be allocated to the next sub-block (remBinPass1Next), for example, as shown in the 21st and 22nd rows from the top of Figure 31.
[0165] In step S348, the sequencer 101 determines whether all sub-blocks have been processed. If it is determined that an unprocessed sub-block exists in the block to be processed, the process returns to step S342, and the subsequent processes are repeated. That is, each process from step S342 to step S348 is executed for each sub-block in the block to be processed. Then, if it is determined in step S348 that all sub-blocks in the block to be processed have been processed, the syntax element value derivation process ends, and the process returns to FIG. 6.
[0166] By executing the processes of each step as described above, the sequencer 101 can change the constraint on the number of context coding bins for each sub-block. For example, the number of surplus context coding bins for the sub-block to be processed can be used as the number of context coding bins for the sub-blocks to be processed next or later. This makes it possible to suppress a decrease in coding efficiency.
[0167] As described above, by confining the management of the number of context coding bins within a block (for example, a TU), an increase in the amount of processing can be suppressed.
[0168] <Coefficient data derivation process flow> In this case, the configuration of the decoding device 200 is the same as that of the first embodiment (FIG. 13). The configuration of the CABAC 201 is also the same as that of the first embodiment (FIG. 14). The flow of the decoding process executed by the decoding device 200 is also the same as that of the first embodiment (FIG. 15). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 16).
[0169] An example of the flow of the coefficient data derivation process in this case will be described with reference to the flowchart in Fig. 33. This coefficient data derivation process is executed in a flow substantially similar to that of the syntax element value derivation process (Fig. 28). That is, the processes of each step of the coefficient data derivation process (steps S361 to S368 in Fig. 33) are executed in a substantially similar manner to the processes of the syntax element value derivation process (steps S341 to S348 in Fig. 28).
[0170] However, in step S363, the parser 202 decodes the sub-block coefficient flag (coded_sub_block_flag) for the sub-block to be processed, for example, as shown in the third to eleventh rows from the top of Fig. 30. When the process of step S363 ends, the process proceeds to step S364.
[0171] In step S366, the parser 202 parses the syntax element values and derives coefficient data for the sub-block to be processed so as not to exceed the upper limit (remBinPass1) of the number of context encoding bins set in step S365. When the process of step S366 ends, the process proceeds to step S367.
[0172] By executing the processes of each step as described above, the parser 202 can change the constraint on the number of context coding bins for each sub-block. For example, the number of surplus context coding bins for the sub-block to be processed can be used as the number of context coding bins for the sub-blocks to be processed next and thereafter. This makes it possible to suppress a decrease in coding efficiency.
[0173] As described above, by confining the management of the number of context coding bins within a block (for example, a TU), an increase in the amount of processing can be suppressed.
[0174] <5. Fourth embodiment> <Method #4> The above-mentioned methods can be arbitrarily combined as long as no contradiction occurs. For example, as shown in the top row of the table in FIG. 34, the above-mentioned methods #1 to #3 may be combined.
[0175] For example, as shown in the second row from the top of the table in Fig. 34, the sub-block coefficient flag (coded_sub_block_flag) is taken out of the existing loop and made independent. That is, like method #1 and method #2, first, the sub-block coefficient flags for all sub-blocks in the TU are parsed.
[0176] Then, as in method #1 and method #2, sub-blocks with coded_sub_block_flag=0, i.e., zero sub-blocks, are counted.
[0177] Then, as in method #1, the number of zero subblocks times the number of context coding bins for one subblock is circulated (added) to the non-zero subblocks. Also, as in method #2, the number of context coding bins assigned to each non-zero subblock is shared. Furthermore, as in method #3, the number of surplus context coding bins generated in the subblock to be processed is pooled and used for the next and subsequent subblocks.
[0178] Also, like methods #1 to #3, the management of the number of context coding bins is closed within a TU (predetermined unit). That is, the number of context coding bins is distributed for each block as described above.
[0179] By doing so, as shown in the third row from the top of the table shown in Fig. 34, the effects of each of the above-mentioned methods #1 to #3 can be obtained. Therefore, it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of the decoded image.
[0180] For example, as shown in A of FIG. 35, when a constraint of 30 bins is set for each subblock, even if subblocks 11-2 and 11-3 are zero subblocks, their excess context coding bin numbers cannot be used in subblocks 11-1 and 11-4, which are non-zero subblocks. In addition, the excess context coding bin numbers cannot be shared between non-zero subblocks. Furthermore, even when only 20 bins are generated in subblock 11-1, which is a non-zero subblock, the 10 bins up to the upper limit cannot be passed to subblock 11-4, which is another non-zero subblock to be processed next or later. Therefore, subblock 11-4 is subject to the constraint of 30 bins, and the context coding bin number cannot be increased beyond the upper limit of 30 bins.
[0181] On the other hand, in the case of method #4, as shown in B of FIG. 35, the extra context coding bin numbers of sub-blocks 11-2 and 11-3, which are zero sub-blocks, can be assigned to sub-blocks 11-1 and 11-4, which are non-zero sub-blocks. Also, the context coding bin numbers can be shared between sub-blocks 11-1 and 11-4, which are non-zero sub-blocks. Furthermore, the extra context coding bin number of sub-block 11-1 (10 bins in the example of A of FIG. 35) can be assigned to sub-block 11-4. That is, syntax element values of 30 bins or more can be generated in the sub-blocks. Therefore, it is possible to suppress a decrease in coding efficiency.
[0182] <Syntax element value derivation process flow> In this case, the configuration of the encoding device 100 is the same as that of the first embodiment (FIG. 4). The configuration of the CABAC 102 is also the same as that of the first embodiment (FIG. 5). The flow of the encoding process executed by the encoding device 100 is also the same as that of the first embodiment (FIG. 6). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 12).
[0183] An example of the flow of the syntax element value derivation process in this case will be described with reference to the flowcharts in Figures 36 and 37. Figures 38 to 41 are diagrams showing examples of the syntax of residual coding. These diagrams will be used for explanation as necessary. In the syntax in Figures 38 to 41, the thresholds (TH1 to TH4) can take the following values, for example:
[0184] TH1 = 6, TH2 = 28, TH3 = 2, TH4 = 4
[0185] Of course, the values of the thresholds are arbitrary and are not limited to this example.
[0186] When the syntax element value derivation process starts, the sequencer 101 encodes the sub-block coefficient flag (coded_sub_block_flag) in the block to be processed in step S381 in FIG. 36, as shown in the first to tenth rows from the top in FIG.
[0187] In step S382, the sequencer 101 counts the number of non-zero sub-blocks (numNonZeroSbk) based on the value of the sub-block coefficient flag, for example, as shown in the 12th to 15th rows from the top of Fig. 39. That is, the sequencer 101 counts the number of sub-blocks with coded_sub_block_flag=1 for the block to be processed.
[0188] In step S383, the sequencer 101 sets a tentative upper limit (remBinPass1Tmp) of the number of context-coded bins per sub-block, for example, as shown in the 17th and 18th rows from the top of Fig. 39. As in the case of method #1, this tentative upper limit (remBinPass1Tmp) may be set based on the size of the sub-block.
[0189] In step S384, the sequencer 101 sets the number of extra context coding bins (remBinPass1InZeroSbk) for the entire zero subblock based on the number of zero subblocks (numZeroSBk), for example, as shown in the 19th and 20th rows from the top of Fig. 39. As in the case of method #1, the number of zero subblocks (numZeroSBk) can be found from the number of non-zero subblocks (numNonZeroSbk) counted in step S382, and the number of extra context coding bins (remBinPass1InZeroSbk) for the entire zero subblock is derived by multiplying the number of zero subblocks (numZeroSBk) and a temporary upper limit (remBinPass1Tmp).
[0190] In step S385, the sequencer 101 sets an average number of extra context coding bins (remBinPass1Extra) that can be additionally assigned per non-zero subblock, for example, as shown in the 21st and 22nd rows from the top of Fig. 39. This average number of extra context coding bins (remBinPass1Extra) can be derived by dividing the number of extra context coding bins (remBinPass1InZeroSbk) of all zero subblocks derived in step S384 by the number of zero subblocks (numZeroSBk). Note that in order to avoid division, the average number of extra context coding bins (remBinPass1Extra) may be derived using a lookup table.
[0191] In step S386, the sequencer 101 initializes the number of excess context encoding bins (remBinPass1Next) that can be assigned to the next sub-block (e.g., remBinPass1Next = 0), for example, as shown in the 24th and 25th rows from the top of Fig. 39. That is, in the initial value, the number of excess context encoding bins is 0, which indicates that no bins can be added to the next sub-block.
[0192] When the process of step S386 ends, the process proceeds to FIG.
[0193] Next, the process moves to processing for each subblock. That is, the process moves to processing within the loop of the for statement for each subblock in the syntax. In step S391, the sequencer 101 selects a subblock to be processed (subSetId=i) from among the subblocks in the block to be processed.
[0194] In step S392, the sequencer 101 sets an upper limit value (remBinPass1) of the number of context coding bins for the sub-block to be processed based on a tentative upper limit value (remBinPass1Tmp), an average number of extra context coding bins that can be additionally allocated from the zero sub-block (remBinPass1Extra), and the number of extra context coding bins of the previous sub-block, as shown in the fifth and sixth rows from the top of Fig. 40. In the example of Fig. 40, the upper limit value (remBinPass1) of the number of context coding bins is derived as the sum of the tentative upper limit value (remBinPass1Tmp), the average number of extra context coding bins that can be additionally allocated from the zero sub-block (remBinPass1Extra), and the number of extra context coding bins that can be allocated to the next sub-block (remBinPass1Next).
[0195] In step S393, the sequencer 101 derives syntax element values for the sub-block to be processed so as not to exceed the upper limit (remBinPass1) of the number of context coding bins.
[0196] In step S394, the sequencer 101 sets the number of excess context coding bins of the sub-block to be processed (remBinPass1 after deriving the syntax element value) to the number of excess context coding bins that can be allocated to the next sub-block (remBinPass1Next), for example, as shown in the 40th and 41st rows from the top of Figure 40.
[0197] In step S395, the sequencer 101 determines whether all sub-blocks have been processed. If it is determined that an unprocessed sub-block exists in the processing target block, the process returns to step S391, and the subsequent processes are repeated. That is, each process from step S391 to step S395 is executed for each sub-block in the processing target block. Then, if it is determined in step S395 that all sub-blocks in the processing target block have been processed, the syntax element value derivation process ends, and the process returns to FIG. 6.
[0198] By executing the process of each step as described above, the sequencer 101 can change the constraint of the number of context coding bins for each subblock. That is, the effects of each of the above-mentioned methods #1 to #3 can be obtained. Therefore, it is possible to suppress the reduction in coding efficiency. In other words, it is possible to suppress the reduction in image quality of the decoded image.
[0199] <Coefficient data derivation process flow> In this case, the configuration of the decoding device 200 is the same as that of the first embodiment (FIG. 13). The configuration of the CABAC 201 is also the same as that of the first embodiment (FIG. 14). The flow of the decoding process executed by the decoding device 200 is also the same as that of the first embodiment (FIG. 15). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 16).
[0200] An example of the flow of the coefficient data derivation process in this case will be described with reference to the flowcharts of Figures 42 and 43. This coefficient data derivation process is executed in a flow substantially similar to that of the syntax element value derivation process (Figures 36 and 37). That is, the processes of each step of the coefficient data derivation process (steps S411 to S416 in Figure 42 and steps S421 to S425 in Figure 43) are executed in a substantially similar manner to the processes of the syntax element value derivation process (steps S381 to S386 in Figure 36 and steps S391 to S395 in Figure 37).
[0201] However, in step S411 in Fig. 42, the parser 202 decodes the sub-block coefficient flag (coded_sub_block_flag) for the sub-block to be processed, for example, as shown in the first to tenth rows from the top of Fig. 39. When the process of step S411 ends, the process proceeds to step S412.
[0202] 43, the parser 202 parses syntax element values for the sub-block to be processed so as not to exceed the upper limit (remBinPass1) of the number of context encoding bins set in step S422, and derives coefficient data. When the process of step S423 ends, the process proceeds to step S424.
[0203] By executing the process of each step as described above, the parser 202 can change the constraint of the number of context coding bins for each subblock. That is, the effects of each of the above-mentioned methods #1 to #3 can be obtained. Therefore, it is possible to suppress the decrease in coding efficiency. In other words, it is possible to suppress the decrease in image quality of the decoded image.
[0204] <6. Fifth embodiment> <Method #5> Furthermore, for example, as an application of method #1 as shown in the top row of the table in FIG. 44, the priority for allocating the number of excess context coding bins may be set according to the position of the sub-block.
[0205] For example, as shown in the second row from the top of the table in Fig. 44, a larger number of excess context coding bins may be assigned to a sub-block in a low frequency band, and a smaller number of excess context coding bins may be assigned to a sub-block in a high frequency band. Conversely, a larger number of excess context coding bins may be assigned to a sub-block in a high frequency band, and a smaller number of excess context coding bins may be assigned to a sub-block in a low frequency band.
[0206] In this way, as shown in the third row from the top of the table in Fig. 44, the redundant context coding bin number can be used as the context coding bin number of other sub-blocks, so that it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of the decoded image.
[0207] For example, in the case of A in FIG. 45, a larger number of extra context coding bins is assigned to the sub-block 11-1, which is a sub-block in the low frequency range, than to the sub-block 11-4, which is a sub-block in the high frequency range. In general, coefficient data obtained by orthogonal transforming image data is concentrated in the low frequency range rather than in the high frequency range. Therefore, in such a case, by assigning a larger number of extra context coding bins to the sub-block in the low frequency range as in the example of A in FIG. 45, it is possible to further suppress the reduction in coding efficiency.
[0208] Also, for example, in the case of B in FIG. 45, a larger number of excess context coding bins is assigned to the sub-block 11-4, which is a sub-block in the high frequency band, than to the sub-block 11-1, which is a sub-block in the low frequency band. For example, in the case of lossless coding, when the orthogonal transform is skipped, the amount of high frequency coefficient data is generally more likely to be larger than when the orthogonal transform is performed. Also, for example, in the case of an image with many edge components, the amount of high frequency coefficient data is likely to be larger. In such a case, by assigning a larger number of excess context coding bins to the sub-block in the high frequency band as in the example of B in FIG. 45, it is possible to further suppress the reduction in coding efficiency.
[0209] In this case, the configuration of the encoding device 100 is the same as that of the first embodiment (FIG. 4). The configuration of the CABAC 102 is also the same as that of the first embodiment (FIG. 5). The flow of the encoding process executed by the encoding device 100 is also the same as that of the first embodiment (FIG. 6). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 12).
[0210] Furthermore, the syntax element value derivation process is basically the same as that in the first embodiment (FIG. 7). In step S127, when setting the upper limit of the number of context coding bins for the sub-block to be processed, the position of the sub-block to be processed may be taken into consideration, as described above.
[0211] Also in this case, the configuration of the decoding device 200 is the same as that in the first embodiment (FIG. 13). Also, the configuration of the CABAC 201 is the same as that in the first embodiment (FIG. 14). Furthermore, the flow of the decoding process executed by the decoding device 200 is the same as that in the first embodiment (FIG. 15). Also, the flow of the CABAC process is the same as that in the first embodiment (FIG. 16).
[0212] Furthermore, the coefficient data derivation process is basically the same as that of the first embodiment (FIG. 17). In step S257, when setting the upper limit of the context coding bin number for the sub-block to be processed, the setting may be made taking into consideration the position of the sub-block to be processed, as described above.
[0213] <7. Sixth embodiment> <Method #6> Also, for example, as shown in the top row of the table in FIG. 46, the unit for managing the number of context coding bins may be expanded to a size larger than a TU.
[0214] For example, as shown in the second row from the top of the table in Fig. 46, the number of excess context coding bins may be managed for each CU, VPDU, or CTU. In other words, the number of bins may be distributed among non-zero sub-blocks in a CU, VPDU, or CTU, and an upper limit value for the number of bins assigned to a sub-block to be processed may be set.
[0215] In this way, the number of surplus context coding bins can be shared over a wider range. That is, as shown in the third row from the top of the table in FIG. 46, the number of context coding bins can be allocated with a higher degree of freedom. Therefore, it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of a decoded image.
[0216] For example, as shown in A of Fig. 47, it is assumed that a CU 400 is made up of 4x4 sub-blocks 401 (sub-blocks 401-1 to 401-16), and that each sub-block is processed in the order of the Morton code as indicated by the arrows in the figure.
[0217] When there is a restriction of 30 bins per subblock as in B of Fig. 47, even if there is a zero subblock, the number of surplus context coding bins cannot be used in the next or subsequent subblocks. Therefore, the number of context coding bins is limited to 30 bins or less in all subblocks.
[0218] Therefore, method #6 is applied to share the number of excess context coding bins within CU 400. In this case, as shown in C of FIG. 47, the number of excess context coding bins generated in the sub-block to be processed can be assigned to the sub-blocks to be processed next or later. Therefore, syntax element values of 30 bins or more can be generated in sub-block 401. Therefore, it is possible to suppress a decrease in coding efficiency. In particular, in the case of method #6, the range in which the number of excess context coding bins is shared is wider than that of TU, so that the number of context coding bins can be assigned with a higher degree of freedom.
[0219] In this case, the configuration of the encoding device 100 is the same as that of the first embodiment (FIG. 4). The configuration of the CABAC 102 is also the same as that of the first embodiment (FIG. 5). The flow of the encoding process executed by the encoding device 100 is also the same as that of the first embodiment (FIG. 6). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 12).
[0220] Furthermore, the syntax element value derivation process is also basically the same as that in the first embodiment (FIG. 7).The processing target block may be a data unit larger than a TU (for example, a CU, a VPDU, or a CTU).
[0221] Also in this case, the configuration of the decoding device 200 is the same as that in the first embodiment (FIG. 13). Also, the configuration of the CABAC 201 is the same as that in the first embodiment (FIG. 14). Furthermore, the flow of the decoding process executed by the decoding device 200 is the same as that in the first embodiment (FIG. 15). Also, the flow of the CABAC process is the same as that in the first embodiment (FIG. 16).
[0222] Furthermore, the coefficient data derivation process is basically the same as that in the first embodiment (FIG. 17).The processing target block may be a data unit larger than a TU (for example, a CU, a VPDU, or a CTU).
[0223] <8. Seventh embodiment> <Method #7> Also, for example, as shown in the top row of the table in FIG. 48, the upper limit on the maximum value of the number of context coding bins in the syntax structure may be omitted (not set).
[0224] For example, as shown in the second row from the top of the table in Fig. 48, the amount of bins generated may be limited by a level constraint, a conditional expression, etc. Also, the amount of bins generated may be limited not in units of sub-blocks but in units of data larger than sub-blocks (for example, units of TUs, CUs, VPDUs, CTUs, slices, or pictures).
[0225] In this way, as shown in the third row from the top of the table in FIG. 48, when local coefficient data occurs, many coefficients can be expressed by flags. Therefore, it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of a decoded image.
[0226] For example, as shown in A of Fig. 49, when a constraint of 28 bins is set for each subblock, even if an excess number of context coding bins occurs, the excess number of context coding bins cannot be used in other subblocks. Therefore, for example, even in subblock 11-4, the number of context coding bins cannot be increased beyond the upper limit of 28 bins.
[0227] In contrast, in the case of method #7, as shown in B of FIG. 49, for example, the number of context coding bins can be shared on a CU basis. Therefore, the number of context coding bins of 28 bins or more can be assigned to a subblock. Therefore, it is possible to suppress a decrease in coding efficiency.
[0228] <Syntax element value derivation process flow> In this case, the configuration of the encoding device 100 is the same as that of the first embodiment (FIG. 4). The configuration of the CABAC 102 is also the same as that of the first embodiment (FIG. 5). The flow of the encoding process executed by the encoding device 100 is also the same as that of the first embodiment (FIG. 6). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 12).
[0229] An example of the flow of the syntax element value derivation process in this case will be described with reference to the flowchart in Fig. 50. Note that, here, an example will be described in which the number of context coding bins is shared on a CU-by-CU basis. Also, Figs. 51 to 53 are diagrams showing examples of the syntax of residual coding. These diagrams will be used for explanation as necessary.
[0230] When the syntax element value derivation process is started, in step S441, the sequencer 101 sets an upper limit (remBinsPass1) on the number of context coding bins that can be allocated to the entire CU based on the number of context coding bins that can be allocated per coefficient ("*7)>>2") and the CU size (log2TbWidth, log2TbHeight), as shown in the 21st row from the top of Figure 51, for example.
[0231] Next, the process proceeds to processing each sub-block. In step S442, the sequencer 101 selects a sub-block to be processed from among the sub-blocks in the CU to be processed.
[0232] In step S443, the sequencer 101 derives syntax element values for the sub-block to be processed so as not to exceed the upper limit (remBinsPass1) of the number of context coding bins that can be assigned to all CUs as a whole, which was set in step S441.
[0233] In step S444, the sequencer 101 determines whether all sub-blocks have been processed. If it is determined that an unprocessed sub-block exists in the processing target CU, the process returns to step S442, and the subsequent processes are repeated. That is, each process from step S442 to step S444 is executed for each sub-block in the processing target CU. Then, if it is determined in step S444 that all sub-blocks in the processing target CU have been processed, the syntax element value derivation process ends, and the process returns to FIG. 6.
[0234] By executing the process of each step as described above, the sequencer 101 can change the constraint of the number of context coding bins for each subblock. For example, the number of context coding bins can be shared on a CU basis. Therefore, it is possible to suppress a decrease in coding efficiency.
[0235] As described above, by confining the management of the number of context coding bins within a block (for example, a CU), it is possible to suppress an increase in the amount of processing.
[0236] <Coefficient data derivation process flow> In this case, the configuration of the decoding device 200 is the same as that of the first embodiment (FIG. 13). The configuration of the CABAC 201 is also the same as that of the first embodiment (FIG. 14). The flow of the decoding process executed by the decoding device 200 is also the same as that of the first embodiment (FIG. 15). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 16).
[0237] An example of the flow of the coefficient data derivation process in this case will be described with reference to the flowchart in Fig. 54. This coefficient data derivation process is executed in a flow substantially similar to that of the syntax element value derivation process (Fig. 50). That is, the processes of each step of the coefficient data derivation process (steps S461 to S464 in Fig. 54) are executed in a substantially similar manner to the processes of the syntax element value derivation process (steps S441 to S444 in Fig. 50).
[0238] However, in step S463, the parser 202 parses the syntax element values and derives the coefficient data for the sub-block to be processed so as not to exceed the upper limit (remBinsPass1) of the number of context coding bins that can be assigned to the entire CU set in step S461. When the process of step S463 ends, the process proceeds to step S464.
[0239] By executing the process of each step as described above, the parser 202 can change the constraint of the number of context coding bins for each subblock. For example, the number of context coding bins can be shared on a CU basis. Therefore, it is possible to suppress a decrease in coding efficiency.
[0240] As described above, by confining the management of the number of context coding bins within a block (for example, a CU), it is possible to suppress an increase in the amount of processing.
[0241] <9. Eighth embodiment> <Method #8> Also, for example, as shown in the top row of the table in FIG. 55, the upper limit on the maximum value of the number of context coding bins in the syntax structure may be omitted (not set).
[0242] In this case, for example, as shown in the second row from the top of the table in Fig. 55, the maximum number of bins that can be generated in the non-zero sub-block next to the zero sub-block may be set as the upper limit. Also, when zero sub-blocks are consecutive, the maximum number of bins that can be generated in the same number of non-zero sub-blocks may be set as the upper limit. In other words, the maximum number of bins that can be generated in the same number of non-zero sub-blocks as the zero sub-blocks may be set as the upper limit.
[0243] In this way, as shown in the third row from the top of the table in FIG. 55, when local coefficient data occurs, many coefficients can be expressed by flags. Therefore, it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of a decoded image.
[0244] For example, in the case of A in FIG. 56, there is a restriction of 28 bins per subblock. Subblock 11-1 and subblock 11-3 are zero subblocks, and an excess context coding bin number (28 bins) is generated. However, in this case, the excess context coding bin number cannot be used in other subblocks. In other words, in subblock 11-2 and subblock 11-4, which are non-zero subblocks, a number of bins more than the upper limit of 28 bins cannot be assigned.
[0245] In contrast, in the case of method #8, the maximum number of bins that can occur in the next non-zero sub-block of the zero sub-block can be set as the upper limit. For example, as shown in B of FIG. 56, since sub-block 11-1 is the zero sub-block, the maximum number of bins (48 bins) that can occur in one sub-block can be assigned as the upper limit to sub-block 11-2, which is the next non-zero sub-block to be processed. Similarly, since sub-block 11-3 is the zero sub-block, the maximum number of bins (48 bins) that can occur in one sub-block can be assigned as the upper limit to sub-block 11-4, which is the next non-zero sub-block to be processed.
[0246] Furthermore, when there is a constraint of 28 bins per subblock, even when subblocks 11-1 and 11-2 are zero subblocks, as in C of Figure 56, the number of excess context coding bins generated in those subblocks 11 cannot be used in subblocks 11-3 and 11-4, which are non-zero subblocks.
[0247] In contrast, in the case of method #8, when the subblocks are arranged in this way, subblocks 11-1 and 11-2 are consecutive zero subblocks as shown in D of Fig. 56, so the maximum number of bins occurring in one subblock can be assigned as the upper limit value in the two non-zero subblocks to be processed from the next onwards. That is, in subblocks 11-3 and 11-4, the maximum number of bins occurring in one subblock (48 bins) can be assigned as the upper limit value.
[0248] <Syntax element value derivation process flow> In this case, the configuration of the encoding device 100 is the same as that of the first embodiment (FIG. 4). The configuration of the CABAC 102 is also the same as that of the first embodiment (FIG. 5). The flow of the encoding process executed by the encoding device 100 is also the same as that of the first embodiment (FIG. 6). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 12).
[0249] An example of the flow of the syntax element value derivation process in this case will be described with reference to the flowchart in FIG.
[0250] When the syntax element value derivation process starts, the sequencer 101 initializes the count value of the zero sub-block in step S481. For example, the sequencer 101 sets the count value of the zero sub-block to "0."
[0251] Next, the process moves to processing for each sub-block. In step S482, the sequencer 101 selects a sub-block to be processed.
[0252] In step S483, the sequencer 101 codes the sub-block coefficient flag (coded_sub_block_flag) for the sub-block to be processed.
[0253] In step S484, the sequencer 101 determines whether the sub-block to be processed is a non-zero block based on the value of the sub-block coefficient flag. If coded_sub_block_flag=1 and it is determined that the sub-block is a non-zero sub-block, the process proceeds to step S485.
[0254] In step S485, the sequencer 101 determines whether the count value of the zero subblock is "0." If it is determined that the count value is "0," the process proceeds to step S486. In this case, the constraint on the number of bins is applied to the subblock to be processed.
[0255] Therefore, in step S486, the sequencer 101 sets an upper limit value (remBinPass1) of the number of context encoding bins for the sub-block to be processed. That is, the upper limit value (remBinPass1) of the number of context encoding bins is set based on the constraint on the number of bins for the sub-block to be processed.
[0256] In step S487, the sequencer 101 derives syntax element values for the sub-block to be processed so as not to exceed the upper limit value (remBinPass1) of the number of context coding bins set in step S486. When the process of step S487 ends, the process proceeds to step S491.
[0257] Also, if it is determined in step S485 that the count value of the zero sub-block is equal to or greater than "1", the process proceeds to step S488.
[0258] In step S488, the sequencer 101 derives a syntax element value for the sub-block to be processed. In this case, the number of extra context coding bins can be added from the zero sub-block, and the constraint on the number of bins is not applied to the sub-block to be processed. In other words, the upper limit value (remBinPass1) of the number of context coding bins is not set, and the syntax element value is derived.
[0259] In step S489, the sequencer 101 decrements the count value of the zero sub-block (for example, subtracts "1" from the count value). When the process of step S489 ends, the process proceeds to step S491.
[0260] Also, if it is determined in step S484 that the block to be processed is the zero subblock, the process proceeds to step S490. In this case, derivation of the syntax element value is omitted. In step S490, the sequencer 101 increments the count value of the zero subblock (for example, adds "1" to the count value). When the process of step S490 ends, the process proceeds to step S491.
[0261] In step S491, the sequencer 101 determines whether all sub-blocks have been processed. If it is determined that an unprocessed sub-block exists in the processing target block, the process returns to step S482, and the subsequent processes are repeated. That is, each process from step S482 to step S491 is executed for each sub-block in the processing target block. Then, in step S491, if it is determined that all sub-blocks in the processing target block have been processed, the syntax element value derivation process ends, and the process returns to FIG. 6.
[0262] As described above, by using the count value of the zero subblock, it is possible to omit setting the upper limit value (remBinPass1) of the number of context coding bins for the same number of non-zero subblocks as the zero subblock. That is, by executing the processing of each step as described above, the sequencer 101 can make the constraint of the number of context coding bins for each subblock variable. Therefore, it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of the decoded image.
[0263] <Coefficient data derivation process flow> In this case, the configuration of the decoding device 200 is the same as that of the first embodiment (FIG. 13). The configuration of the CABAC 201 is also the same as that of the first embodiment (FIG. 14). The flow of the decoding process executed by the decoding device 200 is also the same as that of the first embodiment (FIG. 15). The flow of the CABAC process is also the same as that of the first embodiment (FIG. 16).
[0264] An example of the flow of the coefficient data derivation process in this case will be described with reference to the flowchart in Fig. 58. This coefficient data derivation process is executed in a flow substantially similar to that of the syntax element value derivation process (Fig. 57). That is, the processes of each step of the coefficient data derivation process (steps S521 to S531 in Fig. 58) are executed in a substantially similar manner to the processes of the syntax element value derivation process (steps S481 to S491 in Fig. 57).
[0265] However, in step S523 in Fig. 58, the parser 202 decodes the sub-block coefficient flag (coded_sub_block_flag) for the sub-block to be processed. When the process of step S523 ends, the process proceeds to step S524.
[0266] 58, the parser 202 parses the syntax element value for the sub-block to be processed so as not to exceed the upper limit (remBinPass1) of the number of context encoding bins set in step S526, and derives coefficient data. When the process of step S527 ends, the process proceeds to step S531.
[0267] 58, the parser 202 parses the syntax element values for the sub-block to be processed and derives the coefficient data. When the process of step S528 ends, the process proceeds to step S529.
[0268] As described above, by using the count value of the zero subblock, it is possible to omit setting the upper limit value (remBinPass1) of the number of context coding bins for non-zero subblocks of the same number as the zero subblock. In other words, by executing the processing of each step as described above, the parser 202 can make the constraint on the number of context coding bins for each subblock variable. Therefore, it is possible to suppress a decrease in coding efficiency. In other words, it is possible to suppress a decrease in the image quality of the decoded image.
[0269] <10. Ninth embodiment> <Image encoding device> Although an example in which the present technology is applied to the encoding device 100 and the decoding device 200 has been described above, the present technology is not limited to these and can be applied to any apparatus, device, system, etc. For example, the present technology can be applied to an image encoding device that encodes image data.
[0270] Fig. 59 is a block diagram showing an example of the configuration of an image encoding device, which is one aspect of an image processing device to which the present technology is applied. The image encoding device 600 shown in Fig. 59 is a device that encodes image data of a moving image. For example, the image encoding device 600 encodes image data of a moving image by any of the encoding methods described in Non-Patent Documents 1 to 12.
[0271] Note that Figure 59 shows the main processing units (blocks) and data flows, etc., and is not limited to everything shown in Figure 59. In other words, in the image encoding device 600, there may be processing units that are not shown as blocks in Figure 59, and there may be processes and data flows that are not shown as arrows or the like in Figure 59.
[0272] As shown in FIG. 59, the image encoding device 600 includes a control unit 601, a rearrangement buffer 611, a calculation unit 612, an orthogonal transformation unit 613, a quantization unit 614, an encoding unit 615, an accumulation buffer 616, an inverse quantization unit 617, an inverse orthogonal transformation unit 618, a calculation unit 619, an in-loop filter unit 620, a frame memory 621, a prediction unit 622, and a rate control unit 623.
[0273] <Control Unit> The control unit 601 divides the video data held by the rearrangement buffer 611 into blocks (CU, PU, transform block, etc.) of processing units based on an external or pre-specified block size of processing units. The control unit 601 also determines the coding parameters (header information Hinfo, prediction mode information Pinfo, transform information Tinfo, filter information Finfo, etc.) to be supplied to each block based on, for example, RDO (Rate-Distortion Optimization).
[0274] These coding parameters will be described in detail later. After determining the coding parameters as described above, the control unit 601 supplies them to each block. More specifically, the process is as follows.
[0275] Header information Hinfo is provided for each block. The prediction mode information Pinfo is supplied to the encoding unit 615 and the prediction unit 622 . The transformation information Tinfo is supplied to an encoding unit 615 , an orthogonal transformation unit 613 , a quantization unit 614 , an inverse quantization unit 617 , and an inverse orthogonal transformation unit 618 . The filter information Finfo is supplied to the in-loop filter unit 620 .
[0276] <Sorting Buffer> To the image coding device 600, each field (input image) of video image data is input in its playback order (display order). The reordering buffer 611 acquires and holds (stores) each input image in its playback order (display order). Under the control of the control unit 601, the reordering buffer 611 reorders the input images in coding order (decoding order) and divides them into blocks of processing units. The reordering buffer 611 supplies each processed input image to the calculation unit 612. The reordering buffer 611 also supplies each input image (original image) to the prediction unit 622 and the in-loop filter unit 620.
[0277] <Arithmetic section> The calculation unit 612 receives as input an image I corresponding to a block of a processing unit and a predicted image P supplied from the prediction unit 622, subtracts the predicted image P from the image I as shown in the following equation, derives a prediction residual D, and supplies it to the orthogonal transformation unit 613.
[0278] D = I - P
[0279] <Orthogonal transformation section> The orthogonal transform unit 613 receives the prediction residual D supplied from the calculation unit 612 and the transformation information Tinfo supplied from the control unit 601, and performs an orthogonal transform on the prediction residual D based on the transformation information Tinfo to derive a transformation coefficient Coeff. The orthogonal transform unit 613 can perform adaptive orthogonal transform (AMT) that adaptively selects the type of orthogonal transform (transform coefficient). The orthogonal transform unit 613 supplies the obtained transformation coefficient Coeff to the quantization unit 614.
[0280] <Quantization part> The quantization unit 614 receives the transform coefficient Coeff supplied from the orthogonal transformation unit 613 and the transform information Tinfo supplied from the control unit 601, and scales (quantizes) the transform coefficient Coeff based on the transform information Tinfo. The quantization rate is controlled by the rate control unit 623. The quantization unit 614 supplies the quantized transform coefficient obtained by such quantization, i.e., the quantized transform coefficient level, to the encoding unit 615 and the inverse quantization unit 617.
[0281] <Encoding part> The encoding unit 615 receives as input the quantized transform coefficient level LEVEL supplied from the quantization unit 614, various encoding parameters (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, etc.) supplied from the control unit 601, information on filters such as filter coefficients supplied from the in-loop filter unit 620, and information on an optimal prediction mode supplied from the prediction unit 622. The encoding unit 615 performs variable-length coding (for example, arithmetic coding) on the quantized transform coefficient level LEVEL to generate a bit string (coded data).
[0282] Furthermore, the encoding unit 615 derives residual information Rinfo from the quantized transform coefficient level level, encodes the residual information Rinfo, and generates a bit string.
[0283] Furthermore, the encoding unit 615 includes information on the filter supplied from the in-loop filter unit 620 in the filter information Finfo, and includes information on the optimal prediction mode supplied from the prediction unit 622 in the prediction mode information Pinfo. Then, the encoding unit 615 encodes the various encoding parameters (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, etc.) described above to generate a bit string.
[0284] The encoding unit 615 multiplexes the bit strings of the various types of information generated as described above to generate encoded data. The encoding unit 615 supplies the encoded data to the accumulation buffer 616.
[0285] <Accumulation buffer> The accumulation buffer 616 temporarily holds the encoded data obtained in the encoding unit 615. The accumulation buffer 616 outputs the held encoded data, for example as a bit stream, to the outside of the image encoding device 600 at a predetermined timing. For example, this encoded data is transmitted to the decoding side via an arbitrary recording medium, an arbitrary transmission medium, an arbitrary information processing device, etc. In other words, the accumulation buffer 616 is also a transmission unit that transmits the encoded data (bit stream).
[0286] <Inverse quantization section> The inverse quantization unit 617 performs processing related to inverse quantization. For example, the inverse quantization unit 617 receives the quantized transform coefficient level level supplied from the quantization unit 614 and the transformation information Tinfo supplied from the control unit 601 as input, and scales (inverse quantizes) the value of the quantized transform coefficient level level based on the transformation information Tinfo. Note that this inverse quantization is the inverse process of the quantization performed in the quantization unit 614. The inverse quantization unit 617 supplies the transformation coefficient Coeff_IQ obtained by such inverse quantization to the inverse orthogonal transformation unit 618.
[0287] <Inverse orthogonal transform section> The inverse orthogonal transform unit 618 performs processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 618 receives the transform coefficient Coeff_IQ supplied from the inverse quantization unit 617 and the transform information Tinfo supplied from the control unit 601, and performs inverse orthogonal transform on the transform coefficient Coeff_IQ based on the transform information Tinfo to derive a prediction residual D'. Note that this inverse orthogonal transform is an inverse process of the orthogonal transform performed in the orthogonal transform unit 613. In other words, the inverse orthogonal transform unit 618 can perform adaptive inverse orthogonal transform (AMT) that adaptively selects the type of inverse orthogonal transform (transform coefficient).
[0288] The inverse orthogonal transform unit 618 supplies the prediction residual D' obtained by such inverse orthogonal transform to the calculation unit 619. Note that since the inverse orthogonal transform unit 618 is similar to an inverse orthogonal transform unit (described later) on the decoding side, the explanation on the decoding side (described later) can be applied to the inverse orthogonal transform unit 618.
[0289] <Arithmetic section> The calculation unit 619 receives as input the prediction residual D' supplied from the inverse orthogonal transform unit 618 and the predicted image P supplied from the prediction unit 622. The calculation unit 619 adds the prediction residual D' to the predicted image P corresponding to the prediction residual D' to derive a local decoded image Rlocal. The calculation unit 619 supplies the derived local decoded image Rlocal to the in-loop filter unit 620 and the frame memory 621.
[0290] <In-loop filter section> The in-loop filter unit 620 performs processing related to in-loop filter processing. For example, the in-loop filter unit 620 receives the locally decoded image Rlocal supplied from the calculation unit 619, the filter information Finfo supplied from the control unit 601, and the input image (original image) supplied from the rearrangement buffer 611. Note that any information is input to the in-loop filter unit 620, and information other than these may be input. For example, a prediction mode, motion information, a code amount target value, a quantization parameter QP, a picture type, information on a block (CU, CTU, etc.), etc. may be input to the in-loop filter unit 620 as necessary.
[0291] The in-loop filter unit 620 performs an appropriate filter process on the locally decoded image Rlocal based on the filter information Finfo. The in-loop filter unit 620 also uses the input image (original image) and other input information for the filter process as necessary.
[0292] For example, the in-loop filter unit 620 applies four in-loop filters, a bilateral filter, a deblocking filter (DBF (DeBlocking Filter)), an adaptive offset filter (SAO (Sample Adaptive Offset)), and an adaptive loop filter (ALF (Adaptive Loop Filter)), in this order, as described in Non-Patent Document 11. Note that which filters are applied and in what order they are applied are arbitrary and can be appropriately selected.
[0293] Of course, the filtering process performed by the in-loop filter unit 620 is arbitrary and is not limited to the above example. For example, the in-loop filter unit 620 may apply a Wiener filter or the like.
[0294] The in-loop filter unit 620 supplies the filtered local decoded image Rlocal to the frame memory 621. When transmitting information about the filter, such as a filter coefficient, to the decoding side, the in-loop filter unit 620 supplies the information about the filter to the encoding unit 615.
[0295] <Frame memory> The frame memory 621 performs processing related to storage of image-related data. For example, the frame memory 621 receives the locally decoded image Rlocal supplied from the calculation unit 619 and the locally decoded image Rlocal that has been subjected to filtering processing supplied from the in-loop filter unit 620, and holds (stores) them. The frame memory 621 also reconstructs a decoded image R for each picture unit using the locally decoded image Rlocal, and holds it (stores it in a buffer in the frame memory 621). The frame memory 621 supplies the decoded image R (or a part thereof) to the prediction unit 622 in response to a request from the prediction unit 622.
[0296] <Prediction Department> The prediction unit 622 performs processing related to the generation of a predicted image. For example, the prediction unit 622 receives the prediction mode information Pinfo supplied from the control unit 601, the input image (original image) supplied from the rearrangement buffer 611, and the decoded image R (or a part thereof) read from the frame memory 621 as input. The prediction unit 622 performs prediction processing such as inter prediction or intra prediction using the prediction mode information Pinfo and the input image (original image), performs prediction by referring to the decoded image R as a reference image, performs motion compensation processing based on the prediction result, and generates a predicted image P. The prediction unit 622 supplies the generated predicted image P to the calculation unit 612 and the calculation unit 619. The prediction unit 622 also supplies information on the prediction mode selected by the above processing, i.e., the optimal prediction mode, to the encoding unit 615 as necessary.
[0297] <Rate control section> The rate control unit 623 performs processing related to rate control. For example, the rate control unit 623 controls the rate of the quantization operation of the quantization unit 614 based on the code amount of the encoded data accumulated in the accumulation buffer 616 so as to prevent overflow or underflow.
[0298] These processing units (the control unit 601, the rearrangement buffer 611 to the rate control unit 623) may have any configuration. For example, each processing unit may be configured with a logic circuit that realizes the above-mentioned processing. Also, each processing unit may have, for example, a CPU, a ROM, a RAM, etc., and may realize the above-mentioned processing by executing a program using them. Of course, each processing unit may have both configurations, and may realize part of the above-mentioned processing by a logic circuit and the other by executing a program. The configurations of each processing unit may be independent of each other, and for example, some processing units may realize part of the above-mentioned processing by a logic circuit, other processing units may realize the above-mentioned processing by executing a program, and still other processing units may realize the above-mentioned processing by both a logic circuit and by executing a program.
[0299] In the image coding device 600 configured as above, the present technology is applied to the coding unit 615. That is, the coding unit 615 has the same configuration as the coding device 100 shown in FIG. 4 and performs the same processing. That is, the coding unit 615 performs any one of the above-mentioned methods #1 to #8. By doing so, the image coding device 600 can obtain the same effect as that described above in any one of the first embodiment to the eighth embodiment. Therefore, the image coding device 600 can suppress a decrease in coding efficiency (improve coding efficiency). In other words, the image coding device 600 can suppress a decrease in the image quality of a decoded image.
[0300] <Image encoding process flow> Next, an example of the flow of image coding processing executed by the image coding device 600 configured as above will be described with reference to the flowchart of FIG.
[0301] When the image encoding process starts, in step S601, the reordering buffer 611 is controlled by the control unit 601 to reorder the frames of the input video data from the display order to the encoding order.
[0302] In step S602, the control unit 601 sets a processing unit for the input image held by the sorting buffer 611 (performs block division).
[0303] In step S603, the control unit 601 determines (sets) coding parameters for the input image held by the reordering buffer 611.
[0304] In step S604, the prediction unit 622 performs a prediction process to generate a predicted image, etc., of an optimal prediction mode. For example, in this prediction process, the prediction unit 622 performs intra prediction to generate a predicted image, etc., of an optimal intra prediction mode, performs inter prediction to generate a predicted image, etc., of an optimal inter prediction mode, and selects an optimal prediction mode from among them based on a cost function value, etc.
[0305] In step S605, the calculation unit 612 calculates the difference between the input image and the prediction image of the optimal mode selected by the prediction process in step S604. That is, the calculation unit 612 generates a prediction residual D between the input image and the prediction image. The prediction residual D thus obtained has a reduced data amount compared to the original image data. Therefore, the data amount can be compressed compared to the case where the image is encoded as it is.
[0306] In step S606, the orthogonal transformation unit 613 performs an orthogonal transformation process on the prediction residual D generated in the process of step S605, and derives a transformation coefficient Coeff.
[0307] In step S607, the quantization unit 614 quantizes the transform coefficient Coeff obtained by the process of step S606 by using the quantization parameter calculated by the control unit 601, etc., to derive the quantized transform coefficient level level.
[0308] In step S608, the inverse quantization unit 617 inverse quantizes the quantized transform coefficient level generated by the process of step S607 with characteristics corresponding to the quantization characteristics of step S607, to derive the transform coefficient Coeff_IQ.
[0309] In step S609, the inverse orthogonal transform unit 618 performs inverse orthogonal transform on the transform coefficient Coeff_IQ obtained by the process of step S608 by a method corresponding to the orthogonal transform process of step S606, and derives a prediction residual D'. Note that this inverse orthogonal transform process is similar to the inverse orthogonal transform process (described later) performed on the decoding side, so the explanation (described later) on the decoding side can be applied to the inverse orthogonal transform process of step S609.
[0310] In step S610, the calculation unit 619 generates a locally decoded image by adding the prediction image obtained by the prediction process in step S604 to the prediction residual D' derived in the process of step S609.
[0311] In step S611, the in-loop filter unit 620 performs an in-loop filter process on the locally decoded image derived in the process of step S610.
[0312] In step S612, the frame memory 621 stores the locally decoded image derived by the process of step S610 and the locally decoded image filtered in step S611.
[0313] In step S613, the encoding unit 615 encodes the quantized transform coefficient level LEVEL obtained by the process of step S607. For example, the encoding unit 615 encodes the quantized transform coefficient level LEVEL, which is information related to an image, by arithmetic encoding or the like to generate encoded data. At this time, the encoding unit 615 also encodes various encoding parameters (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo). Furthermore, the encoding unit 615 derives residual information RInfo from the quantized transform coefficient level LEVEL, and encodes the residual information RInfo.
[0314] In step S614, the accumulation buffer 616 accumulates the encoded data thus obtained and outputs it, for example, as a bit stream, to the outside of the image encoding device 600. This bit stream is transmitted to the decoding side, for example, via a transmission path or a recording medium. In addition, the rate control unit 623 performs rate control as necessary.
[0315] When the process of step S614 ends, the image encoding process ends.
[0316] In the image coding process of the above flow, the present technology is applied to the coding process of step S613. That is, in this step S613, coding process of the same flow as that of FIG. 6 is performed. That is, the coding unit 615 performs coding process using any of the above-mentioned methods #1 to #8. In this way, the image coding device 600 can obtain the same effect as that described above in any of the first to eighth embodiments. Therefore, the image coding device 600 can suppress a decrease in coding efficiency (improve coding efficiency). In other words, the image coding device 600 can suppress a decrease in image quality of a decoded image.
[0317] <Image Decoding Device> Furthermore, for example, the present technology can be applied to an image decoding device that decodes encoded data of image data. FIG. 61 is a block diagram showing an example of a configuration of an image decoding device, which is one aspect of an image processing device to which the present technology is applied. The image decoding device 700 shown in FIG. 61 is a device that encodes encoded data of a moving image. For example, the image decoding device 700 decodes encoded data by a decoding method described in any one of Non-Patent Documents 1 to 12. For example, the image decoding device 700 decodes encoded data (bit stream) generated by the above-mentioned image encoding device 600.
[0318] Note that Figure 61 shows the main processing units, data flows, and the like, and is not limited to all that is shown in Figure 61. That is, in the image decoding device 700, there may be processing units that are not shown as blocks in Figure 61, and there may be processing and data flows that are not shown as arrows or the like in Figure 61.
[0319] 61, the image decoding device 700 includes an accumulation buffer 711, a decoding unit 712, an inverse quantization unit 713, an inverse orthogonal transformation unit 714, a calculation unit 715, an in-loop filter unit 716, a rearrangement buffer 717, a frame memory 718, and a prediction unit 719. The prediction unit 719 includes an intra prediction unit and an inter prediction unit, not shown. The image decoding device 700 is a device for generating moving image data by decoding encoded data (bit stream).
[0320] <Accumulation buffer> The accumulation buffer 711 acquires and holds (stores) the bitstream input to the image decoding device 700. The accumulation buffer 711 supplies the accumulated bitstream to the decoding unit 712 at a predetermined timing or when a predetermined condition is met.
[0321] <Decryption section> The decoding unit 712 performs processing related to image decoding. For example, the decoding unit 712 receives the bit stream supplied from the accumulation buffer 711 as input, and variable-length decodes the syntax values of the syntax elements from the bit string in accordance with the definition of the syntax table, to derive parameters.
[0322] The parameters derived from the syntax elements and the syntax values of the syntax elements include, for example, header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, residual information Rinfo, filter information Finfo, and other information. That is, the decoding unit 712 parses (analyzes and obtains) these pieces of information from the bitstream. These pieces of information will be described below.
[0323] <Header information Hinfo> The header information Hinfo includes, for example, header information such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), and a slice header (SH). The header information Hinfo includes, for example, information that specifies an image size (horizontal width PicWidth, vertical width PicHeight), bit depth (luminance bitDepthY, chrominance bitDepthC), a chrominance array type ChromaArrayType, a maximum value MaxCUSize / minimum value MinCUSize of CU size, a maximum depth MaxQTDepth / minimum depth MinQTDepth of quad-tree partitioning, a maximum depth MaxBTDepth / minimum depth MinBTDepth of binary-tree partitioning, a maximum value MaxTSSize of transform skip blocks (also called maximum transform skip block size), an on / off flag (also called valid flag) of each encoding tool, and the like.
[0324] For example, the on / off flag of the encoding tool included in the header information Hinfo includes on / off flags related to the conversion and quantization processes shown below. The on / off flag of the encoding tool can also be interpreted as a flag indicating whether or not syntax related to the encoding tool is present in the encoded data. When the value of the on / off flag is 1 (true), it indicates that the encoding tool is usable, and when the value of the on / off flag is 0 (false), it indicates that the encoding tool is not usable. The interpretation of the flag value may be reversed.
[0325] Inter-component prediction enabled flag (ccp_enabled_flag): Flag information indicating whether inter-component prediction (CCP (Cross-Component Prediction), also called CC prediction) is available. For example, when this flag information is "1" (true), it indicates that it is available, and when it is "0" (false), it indicates that it is not available.
[0326] This CCP is also called component-to-component linear prediction (CCLM or CCLMP).
[0327] <Prediction mode information Pinfo> The prediction mode information Pinfo includes, for example, size information PBSize (prediction block size) of the processing target PB (prediction block), intra prediction mode information IPinfo, motion prediction information MVinfo, and other information.
[0328] The intra prediction mode information IPinfo includes, for example, prev_intra_luma_pred_flag, mpm_idx, and rem_intra_pred_mode in JCTVC-W1005, 7.3.8.5 Coding Unit syntax, and a luma intra prediction mode IntraPredModeY derived from the syntax.
[0329] In addition, the intra-prediction mode information IPinfo includes, for example, an inter-component prediction flag (ccp_flag (cclmp_flag)), a multi-class linear prediction mode flag (mclm_flag), a chrominance sample position type identifier (chroma_sample_loc_type_idx), a chrominance MPM identifier (chroma_mpm_idx), and a luma intra-prediction mode (IntraPredModeC) derived from these syntaxes.
[0330] The inter-component prediction flag (ccp_flag (cclmp_flag)) is flag information indicating whether or not inter-component linear prediction is applied. For example, when ccp_flag==1, it indicates that inter-component prediction is applied, and when ccp_flag==0, it indicates that inter-component prediction is not applied.
[0331] The multi-class linear prediction mode flag (mclm_flag) is information on the linear prediction mode (linear prediction mode information). More specifically, the multi-class linear prediction mode flag (mclm_flag) is flag information indicating whether or not to use the multi-class linear prediction mode. For example, "0" indicates a one-class mode (single class mode) (e.g., CCLMP), and "1" indicates a two-class mode (multi-class mode) (e.g., MCLMP).
[0332] The chroma sample location type identifier (chroma_sample_loc_type_idx) is an identifier for identifying the type of pixel location of a chroma component (also called a chroma sample location type). For example, when the chroma array type (ChromaArrayType), which is information on the color format, indicates the 420 format, the chroma sample location type identifier is assigned according to the following formula.
[0333] chroma_sample_loc_type_idx == 0:Type2 chroma_sample_loc_type_idx == 1:Type3 chroma_sample_loc_type_idx == 2:Type0 chroma_sample_loc_type_idx == 3:Type1
[0334] Note that this chrominance sample location type identifier (chroma_sample_loc_type_idx) is transmitted (stored in) information about the pixel location of the chrominance component (chroma_sample_loc_info()).
[0335] The chroma MPM identifier (chroma_mpm_idx) is an identifier indicating which prediction mode candidate in the chroma intra prediction mode candidate list (intraPredModeCandListC) is to be specified as the chroma intra prediction mode.
[0336] The motion prediction information MVinfo includes information such as merge_idx, merge_flag, inter_pred_idc, ref_idx_LX, mvp_lX_flag, X={0,1}, mvd, etc. (see, for example, JCTVC-W1005, 7.3.8.6 Prediction Unit Syntax).
[0337] Of course, the prediction mode information Pinfo may include any information, and may include information other than the above information.
[0338] <Conversion information Tinfo> The conversion information Tinfo includes, for example, the following information: Of course, the information included in the conversion information Tinfo is arbitrary, and information other than the above information may be included.
[0339] The width size TBWSize and height TBHSize of the transform block to be processed (or the logarithmic values log2TBWSize and log2TBHSize of TBWSize and TBHSize with the base 2 as the logarithms). Transform skip flag (ts_flag): A flag indicating whether or not to skip the (inverse) primary transform and the (inverse) secondary transform. Scan Identifier (scanIdx) Quantization parameter (qp) Quantization matrix (scaling_matrix (e.g., JCTVC-W1005, 7.3.4 Scaling list data syntax))
[0340] <Residual information Rinfo> The residual information Rinfo (see, for example, 7.3.8.11 Residual Coding syntax in JCTVC-W1005) includes, for example, the following syntax:
[0341] cbf(coded_block_flag): Residual data presence flag last_sig_coeff_x_pos: last non-zero coefficient X coordinate last_sig_coeff_y_pos: Y coordinate of the last non-zero coefficient coded_sub_block_flag: Sub-block non-zero coefficient presence / absence flag sig_coeff_flag: Non-zero coefficient presence / absence flag gr1_flag: Flag indicating whether the level of the non-zero coefficient is greater than 1 (also called the GR1 flag) gr2_flag: A flag indicating whether the level of the non-zero coefficient is greater than 2 (also called the GR2 flag) sign_flag: A sign indicating the positive or negative value of the non-zero coefficient (also called the sign code) coeff_abs_level_remaining: The remaining level of non-zero coefficients (also called the non-zero coefficient residual level) etc.
[0342] Of course, the information included in the residual information Rinfo is arbitrary, and information other than the above information may be included.
[0343] <Filter information Finfo> The filter information Finfo includes, for example, control information related to each of the filter processes shown below.
[0344] Control information for the deblocking filter (DBF) Control information for pixel adaptive offset (SAO) Control information for the adaptive loop filter (ALF) Other control information for linear and nonlinear filters
[0345] More specifically, for example, information specifying a picture to which each filter is applied, an area within a picture, filter On / Off control information for each CU, filter On / Off control information related to slice and tile boundaries, etc. Of course, any information is included in the filter information Finfo, and information other than these pieces of information may be included.
[0346] Returning to the description of the decoding unit 712, the decoding unit 712 derives the quantized transform coefficient level "level" of each coefficient position in each transform block by referring to the residual information Rinfo. The decoding unit 712 supplies the quantized transform coefficient level "level" to the inverse quantization unit 713.
[0347] Furthermore, the decoding unit 712 supplies the parsed header information Hinfo, prediction mode information Pinfo, quantization transformation coefficient level level, transformation information Tinfo, and filter information Finfo to each block.
[0348] The header information Hinfo is supplied to an inverse quantization unit 713 , an inverse orthogonal transformation unit 714 , a prediction unit 719 , and an in-loop filter unit 716 . The prediction mode information Pinfo is supplied to the inverse quantization unit 713 and the prediction unit 719 . The transformation information Tinfo is supplied to an inverse quantization unit 713 and an inverse orthogonal transformation unit 714 . The filter information Finfo is supplied to the in-loop filter unit 716 .
[0349] Of course, the above example is merely an example, and the present invention is not limited to this example. For example, each encoding parameter may be supplied to an arbitrary processing unit. In addition, other information may be supplied to an arbitrary processing unit.
[0350] <Inverse quantization section> The inverse quantization unit 713 has at least a necessary configuration for performing processing related to inverse quantization. For example, the inverse quantization unit 713 receives the transformation information Tinfo and the quantized transformation coefficient level level supplied from the decoding unit 712, scales (inverse quantizes) the value of the quantized transformation coefficient level level based on the transformation information Tinfo, and derives the transformation coefficient Coeff_IQ after inverse quantization.
[0351] Note that this inverse quantization is performed as an inverse process of the quantization performed by the quantization unit 614. Also, this inverse quantization is the same process as the inverse quantization performed by the inverse quantization unit 617. That is, the inverse quantization unit 617 performs the same process (inverse quantization) as the inverse quantization unit 713.
[0352] The inverse quantization unit 713 supplies the derived transformation coefficient Coeff_IQ to the inverse orthogonal transformation unit 714 .
[0353] <Inverse orthogonal transform section> The inverse orthogonal transform unit 714 performs processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 714 receives the transform coefficient Coeff_IQ supplied from the inverse quantization unit 713 and the transform information Tinfo supplied from the decoding unit 712 as input, and performs inverse orthogonal transform processing on the transform coefficient Coeff_IQ based on the transform information Tinfo to derive a prediction residual D'.
[0354] This inverse orthogonal transform is performed as an inverse process of the orthogonal transform performed by the orthogonal transform unit 613. This inverse orthogonal transform is the same process as the inverse orthogonal transform performed by the inverse orthogonal transform unit 618. That is, the inverse orthogonal transform unit 618 performs the same process (inverse orthogonal transform) as the inverse orthogonal transform unit 714.
[0355] The inverse orthogonal transform unit 714 supplies the derived prediction residual D′ to the calculation unit 715 .
[0356] <Arithmetic section> The calculation unit 715 performs processing related to the addition of information related to an image. For example, the calculation unit 715 receives as input a prediction residual D' supplied from the inverse orthogonal transform unit 714 and a predicted image P supplied from the prediction unit 719. As shown in the following equation, the calculation unit 715 adds the prediction residual D' and a predicted image P (prediction signal) corresponding to the prediction residual D' to generate a locally decoded image R local Derive:
[0357] R local = D' + P
[0358] The calculation unit 715 calculates the derived locally decoded image R local is supplied to the in-loop filter unit 716 and the frame memory 718.
[0359] <In-loop filter section> The in-loop filter unit 716 performs processing related to in-loop filtering. For example, the in-loop filter unit 716 filters the locally decoded image R local and filter information Finfo supplied from the decoding unit 712. Note that any information is input to the in-loop filter unit 716, and information other than the above information may also be input.
[0360] Based on the filter information Finfo, the in-loop filter unit 716 generates a locally decoded image R local Then, appropriate filtering is performed on the
[0361] For example, the in-loop filter unit 716 applies four in-loop filters, a bilateral filter, a deblocking filter (DBF (DeBlocking Filter)), an adaptive offset filter (SAO (Sample Adaptive Offset)), and an adaptive loop filter (ALF (Adaptive Loop Filter)), in this order, as described in Non-Patent Document 11. Note that which filters are applied and in what order they are applied are arbitrary and can be appropriately selected.
[0362] The in-loop filter unit 716 performs a filter process corresponding to the filter process performed by the encoding side (for example, the in-loop filter unit 620 of the image encoding device 600). Of course, the filter process performed by the in-loop filter unit 716 is arbitrary and is not limited to the above example. For example, the in-loop filter unit 716 may apply a Wiener filter or the like.
[0363] The in-loop filter unit 716 outputs the filtered locally decoded image R local are supplied to a reordering buffer 717 and a frame memory 718.
[0364] <Sorting Buffer> The reordering buffer 717 receives the locally decoded image R local The reordering buffer 717 stores the locally decoded image R local The reordering buffer 717 reconstructs the decoded images R for each picture using the reordering buffer 717 and holds them (stores them in a buffer). The reordering buffer 717 reorders the obtained decoded images R from the decoding order to the playback order. The reordering buffer 717 outputs the reordered decoded images R to the outside of the image decoding device 700 as video data.
[0365] <Frame memory> The frame memory 718 performs processing related to storage of image-related data. For example, the frame memory 718 stores the locally decoded image R local The decoded image R is reconstructed for each picture and stored in a buffer in the frame memory 718.
[0366] The frame memory 718 also stores the in-loop filtered locally decoded image R local The prediction unit 719 receives the input, reconstructs a decoded image R for each picture, and stores the reconstructed image in a buffer in the frame memory 718. The frame memory 718 appropriately supplies the stored decoded image R (or a part thereof) to the prediction unit 719 as a reference image.
[0367] The frame memory 718 may store header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, and the like, which are related to the generation of a decoded image.
[0368] <Prediction Department> The prediction unit 719 performs processing related to the generation of a predicted image. For example, the prediction unit 719 receives prediction mode information Pinfo supplied from the decoding unit 712 as input, performs prediction by a prediction method specified by the prediction mode information Pinfo, and derives a predicted image P. When deriving the predicted image P, the prediction unit 719 uses a pre-filter or post-filter decoded image R (or a part thereof) stored in the frame memory 718, which is specified by the prediction mode information Pinfo, as a reference image. The prediction unit 719 supplies the derived predicted image P to the calculation unit 715.
[0369] In addition, these processing units (accumulation buffer 711 to prediction unit 719) have any configuration. For example, each processing unit may be configured by a logic circuit that realizes the above-mentioned processing. Also, each processing unit may have, for example, a CPU, a ROM, a RAM, etc., and may realize the above-mentioned processing by executing a program using them. Of course, each processing unit may have both configurations, and may realize part of the above-mentioned processing by a logic circuit and the other by executing a program. The configurations of each processing unit may be independent of each other, and for example, some processing units may realize part of the above-mentioned processing by a logic circuit, other processing units may realize the above-mentioned processing by executing a program, and still other processing units may realize the above-mentioned processing by both a logic circuit and executing a program.
[0370] In the image decoding device 700 configured as above, the present technology is applied to the decoding unit 712. That is, the decoding unit 712 has the same configuration as the decoding device 200 shown in FIG. 13 and performs the same processing. That is, the decoding unit 712 performs any one of the above-mentioned methods #1 to #8. By doing so, the image decoding device 700 can obtain the same effect as that described above in any one of the first embodiment to the eighth embodiment. Therefore, the image decoding device 700 can suppress a decrease in the coding efficiency (improve the coding efficiency). In other words, the image decoding device 700 can suppress a decrease in the image quality of the decoded image.
[0371] <Flow of image decoding process> Next, a description will be given of the flow of each process executed by the image decoding device 700 configured as above. First, an example of the flow of an image encoding process will be described with reference to the flowchart in FIG.
[0372] When the image decoding process starts, in step S701, the accumulation buffer 711 acquires and holds (accumulates) encoded data (bit stream) supplied from outside the image decoding device 700.
[0373] In step S702, the decoding unit 712 decodes the coded data (bit stream) to obtain the quantized transform coefficient level level. Furthermore, the decoding unit 712 parses (analyzes and obtains) various coding parameters from the coded data (bit stream) through this decoding.
[0374] In step S703, the inverse quantization unit 713 performs inverse quantization, which is the inverse process of the quantization performed on the encoding side, on the quantized transform coefficient level obtained by the process in step S702 to obtain a transform coefficient Coeff_IQ.
[0375] In step S704, the inverse orthogonal transform unit 714 performs inverse orthogonal transform processing, which is the inverse processing of the orthogonal transform processing performed on the encoding side, on the transform coefficient Coeff_IQ obtained in step S703, to obtain a prediction residual D'.
[0376] In step S705, the prediction unit 719 performs a prediction process using a prediction method specified by the encoding side based on the information parsed in step S702, and generates a predicted image P by, for example, referring to a reference image stored in the frame memory 718.
[0377] In step S706, the calculation unit 715 adds the prediction residual D′ obtained in step S704 and the predicted image P obtained in step S705 to obtain a locally decoded image R local Derive:
[0378] In step S707, the in-loop filter unit 716 filters the locally decoded image R obtained in the process of step S706. local In-loop filtering is performed on
[0379] In step S708, the reordering buffer 717 derives decoded images R using the filtered local decoded images R obtained in step S707, and reorders the order of the decoded images R from the decoding order to the playback order. The decoded images R reordered in the playback order are output to the outside of the image decoding device 700 as a moving image.
[0380] In step S709, the frame memory 718 stores the locally decoded image R obtained in step S706. local , and the locally decoded image R after the filtering process obtained by the process in step S707. local At least one of the above is stored.
[0381] When the process of step S709 ends, the image decoding process ends.
[0382] In the image decoding process having the above-mentioned flow, the present technology is applied to the decoding process in step S703. That is, in this step S703, the decoding process having the same flow as that in FIG. 15 is performed. That is, the decoding unit 712 performs the decoding process using any one of the above-mentioned methods #1 to #8. In this way, the image decoding device 700 can obtain the same effect as that described above in any one of the first embodiment to the eighth embodiment. Therefore, the image decoding device 700 can suppress the reduction in the coding efficiency (improve the coding efficiency). In other words, the image decoding device 700 can suppress the reduction in the image quality of the decoded image.
[0383] <11. Notes> <Computer> The above-mentioned series of processes can be executed by hardware or software. When the series of processes is executed by software, the programs constituting the software are installed in a computer. Here, the computer includes a computer built into dedicated hardware, and a general-purpose personal computer, etc., capable of executing various functions by installing various programs.
[0384] FIG. 63 is a block diagram showing an example of the hardware configuration of a computer that executes the above-mentioned series of processes by a program.
[0385] In a computer 800 shown in FIG. 63, a CPU (Central Processing Unit) 801, a ROM (Read Only Memory) 802, and a RAM (Random Access Memory) 803 are interconnected via a bus 804.
[0386] An input / output interface 810 is also connected to the bus 804. To the input / output interface 810, an input unit 811, an output unit 812, a storage unit 813, a communication unit 814, and a drive 815 are connected.
[0387] The input unit 811 includes, for example, a keyboard, a mouse, a microphone, a touch panel, an input terminal, etc. The output unit 812 includes, for example, a display, a speaker, an output terminal, etc. The storage unit 813 includes, for example, a hard disk, a RAM disk, a non-volatile memory, etc. The communication unit 814 includes, for example, a network interface. The drive 815 drives removable media 821 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.
[0388] In the computer configured as above, the CPU 801 performs the above-mentioned series of processes by, for example, loading a program stored in the storage unit 813 into the RAM 803 via the input / output interface 810 and the bus 804 and executing the program. The RAM 803 also stores data and the like necessary for the CPU 801 to execute various processes as appropriate.
[0389] The program executed by the computer can be applied by recording it on a removable medium 821 such as a package medium, for example. In this case, the program can be installed in the storage unit 813 via the input / output interface 810 by mounting the removable medium 821 on the drive 815.
[0390] This program can also be provided via a wired or wireless transmission medium such as a local area network, the Internet, digital satellite broadcasting, etc. In this case, the program can be received by the communication unit 814 and installed in the storage unit 813.
[0391] In addition, this program can also be installed in advance in the ROM 802 or the storage unit 813.
[0392] <Unit of information processing> The data units in which the various information described above is set and the data units targeted by the various processes are each arbitrary and are not limited to the above examples. For example, these pieces of information and processes may be set for each TU (Transform Unit), TB (Transform Block), PU (Prediction Unit), PB (Prediction Block), CU (Coding Unit), LCU (Largest Coding Unit), sub-block, block, tile, slice, picture, sequence, or component, or may target data of these data units. Of course, this data unit may be set for each piece of information or process, and the data units of all pieces of information and processes do not need to be unified. The storage location of these pieces of information is arbitrary, and may be stored in the header or parameter set of the above-mentioned data unit. Also, they may be stored in multiple locations.
[0393] <Control information> Control information related to the present technology described in each of the above embodiments may be transmitted from the encoding side to the decoding side. For example, control information (e.g., enabled_flag) that controls whether or not to permit (or prohibit) application of the present technology described above may be transmitted. In addition, for example, control information (e.g., present_flag) indicating a target to which the present technology described above is applied (or a target to which it is not applied) may be transmitted. For example, control information that specifies a block size (upper limit or lower limit, or both), frame, component, or layer to which the present technology is applied (or permitted or prohibited to be applied) may be transmitted.
[0394] <Target of application of this technology> This technology can be applied to any image encoding / decoding method. In other words, as long as it does not conflict with the above-mentioned technology, the specifications of various processes related to image encoding / decoding, such as transform (inverse transform), quantization (inverse quantization), encoding (decoding), and prediction, are arbitrary and are not limited to the above-mentioned examples. In addition, as long as it does not conflict with the above-mentioned technology, some of these processes may be omitted.
[0395] This technology can also be applied to a multi-viewpoint image encoding / decoding system that encodes and decodes multi-viewpoint images that include images from multiple views. In that case, this technology can be applied to the encoding / decoding of each view.
[0396] Furthermore, this technology can be applied to a hierarchical image coding (scalable coding) and decoding system that performs coding and decoding of hierarchical images that are layered to have a scalability function for a predetermined parameter. In that case, this technology can be applied to the coding and decoding of each layer.
[0397] Furthermore, in the above, the encoding device 100, the decoding device 200, the image encoding device 600, and the image decoding device 700 have been described as application examples of the present technology, but the present technology can be applied to any configuration.
[0398] For example, the present technology can be applied to various electronic devices, such as transmitters and receivers (e.g., television sets and mobile phones) in satellite broadcasting, wired broadcasting such as cable TV, distribution over the Internet, and distribution to terminals via cellular communication, or devices (e.g., hard disk recorders and cameras) that record images on media such as optical disks, magnetic disks, and flash memories, and play images from these storage media.
[0399] Furthermore, for example, the present technology can also be implemented as part of an apparatus, such as a processor (e.g., a video processor) as a system LSI (Large Scale Integration), a module (e.g., a video module) using multiple processors, a unit (e.g., a video unit) using multiple modules, or a set in which other functions are added to a unit (e.g., a video set).
[0400] In addition, for example, the present technology can also be applied to a network system composed of multiple devices. For example, the present technology may be implemented as cloud computing in which multiple devices share and cooperate with each other to perform processing via a network. For example, the present technology may be implemented in a cloud service that provides services related to images (video images) to any terminal such as a computer, an AV (Audio Visual) device, a portable information processing terminal, or an IoT (Internet of Things) device.
[0401] In this specification, a system refers to a collection of multiple components (devices, modules (parts), etc.), regardless of whether all the components are in the same case. Therefore, multiple devices housed in separate cases and connected via a network, and a single device in which multiple modules are housed in a single case, are both systems.
[0402] <Fields and applications where this technology can be applied> Systems, devices, processing units, etc. to which the present technology is applied can be used in any field, such as transportation, medical care, crime prevention, agriculture, livestock farming, mining, beauty, factories, home appliances, weather, and nature monitoring. In addition, the applications are also arbitrary.
[0403] For example, the present technology can be applied to systems and devices used for providing ornamental content, etc. Furthermore, for example, the present technology can be applied to systems and devices used for traffic, such as monitoring traffic conditions and automatic driving control. Furthermore, for example, the present technology can be applied to systems and devices used for security. Furthermore, for example, the present technology can be applied to systems and devices used for automatic control of machines, etc. Furthermore, for example, the present technology can be applied to systems and devices used for agriculture and livestock farming. Furthermore, for example, the present technology can be applied to systems and devices that monitor natural conditions, such as volcanoes, forests, and oceans, and wildlife, etc. Furthermore, for example, the present technology can be applied to systems and devices used for sports.
[0404] <Other> In this specification, a "flag" refers to information for identifying multiple states, and includes not only information used to identify two states, true (1) or false (0), but also information capable of identifying three or more states. Thus, the value that this "flag" can take may be, for example, a binary value of 1 / 0, or may be three or more values. In other words, the number of bits constituting this "flag" is arbitrary, and may be one bit or multiple bits. Furthermore, it is assumed that identification information (including flags) is not only included in the bit stream, but also includes difference information of the identification information with respect to certain reference information in the bit stream. Therefore, in this specification, "flag" and "identification information" include not only the information itself, but also difference information with respect to the reference information.
[0405] Also, various information (metadata, etc.) related to the coded data (bit stream) may be transmitted or recorded in any form as long as it is associated with the coded data. Here, the term "associate" means, for example, that one piece of data can be used (linked) when processing the other piece of data. That is, data associated with each other may be combined into one piece of data, or each piece of data may be made into separate data. For example, information associated with coded data (image) may be transmitted on a transmission path different from that of the coded data (image). Also, for example, information associated with coded data (image) may be recorded on a recording medium different from that of the coded data (image) (or on a different recording area of the same recording medium). Note that this "association" may be a part of the data, not the entire data. For example, an image and information corresponding to the image may be associated with each other in any unit, such as multiple frames, one frame, or a part of a frame.
[0406] In this specification, the terms "combine," "multiplex," "append," "integrate," "include," "store," "embed," "insert," and the like refer to combining multiple items into one, such as combining encoded data and metadata into one piece of data, and refer to one method of "associating" as described above.
[0407] Furthermore, the embodiments of the present technology are not limited to the above-described embodiments, and various modifications are possible without departing from the gist of the present technology.
[0408] For example, the configuration described above as one device (or processing unit) may be divided and configured as multiple devices (or processing units). Conversely, the configurations described above as multiple devices (or processing units) may be combined and configured as one device (or processing unit). Of course, configurations other than those described above may be added to the configuration of each device (or processing unit). Furthermore, as long as the configuration and operation of the system as a whole are substantially the same, part of the configuration of one device (or processing unit) may be included in the configuration of another device (or other processing unit).
[0409] Also, for example, the above-mentioned program may be executed in any device, as long as the device has the necessary functions (functional blocks, etc.) and can obtain the necessary information.
[0410] Also, for example, each step of one flowchart may be executed by one device, or may be shared and executed by multiple devices. Furthermore, when one step includes multiple processes, the multiple processes may be executed by one device, or may be shared and executed by multiple devices. In other words, multiple processes included in one step can be executed as multiple step processes. Conversely, processes described as multiple steps can be executed collectively as one step.
[0411] Also, for example, the processing of the steps of a program executed by a computer may be executed in chronological order according to the order described in this specification, or may be executed in parallel, or individually at a required timing such as when a call is made. In other words, the processing of each step may be executed in an order different from the order described above, so long as no contradiction occurs. Furthermore, the processing of the steps of this program may be executed in parallel with the processing of another program, or may be executed in combination with the processing of another program.
[0412] Also, for example, a plurality of techniques related to the present technology can be implemented independently and independently, as long as no contradiction occurs. Of course, any of a plurality of the present technologies can be implemented in combination. For example, a part or all of the present technology described in any of the embodiments can be implemented in combination with a part or all of the present technology described in other embodiments. Also, a part or all of any of the above-mentioned present technologies can be implemented in combination with other technologies not described above.
[0413] The present technology can also be configured as follows. (1) a syntax element value derivation unit that distributes the number of bins among non-zero sub-blocks to set an upper limit of the number of bins to be assigned to a processing target sub-block, and derives a syntax element value for the processing target sub-block using coefficient data derived from image data so that the number of bins does not exceed the upper limit; an encoding unit that encodes the derived syntax element value to generate encoded data; An image processing device comprising: (2) The syntax element value derivation unit sets an upper limit value of the number of bins to be assigned to the sub-block to be processed, based on the number of surplus bins of the immediately preceding non-zero sub-block and a tentative upper limit value of the number of bins to be assigned to the sub-block to be processed. An image processing device as described in (1). (3) The syntax element value derivation unit distributes the number of bins among the non-zero sub-blocks in a CU and sets an upper limit value of the number of bins to be assigned to the sub-block to be processed. An image processing device according to (1) or (2). (4) The syntax element value derivation unit derives the syntax element value for the sub-block to be processed such that a sum of numbers of bins assigned to all non-zero sub-blocks in a block does not exceed a sum of provisional upper limit values of numbers of bins assigned to each non-zero sub-block in the block. An image processing device according to any one of (1) to (3). (5) The syntax element value derivation unit further distributes the number of surplus bins of the zero sub-blocks in the block. An image processing device according to (4). (6) The syntax element value derivation unit sets an upper limit value of the number of bins assigned to a block, and derives a syntax element value for the block using coefficient data derived from image data so that the number of bins does not exceed the upper limit value. An image processing device according to any one of (1) to (5). (7) allocating the number of bins among the non-zero sub-blocks to set an upper limit of the number of bins to be assigned to the sub-block to be processed, and deriving syntax element values for the sub-block to be processed using coefficient data derived from the image data so that the number of bins does not exceed the upper limit; The derived syntax element value is encoded to generate encoded data. Image processing methods.
[0414] (8) a decoder unit that decodes the encoded data to generate syntax element values; a coefficient data derivation unit that distributes the number of bins among the non-zero sub-blocks to set an upper limit value of the number of bins to be assigned to the sub-block to be processed, and derives coefficient data corresponding to image data for the sub-block to be processed by using the generated syntax element value so that the number of bins does not exceed the upper limit value; An image processing device comprising: (9) decoding the encoded data to generate syntax element values; The number of bins is distributed among the non-zero sub-blocks to set an upper limit of the number of bins to be assigned to the sub-block to be processed, and coefficient data corresponding to the image data is derived for the sub-block to be processed using the generated syntax element value so that the number of bins does not exceed the upper limit. Image processing methods.
[0415] (10) a syntax element value derivation unit that distributes the number of bins assigned to the zero subblock to the non-zero subblocks to set an upper limit of the number of bins assigned to the subblock to be processed, and derives a syntax element value for the subblock to be processed using coefficient data derived from image data so that the number of bins does not exceed the upper limit; an encoding unit that encodes the derived syntax element value to generate encoded data; An image processing device comprising: (11) The syntax element value derivation unit sets an upper limit value of the number of bins to be assigned to the sub-block to be processed based on an average surplus bin number of zero sub-blocks and a tentative upper limit value of the number of bins to be assigned to the sub-block to be processed. The image processing device according to (10). (12) The syntax element value derivation unit further sets an upper limit value of the number of bins to be assigned to the sub-block to be processed based on a priority according to a position of the sub-block to be processed. The image processing device according to (11). (13) Distributing the number of bins allocated to the zero subblock to the non-zero subblocks to set an upper limit of the number of bins allocated to the subblock to be processed, and deriving a syntax element value for the subblock to be processed using coefficient data derived from the image data so that the number of bins does not exceed the upper limit; The derived syntax element value is encoded to generate encoded data. Image processing methods.
[0416] (14) a decoding unit that decodes the encoded data to generate syntax element values; a coefficient data derivation unit that distributes the number of bins assigned to the zero sub-block to the non-zero sub-blocks to set an upper limit value of the number of bins assigned to the sub-block to be processed, and derives coefficient data corresponding to image data for the sub-block to be processed using the generated syntax element value so that the number of bins does not exceed the upper limit value; An image processing device comprising: (15) decoding the encoded data to generate syntax element values; The number of bins assigned to the zero subblock is distributed to the non-zero subblocks to set an upper limit of the number of bins assigned to the subblock to be processed, and coefficient data corresponding to the image data is derived for the subblock to be processed using the generated syntax element value so that the number of bins does not exceed the upper limit. Image processing methods. [Explanation of symbols]
[0417] 100 Encoding device, 101 Sequencer, 102 CABAC, 121 Binarization unit, 122 Selection unit, 123 Context model, 124 Arithmetic coding unit, 125 Arithmetic coding unit, 126 Selection unit, 200 Decoding device, 201 CABAC, 202 Parser, 221 Selection unit, 222 Context model, 223 Arithmetic decoding unit, 224 Arithmetic decoding unit, 225 Selection unit, 226 Multi-value unit, 600 Image encoding device, 615 Encoding unit, 700 Image decoding device, 712 Decoding unit< / cabac> < / cabac>
Claims
1. a syntax element value derivation unit that sets a first upper limit value that is an upper limit value of the number of context coding bins that can be assigned to a processing target block including a plurality of sub-blocks, and derives syntax element values for the processing target sub-blocks using coefficient data derived from image data such that the number of context coding bins assigned to the processing target block does not exceed the first upper limit value; an encoding unit that encodes the derived syntax element value to generate encoded data; An image processing device comprising:
2. The syntax element value derivation unit sets the first upper limit value based on the size of the block to be processed. The image processing device according to claim 1 .
3. The syntax element value derivation unit further sets the first upper limit value based on a second upper limit value which is an upper limit value of the number of context coding bins that can be assigned to the sub-block. The image processing device according to claim 2 .
4. The second upper limit is 28. The image processing device according to claim 3 .
5. The processing target block is a TU (Transform Unit). The image processing device according to claim 1 .
6. The processing target block is a CU (Coding Unit). The image processing device according to claim 1 .
7. The syntax element value derivation unit sequentially selects each of the sub-blocks of the processing target block as a processing target, and derives the syntax element value for the sub-block selected as the processing target. The image processing device according to claim 1 .
8. setting a first upper limit value which is an upper limit value of the number of context coding bins that can be assigned to a processing target block including a plurality of sub-blocks, and deriving syntax element values for the processing target sub-block using coefficient data derived from image data such that the number of context coding bins assigned to the processing target block does not exceed the first upper limit value; The derived syntax element value is encoded to generate encoded data. Image processing methods.
9. The first upper limit value is set based on the size of the block to be processed. The image processing method according to claim 8.
10. Furthermore, the first upper limit value is set based on a second upper limit value which is an upper limit value of the number of context coding bins that can be assigned to the sub-block. The image processing method according to claim 9.
11. The second upper limit is 28. The image processing method according to claim 10.
12. The processing target block is a TU (Transform Unit). The image processing method according to claim 8.
13. The processing target block is a CU (Coding Unit). The image processing method according to claim 8.
14. Selecting each of the sub-blocks of the block to be processed in sequence as a processing target, and deriving the syntax element values for the sub-blocks selected as the processing target. The image processing method according to claim 8.
15. a decoder for decoding the encoded data to generate syntax element values; a coefficient data derivation unit that sets a first upper limit value that is an upper limit value of the number of context coding bins that can be assigned to a processing target block including a plurality of sub-blocks, parses the generated syntax element value for the processing target sub-block so that the number of context coding bins assigned to the processing target block does not exceed the first upper limit value, and derives coefficient data corresponding to image data; An image processing device comprising:
16. The coefficient data derivation unit sets the first upper limit value based on a size of the processing target block. The image processing device according to claim 15.
17. The coefficient data derivation unit further sets the first upper limit value based on a second upper limit value which is an upper limit value of the number of context coding bins that can be assigned to the sub-block. The image processing device according to claim 16.
18. The second upper limit is 28. The image processing device according to claim 17.
19. The processing target block is a TU (Transform Unit). The image processing device according to claim 15.
20. The processing target block is a CU (Coding Unit). The image processing device according to claim 15.
21. The coefficient data derivation unit sequentially selects each of the sub-blocks of the processing target block as a processing target, and derives the coefficient data for the sub-block selected as the processing target. The image processing device according to claim 15.
22. Decoding the encoded data to generate syntax element values; A first upper limit value is set, which is an upper limit value of the number of context coding bins that can be assigned to a processing target block including a plurality of sub-blocks, and for the processing target sub-block, the generated syntax element value is parsed so that the number of context coding bins assigned to the processing target block does not exceed the first upper limit value, and coefficient data corresponding to image data is derived. Image processing methods.
23. The first upper limit value is set based on the size of the block to be processed.
23. The image processing method according to claim 22.
24. Furthermore, the first upper limit value is set based on a second upper limit value which is an upper limit value of the number of context coding bins that can be assigned to the sub-block.
24. The image processing method according to claim 23.
25. The second upper limit is 28.
25. The image processing method according to claim 24.
26. The processing target block is a TU (Transform Unit).
23. The image processing method according to claim 22.
27. The processing target block is a CU (Coding Unit).
23. The image processing method according to claim 22.
28. Each of the sub-blocks of the block to be processed is selected in sequence as a processing target, and the coefficient data for the sub-block selected as the processing target is derived.
23. The image processing method according to claim 22.
