Image processing device and method

By implementing a context coding bin maximum number setting unit to manage context coding bins based on processing speed mode, the image processing device addresses the increased processing load in high bit depth and bit rate scenarios, optimizing CABAC throughput.

JP2026042898APending Publication Date: 2026-03-11SONY GROUP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2026-01-06
Publication Date
2026-03-11

AI Technical Summary

Technical Problem

Existing image coding methods, such as Versatile Video Coding (VVC), face challenges in managing the increased processing load due to context coding bins, which are more complex than bypass coding bins, especially at high bit depths and bit rates.

Method used

An image processing device and method that includes a context coding bin maximum number setting unit to control the number of context coding bins based on a processing speed mode, using a control flag to set the maximum number of context coding bins generated during encoding or decoding, thereby reducing the processing load.

Benefits of technology

This approach effectively suppresses the increase in encoding and decoding processing by controlling the number of context coding bins, particularly in high bit depth and high bit rate scenarios, thereby optimizing the throughput of CABAC.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026042898000001_ABST
    Figure 2026042898000001_ABST
Patent Text Reader

Abstract

To suppress an increase in the amount of encoding and decoding processing. [Solution] A value according to the bit depth of an image is set as the maximum number of context coding bins obtained by variable-length coding the image. Also, the maximum number of context coding bins obtained by variable-length coding the image is set according to a control flag indicating a processing speed mode. The present disclosure can be applied to, for example, an image processing device, an image coding device, an image decoding device, a transmitting device, a receiving device, a transmitting / receiving device, an information processing device, an imaging device, a playback device, an electronic device, an image processing method, an information processing method, etc.
Need to check novelty before this filing date? Find Prior Art

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 that can suppress an increase in the amount of encoding and decoding processing. [Background technology]

[0002] Conventionally, coding methods have been proposed in which prediction residuals of video images are derived, coefficient transformed, quantized, and then coded (see, for example, Non-Patent Document 1 and Non-Patent Document 2). In such image coding, when the bit depth and bit rate are high, many context coding bins and bypass coding bins are generated, which may increase the processing load of CABAC (Context-based Adaptive Binary Arithmetic Code). Therefore, in order to improve the throughput of CABAC, a method has been proposed that simplifies the coding and decoding processes of bypass coding bins (see, for example, Non-Patent Document 3). [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] Benjamin Bross, Jianle Chen, Shan Liu, "Versatile Video Coding (Draft 10)", JVET-T2001-v2, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29, version 1 - date 2020-10-27 [Non-patent document 2] Jianle Chen, Yan Ye, Seung Hwan Kim, "Algorithm description for Versatile Video Coding and Test Model 11 (VTM 11)", JVET-T2002-v1, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29, version 1 - date 2020-10-27 [Non-patent document 3] MG Sarwer, J. Chen, Y. Ye, R. -L. Liao, "AHG8: CABAC-bypass alignment for high bit-depth coding", JVET-U0069-v3, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29, version 3- date 2021-01-08 Summary of the Invention [Problem to be solved by the invention]

[0004] However, with this method, it is difficult to suppress an increase in the amount of processing for the context coding bins, whose encoding and decoding processes are more complex than those for the bypass coding bins, which may increase the amount of processing for encoding and decoding.

[0005] The present disclosure has been made in view of such circumstances, and aims to suppress an increase in the amount of encoding and decoding processing. [Means for solving the problem]

[0006] An image processing device according to one aspect of the present technology is an image processing device including a context coding bin maximum number setting unit that sets the maximum number of context coding bins generated in encoding or decoding an image in accordance with a control flag indicating a processing speed mode.

[0007] An image processing method according to one aspect of the present technology is an image processing method that sets the maximum number of context coding bins that are generated in encoding or decoding an image according to a control flag that indicates a processing speed mode.

[0008] In the image processing device and method according to one aspect of the present technology, the maximum number of context coding bins generated in encoding or decoding an image is set according to a control flag indicating a processing speed mode. [Brief explanation of the drawings]

[0009] [Figure 1] FIG. 10 is a diagram illustrating the amount of coding bins generated. [Figure 2] FIG. 10 is a diagram illustrating a method for controlling the number of context encoding bins. [Figure 3] 1 is a block diagram showing an example of the main configuration of a RemCcbs setting device. [Figure 4] 10 is a flowchart illustrating an example of the flow of a RemCcbs setting process. [Figure 5] FIG. 10 is a diagram illustrating the bit depth and the number of context coding bins. [Figure 6] 1 is a block diagram showing an example of the main configuration of a RemCcbs setting device. [Figure 7] 10 is a flowchart illustrating an example of the flow of a RemCcbs setting process. [Figure 8] 1 is a block diagram showing an example of the main configuration of a RemCcbs setting device. [Figure 9] 10 is a flowchart illustrating an example of the flow of a RemCcbs setting process. [Figure 10] FIG. 1 is a block diagram illustrating an example of the main configuration of an image encoding device. [Figure 11] FIG. 2 is a block diagram illustrating an example of the main configuration of an encoding unit. [Figure 12] FIG. 10 is a diagram illustrating an example of syntax for a TS residual coding mode. [Figure 13]FIG. 10 is a diagram illustrating an example of syntax for a Non-TS residual coding mode. [Figure 14] 10 is a flowchart illustrating an example of the flow of an image encoding process. [Figure 15] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 16] FIG. 1 is a block diagram illustrating an example of the main configuration of an image decoding device. [Figure 17] FIG. 2 is a block diagram illustrating an example of the main configuration of a decoding unit. [Figure 18] 10 is a flowchart showing an example of the flow of an image decoding process. [Figure 19] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 20] FIG. 2 is a block diagram illustrating an example of the main configuration of an encoding unit. [Figure 21] 10 is a flowchart illustrating an example of the flow of an image encoding process. [Figure 22] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 23] FIG. 2 is a block diagram illustrating an example of the main configuration of a decoding unit. [Figure 24] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 25] FIG. 2 is a block diagram illustrating an example of the main configuration of an encoding unit. [Figure 26] 10 is a flowchart illustrating an example of the flow of an image encoding process. [Figure 27] 10 is a flowchart illustrating an example of the flow of an encoding process. [Figure 28] FIG. 2 is a block diagram illustrating an example of the main configuration of a decoding unit. [Figure 29] 10 is a flowchart illustrating an example of the flow of a decoding process. [Figure 30] FIG. 1 is a block diagram illustrating an example of the main configuration of a computer. DETAILED DESCRIPTION OF THE INVENTION

[0010] Modes for carrying out the present disclosure (hereinafter referred to as embodiments) will be described below in the following order. 1. CABAC 2. Reducing the number of context encoding bins 3. Embodiment 4. Notes

[0011] <1.CABAC> <References that support the technical content and technical terminology> 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, as well as the contents of other documents referenced in the following non-patent documents.

[0012] Non-patent document 1: (mentioned above) Non-patent document 2: (mentioned above) Non-patent document 3: (mentioned above) Non-patent document 4: Recommendation ITU-T H.264 (04 / 2017) "Advanced video coding for generic audiovisual services", April 2017 Non-patent document 5: Recommendation ITU-T H.265 (02 / 18) "High efficiency video coding", February 2018

[0013] In other words, the contents of the above-mentioned non-patent documents are also used as a 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-mentioned non-patent documents are not directly described in the examples, they are considered to be within the scope of the disclosure of the present technology and meet the support requirements of the claims. Similarly, even if technical terms such as parsing, syntax, and semantics are not directly described in the examples, they are considered to be within the scope of the disclosure of the present technology and meet the support requirements of the claims.

[0014] Furthermore, 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) refers to any partial region within 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), sub-block, macroblock, tile, or slice, as described in the above-mentioned non-patent document.

[0015] Furthermore, when specifying such block sizes, the block sizes may be specified not only directly but also indirectly. For example, the block sizes may be specified using identification information for identifying the sizes. Furthermore, for example, the block sizes may be specified by the ratio or difference with respect to the size of a reference block (e.g., LCU, SCU, etc.). For example, when transmitting information specifying the block size as a syntax element, the information indirectly specifying the size as described above may be used as the information. This may reduce the amount of information and improve coding efficiency. Furthermore, the specification of the block sizes may also include specification of a range of block sizes (e.g., specification of a range of allowable block sizes, etc.).

[0016] Furthermore, in this specification, encoding includes not only the overall process of converting an image into coded data (a bitstream), but also some of the processes. For example, it not only includes processes that encompass prediction processing, orthogonal transform, quantization, arithmetic coding, etc., but also includes a process that collectively refers to quantization and arithmetic coding, a process that encompasses prediction processing, quantization, and arithmetic coding, etc. Similarly, decoding includes not only the overall process of converting coded data (a bitstream) into an image, but also some of the processes. For example, it not only includes processes that encompass inverse arithmetic decoding, inverse quantization, inverse orthogonal transform, prediction processing, etc., but also includes a process that encompasses inverse arithmetic decoding and inverse quantization, a process that encompasses inverse arithmetic decoding, inverse quantization, and prediction processing, etc.

[0017] In this specification, decoding an image refers to decoding (a bit stream of) coded data obtained by coding an image using a decoding method corresponding to the coding method.

[0018] <Amount of context coding bins generated> For example, CABAC (Context-based Adaptive Binary Arithmetic Code) is used in the image coding methods (hereinafter also referred to as VVC (Versatile Video Coding)) described in Non-Patent Document 1 and Non-Patent Document 2. CABAC is an entropy coding method that uses binary arithmetic coding and context adaptive processing that estimates the occurrence probability of binary symbols based on the state (context) of surrounding parameters.

[0019] In VVC, the following parameters are set regarding the number of context coding bins generated for each transform block.

[0020] TIFF2026042898000002.tif22148...(1)

[0021] RemCcbs is a parameter for controlling (limiting) the number of context coding bins generated, and indicates the remaining number of context coding bins allowed per transform block. The remaining number of allowed context coding bins indicates the remaining number of context coding bins allowed to be generated. For example, each time a context coding bin is generated during image encoding or decoding, the number of bins is subtracted from RemCcbs. When RemCcbs falls below a threshold (e.g., less than 4), the context coding or decoding ends. In other words, the initial value of RemCcbs indicates the maximum number of context coding bins allowed, and the current value of RemCcbs indicates the remaining number of coding bins allowed at that time. Note that when RemCcbs falls below the threshold, the coding (decoding) of the image in that transform block is switched from context coding to a coding method that is easier to process (e.g., bypass coding).

[0022] Furthermore, log2(x) denotes a function that returns the logarithm of the input value x in base 2. Furthermore, TbWidth is a parameter that indicates the horizontal width of the transform block. Furthermore, TbHeight is a parameter that indicates the vertical width of the transform block. Furthermore, ctxBinSampleRatioBase is a parameter that indicates a reference value for the maximum number of context coding bins at the coefficient group (also referred to as CG (Coef. Group)) level within the transform block. The value of this ctxBinSampleRatioBase is arbitrary. For example, in VVC Ver. 1, the value of ctxBinSampleRatioBase is 28.

[0023] The table shown in Fig. 1 shows the average number of context coding bins (ctx bins / CoefGroup) generated per CG and the average number of bypass coding bins (ep bins / CoefGroup) generated per CG in CABAC for each QP (quantization parameter). The table shown in Fig. 1 shows the number of context coding bins and the number of bypass coding bins for each sequence group A and sequence group B. Sequence group A is a sequence group that is difficult to code and generates many coding bins, while sequence group B is a sequence group that is easier to code than sequence group A and generates fewer coding bins.

[0024] In both sequence group A and sequence group B, the number of context coding bins and bypass coding bins generated is greater when QP = -13 (higher bit rate) than when QP = 12. Comparing the number of generated context coding bins when QP = -13 in sequence group A with the number of generated bypass coding bins when QP = 12 in sequence group B, the number of generated context coding bins is approximately 15 times and the number of generated bypass coding bins is approximately 257 times. As such, when encoding at high bit depths and high bit rates, the number of generated context coding bins and bypass coding bins increases, which could increase the amount of processing per unit of CABAC.

[0025] Therefore, in order to improve the throughput of CABAC, a method for simplifying the encoding and decoding processes of bypass coding bins has been proposed (see, for example, Non-Patent Document 3). However, this method has difficulty in suppressing an increase in the amount of processing for context coding bins. In general, the encoding and decoding processes for context coding bins are more complex than those for bypass coding bins. Therefore, from the perspective of reducing the amount of processing, it is also important to suppress an increase in the amount of processing for context coding bins.

[0026] <2. Reducing the number of context encoding bins> <Controlling the amount of context coding bins generated> Therefore, the number of context coding bins generated at the transform block level is controlled. For example, as shown in the top row of the table in FIG. 2, the maximum number of context coding bins is set according to the bit depth (Method 1). In this way, the number of context coding bins generated can be controlled according to the bit depth. Therefore, an increase in the amount of encoding and decoding processing can be suppressed. For example, the amount of CABAC processing can be reduced in high bit depth and high bit rate encoding.

[0027] For example, an image processing device may include a maximum context coding bin number setting unit that sets a value according to the bit depth of an image as the maximum number of context coding bins generated in encoding or decoding of the image. Also, for example, an image processing method may set a value according to the bit depth of an image as the maximum number of context coding bins generated in encoding or decoding of the image. That is, a parameter indicating the maximum number of context coding bins applied in encoding or decoding of an image may be set based on the bit depth of the image.

[0028] For example, when the above-mentioned method 1 is applied, the maximum number of context coding bins may be set according to the number of context coding bins that depends on the bit depth, as shown in the second row from the top of the table shown in Figure 2 (method 1-1).

[0029] For example, in an image processing apparatus, a context coding bin maximum number setting unit may set a context coding bin number that depends on the bit depth based on the bit depth of an image, and set the maximum number of context coding bins based on the context coding bin number that depends on the bit depth.

[0030] For example, in an image processing apparatus, a context coding bin maximum number setting unit may set the maximum number of context coding bins corresponding to a processing target block based on the block size of the processing target block and the context coding bin number that depends on the bit depth. That is, the context coding bin number that depends on the bit depth and the maximum number of context coding bins may be set for each block that is a processing unit for encoding and decoding. This block may be a data unit corresponding to a partial region of an image that is a target for encoding or decoding. For example, this block may be a transform block that is a processing unit for coefficient transformation applied in image encoding (or inverse coefficient transformation applied in image decoding).

[0031] <RemCcbs setting device> FIG. 3 is a block diagram showing an example of the configuration of a RemCcbs setting device, which is an aspect of an image processing apparatus to which the present technology is applied. The RemCcbs setting device 100 shown in FIG. 3 is a device that sets RemCcbs, which is a parameter for controlling (limiting) the generation amount of context coding bins when encoding an image using CABAC.

[0032] As described above, RemCcbs indicates the allowable remaining number of context coding bins per transform block, and its initial value indicates the maximum number of allowable context coding bins (also referred to as the context coding bin maximum number). Therefore, the RemCcbs setting device 100 can also be said to be a context coding bin maximum number setting unit.

[0033] The RemCcbs setting device 100 can set RemCcbs for each CABAC processing unit. CABAC can process any data unit. In the following, as an example, the processing unit of CABAC is assumed to be a transform block, and the RemCcbs initial value setting unit 102 sets RemCcbs for each transform block.

[0034] Note that Fig. 3 shows the main processing units, data flows, etc., and is not limited to all that is shown in Fig. 3. In other words, the RemCcbs setting device 100 may have processing units that are not shown as blocks in Fig. 3. Furthermore, the RemCcbs setting device 100 may have processes and data flows that are not shown as arrows, etc. in Fig. 3.

[0035] As shown in FIG. 3, the RemCcbs setting device 100 includes a ctxBinSampleRatio(bitDepth) setting unit 101 and a RemCcbs initial value setting unit 102.

[0036] The ctxBinSampleRatio(bitDepth) setting unit 101 performs processing related to setting of ctxBinSampleRatio(bitDepth), which is a parameter indicating the number of context coding bins depending on the bit depth. For example, the ctxBinSampleRatio(bitDepth) setting unit 101 acquires bitDepth, which is a parameter indicating the bit depth of an image to be coded (or decoded), supplied from outside the RemCcbs setting device 100.

[0037] The ctxBinSampleRatio(bitDepth) setting unit 101 sets the ctxBinSampleRatio(bitDepth) using the acquired bitDepth. That is, the ctxBinSampleRatio(bitDepth) setting unit 101 sets the number of context coding bins that depends on the bit depth based on the bit depth of the image to be coded (or decoded).

[0038] In this case, the ctxBinSampleRatio(bitDepth) setting unit 101 may set the ctxBinSampleRatio(bitDepth) based on this bit depth and other arbitrary parameters. For example, the ctxBinSampleRatio(bitDepth) setting unit 101 may set the ctxBinSampleRatio(bitDepth) based on the bit depth of the image to be coded (or decoded) and a parameter ctxBinSampleRatioBase indicating a reference value of the number of context coding bins. In this case, the ctxBinSampleRatio(bitDepth) setting unit 101 may acquire bitDepth and ctxBinSampleRatioBase supplied from outside the RemCcbs setting device 100. Then, the ctxBinSampleRatio(bitDepth) setting unit 101 may set the ctxBinSampleRatio(bitDepth) using the acquired bitDepth and ctxBinSampleRatioBase.

[0039] The ctxBinSampleRatio(bitDepth) setting unit 101 supplies the set ctxBinSampleRatio(bitDepth) to the RemCcbs initial value setting unit 102 .

[0040] The RemCcbs initial value setting unit 102 performs processing related to setting the initial value of RemCcbs. For example, the RemCcbs initial value setting unit 102 acquires the ctxBinSampleRatio(bitDepth) supplied from the ctxBinSampleRatio(bitDepth) setting unit 101.

[0041] The RemCcbs initial value setting unit 102 uses the acquired ctxBinSampleRatio(bitDepth) to set an initial value of RemCcbs corresponding to the current block of CABAC processing (the maximum number of context coding bins generated in encoding or decoding of an image). That is, the RemCcbs initial value setting unit 102 sets the initial value of RemCcbs based on the bit depth of the image. In other words, the RemCcbs initial value setting unit 102 sets a value according to the bit depth of the image as the initial value of RemCcbs. For example, the RemCcbs initial value setting unit 102 may set the initial value of RemCcbs based on the number of context coding bins, which depends on the bit depth.

[0042] In this case, the RemCcbs initial value setting unit 102 may set the initial value of RemCcbs based on this ctxBinSampleRatio(bitDepth) and any other parameters. For example, the RemCcbs initial value setting unit 102 may set the initial value of RemCcbs corresponding to the block to be processed based on the block size of the block to be processed and the number of context coding bins, which depends on the bit depth. For example, the RemCcbs setting device 100 may acquire the ctxBinSampleRatio(bitDepth) supplied from the ctxBinSampleRatio(bitDepth) setting unit 101, and may also acquire the TbWidth and TbHeight of the block to be processed supplied from outside the RemCcbs setting device 100. As described above, TbWidth is a parameter indicating the horizontal width of the transform block. Furthermore, TbHeight is a parameter indicating the vertical width of the transform block. That is, TbWidth and TbHeight indicate the block size of the block to be processed (transform block). The RemCcbs initial value setting unit 102 may then use the acquired ctxBinSampleRatio(bitDepth), TbWidth, and TbHeight to set the initial value of RemCcbs corresponding to the block to be processed.

[0043] The RemCcbs initial value setting unit 102 outputs the set initial value of RemCcbs to the outside of the RemCcbs setting device 100 (for example, a subsequent processing unit).

[0044] With such a configuration, when each processing unit performs the above-described processing, the RemCcbs setting device 100 can control the generation amount of context encoding bins. Therefore, the RemCcbs setting device 100 can suppress an increase in the processing amount of encoding and decoding. For example, the RemCcbs setting device 100 can suppress an increase in the processing amount of CABAC in the encoding and decoding of high-bit-depth and high-bit-rate images.

[0045] In other words, the RemCcbs setting device 100 can suppress an increase in the generation amount of the total number of bins of context encoding bins and bypass encoding bins by suppressing the generation amount of context encoding bins. That is, the RemCcbs setting device 100 can suppress an increase in the total processing amount of CABAC.

[0046] <Flow of RemCcbs setting process> An example of the flow of the RemCcbs setting process executed by this RemCcbs setting device 100 will be described with reference to the flowchart of FIG. 4.

[0047] When the RemCcbs setting process starts, in step S101, the ctxBinSampleRatio(bitDepth) setting unit 101 of the RemCcbs setting device 100 sets a parameter ctxBinSampleRatio(bitDepth) indicating the number of context coding bins that depends on the bit depth (bitDepth) based on the bit depth (bitDepth) of an image to be coded (or decoded). At this time, the ctxBinSampleRatio(bitDepth) setting unit 101 may set the ctxBinSampleRatio(bitDepth) based on this bit depth and other arbitrary parameters. For example, the ctxBinSampleRatio(bitDepth) setting unit 101 may set the ctxBinSampleRatio(bitDepth) based on the bit depth (bitDepth) of an image to be coded (or decoded) and a parameter ctxBinSampleRatioBase indicating a reference value of the number of context coding bins.

[0048] In step S102, the RemCcbs initial value setting unit 102 of the RemCcbs setting device 100 sets an initial value of RemCcbs based on the ctxBinSampleRatio(bitDepth) set in step S101. That is, the RemCcbs initial value setting unit 102 sets an initial value of the allowable remaining number of context coding bins based on the bit depth of the image. In other words, the RemCcbs initial value setting unit 102 sets a value according to the bit depth of the image as the maximum number of context coding bins that will occur in encoding or decoding of that image.

[0049] In this case, the RemCcbs initial value setting unit 102 may set the initial value of RemCcbs based on this ctxBinSampleRatio(bitDepth) and any other parameters. For example, the RemCcbs initial value setting unit 102 may set the initial value of RemCcbs corresponding to the current block to be processed based on the block size (TbWidth and TbHeight) of the current block and the number of context coding bins (ctxBinSampleRatio(bitDepth)) which depends on the bit depth.

[0050] When the processing of step S102 ends, the RemCcbs setting process ends. By performing the RemCcbs setting process in this manner, the RemCcbs setting device 100 can control the number of context coding bins generated. Therefore, the RemCcbs setting device 100 can suppress an increase in the amount of encoding and decoding processing. For example, the RemCcbs setting device 100 can suppress an increase in the amount of CABAC processing in encoding and decoding images with a high bit depth and a high bit rate.

[0051] In other words, the RemCcbs setting device 100 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated. In other words, the RemCcbs setting device 100 can suppress an increase in the total amount of CABAC processing.

[0052] <ctxBinSampleRatio(bitDepth)> The above-mentioned initial value of RemCcbs (i.e., the maximum number of context coding bins) may be derived by any method. For example, RemCcbs initial value setting section 102 may derive the initial value of RemCcbs using the following equation (2).

[0053] TIFF2026042898000003.tif9150...(2)

[0054] The method of deriving this ctxBinSampleRatio(bitDepth) (i.e., the number of context coding bins depending on the bit depth) is arbitrary.

[0055] For example, when the above-described method 1-1 is applied, as shown in the third row from the top of the table in Fig. 2, a value obtained by dividing a reference value of the number of context coding bins by a value corresponding to the bit depth of the image may be set as the number of context coding bins dependent on the bit depth (method 1-1-1). For example, in an image processing device, a maximum context coding bin number setting unit may set a value obtained by dividing a reference value of the number of context coding bins by a value corresponding to the bit depth of the image as the number of context coding bins dependent on the bit depth. For example, the ctxBinSampleRatio(bitDepth) setting unit 101 may derive ctxBinSampleRatio(bitDepth) using the following formula (3):

[0056] TIFF2026042898000004.tif8147...(3)

[0057] In this case, the ctxBinSampleRatio(bitDepth) setting unit 101 bit-shifts ctxBinSampleRatioBase to the right by the larger of the value obtained by subtracting 10 from the bit depth (bitDepth) and "0", and sets the value as ctxBinSampleRatio(bitDepth). In other words, when the bit depth is greater than 10 bits, the ctxBinSampleRatio(bitDepth) setting unit 101 sets the ctxBinSampleRatio(bitDepth) to a smaller value as the bit depth increases.

[0058] Furthermore, when the above-described method 1-1 is applied, as shown in the fourth row from the top of the table in Fig. 2, a value obtained by subtracting a value corresponding to the bit depth of the image from a reference value of the number of context coding bins may be set as the number of context coding bins dependent on the bit depth (method 1-1-2). For example, in an image processing device, a maximum context coding bin number setting unit may set a value obtained by subtracting a value corresponding to the bit depth of the image from a reference value of the number of context coding bins as the number of context coding bins dependent on the bit depth. For example, the ctxBinSampleRatio(bitDepth) setting unit 101 may derive ctxBinSampleRatio(bitDepth) using the following formula (4):

[0059] TIFF2026042898000005.tif8150...(4)

[0060] In equation (4), a is an arbitrary constant. For example, a may be set to 4. In this case, the ctxBinSampleRatio(bitDepth) setting unit 101 subtracts a times the larger of the value obtained by subtracting 10 from the bit depth (bitDepth) and "0" from the ctxBinSampleRatioBase, and sets the subtracted value as the ctxBinSampleRatio(bitDepth). In other words, when the bit depth is greater than 10 bits, the ctxBinSampleRatio(bitDepth) setting unit 101 sets the ctxBinSampleRatio(bitDepth) to a smaller value as the bit depth increases. In other words, when the bit depth is greater than 10 bits, the ctxBinSampleRatio(bitDepth) setting unit 101 sets the ctxBinSampleRatio(bitDepth) to a smaller value as the bit depth increases.

[0061] Furthermore, when the above-described method 1-1 is applied, a value according to the bit depth may be set as the bit-depth-dependent context coding bin number (method 1-1-3), as shown in the fifth row from the top of the table in Fig. 2. For example, in an image processing device, a context coding bin maximum number setting unit may set a value according to the bit depth of an image as the bit-depth-dependent context coding bin number. For example, the ctxBinSampleRatio(bitDepth) setting unit 101 may derive ctxBinSampleRatio(bitDepth) using the following equation (5):

[0062] TIFF2026042898000006.tif7148...(5)

[0063] In equation (5), ctxBinSampleRatioBase2 is a parameter indicating a reference value (second reference value) of the number of context encoding bins of a CG level, which is smaller than ctxBinSampleRatioBase (first reference value). In this case, when the bit depth of the image is 10 bits or less, the ctxBinSampleRatio(bitDepth) setting unit 101 sets ctxBinSampleRatioBase (first reference value) to ctxBinSampleRatio(bitDepth), and when the bit depth of the image is greater than 10 bits, the ctxBinSampleRatio(bitDepth) setting unit 101 sets ctxBinSampleRatioBase2 (second reference value) to ctxBinSampleRatio(bitDepth). In other words, when the bit depth is greater than 10 bits, the ctxBinSampleRatio(bitDepth) setting unit 101 sets ctxBinSampleRatio(bitDepth) to a value smaller than when the bit depth is 10 bits or less.

[0064] Note that ctxBinSampleRatioBase2 may be any value smaller than ctxBinSampleRatioBase. For example, ctxBinSampleRatioBase=28 and ctxBinSampleRatioBase2=21.

[0065] The graph shown in Fig. 5 shows example values ​​of ctxBinSampleRatio(bitDepth) derived by these derivation methods. In the graph shown in Fig. 5, line 131 shows example values ​​of ctxBinSampleRatio(bitDepth) derived by applying the above-mentioned formula (3). Line 132 shows example values ​​of ctxBinSampleRatio(bitDepth) derived by applying the above-mentioned formula (4). Line 133 shows example values ​​of ctxBinSampleRatio(bitDepth) derived by applying the above-mentioned formula (5).

[0066] As shown by lines 131 to 133, when the bit depth is greater than 10 bits, the value of ctxBinSampleRatio(bitDepth) for each bit depth differs depending on the derivation method. However, in any method, when the bit depth is greater than 10 bits, ctxBinSampleRatio(bitDepth) takes a smaller value than when the bit depth is 10 bits or less. This makes it possible to control the number of context coding bins generated and suppress an increase in the amount of CABAC processing when encoding or decoding high-bit-depth, high-bit-rate images.

[0067] It should be noted that which of the above-mentioned derivation methods is optimal depends on the required image quality, the content of the content, etc. It is also possible to selectively apply one of these derivation methods. For example, it is also possible to select a derivation method based on any condition (for example, the required image quality, the content, etc.). It is also possible to accept an instruction from a user or an application to select a derivation method, and apply a derivation method in accordance with that instruction. It is also possible to use derivation methods other than the examples described above as options (candidates). The number of options (candidates) is also arbitrary.

[0068] <Execution control flag> When the above-described method 1-1 is applied, as shown in the sixth row from the top of the table in FIG. 2, an execution control flag, which is a flag indicating whether or not to apply the above-described method 1-1, may be transmitted from the encoding side to the decoding side. If this execution control flag is true, the maximum number of context encoding bins may be set according to the number of context encoding bins depending on the bit depth. That is, in this case, the above-described method 1 is applied. Also, if this execution control flag is false, the maximum number of context encoding bins may be set according to a reference value of the number of context encoding bins. That is, in this case, the above-described method 1 is not applied (method 1-1-4).

[0069] By doing so, it is possible to control whether or not to apply method 1-1. Therefore, also in this case, it is possible to control the amount of generated context encoding bins and suppress an increase in the processing amount of encoding and decoding. For example, it is possible to suppress an increase in the processing amount of CABAC in encoding and decoding of an image with a high bit depth and a high bit rate.

[0070] For example, in an image processing apparatus, when a control flag (execution control flag) is true, a context encoding bin maximum number setting unit may set the number of context encoding bins depending on the bit depth based on the bit depth of an image, and set the maximum number of context encoding bins based on the number of context encoding bins depending on the bit depth. When the control flag is false, the maximum number of context encoding bins may be set based on a reference value of the number of context encoding bins.

[0071] As described above, when method 1-1 is applied, any one of methods 1-1-1 to 1-1-3 may be applied.

[0072] <RemCcbs setting device> Fig. 6 is a block diagram showing an example of the main configuration of the RemCcbs setting device 100 in this case. Note that Fig. 6 shows the main processing units, data flows, etc., and is not limited to all that is shown in Fig. 6. In other words, the RemCcbs setting device 100 may have processing units that are not shown as blocks in Fig. 6. Furthermore, the RemCcbs setting device 100 may have processes and data flows that are not shown as arrows, etc. in Fig. 6.

[0073] In the case of FIG. 6, the RemCcbs setting device 100 includes a ctxBinSampleRatio setting unit 151 and a RemCcbs initial value setting unit 152 .

[0074] The ctxBinSampleRatio setting unit 151 performs processing related to setting of ctxBinSampleRatio, which is a parameter indicating the number of context coding bins. For example, the ctxBinSampleRatio setting unit 151 acquires ctxBinSampleRatioBase and bitDepth supplied from outside the RemCcbs setting device 100. The ctxBinSampleRatio setting unit 151 also acquires an execution control flag supplied from outside the RemCcbs setting device 100. This execution control flag is a control flag indicating whether or not to set the maximum number of context coding bins according to the bit depth. In other words, the execution control flag is a flag indicating whether or not to apply the present technology.

[0075] The ctxBinSampleRatio setting unit 151 determines how to set ctxBinSampleRatio based on the execution control flag. For example, when the execution control flag is true (e.g., 1), the ctxBinSampleRatio setting unit 151 may set ctxBinSampleRatio based on the acquired bitDepth. That is, the ctxBinSampleRatio setting unit 151 may set the number of context coding bins (ctxBinSampleRatio(bitDepth)) that depends on the bit depth based on the bit depth (bitDepth) of the image, and use this as ctxBinSampleRatio. In this case, the ctxBinSampleRatio setting unit 151 may further set ctxBinSampleRatio(bitDepth) using any other arbitrary parameter (e.g., ctxBinSampleRatioBase). The method of deriving ctxBinSampleRatio(bitDepth) is arbitrary. For example, the ctxBinSampleRatio setting unit 151 may derive the ctxBinSampleRatio(bitDepth) using any of the above-described formulas (3) to (5).

[0076] On the other hand, when the execution control flag is false (for example, 0), the ctxBinSampleRatio setting unit 151 may set the ctxBinSampleRatio based on the acquired ctxBinSampleRatioBase, without depending on the bitDepth. For example, the ctxBinSampleRatio setting unit 151 may set the acquired ctxBinSampleRatioBase as the ctxBinSampleRatio. In the following description, it is assumed that when the execution control flag is false, this ctxBinSampleRatioBase is set as the ctxBinSampleRatio.

[0077] The ctxBinSampleRatio setting unit 151 supplies the ctxBinSampleRatio (ctxBinSampleRatio(bitDepth) or ctxBinSampleRatioBase) set as described above to the RemCcbs initial value setting unit 152.

[0078] The RemCcbs initial value setting unit 152 performs processing related to setting the initial value of RemCcbs. For example, the RemCcbs initial value setting unit 152 acquires the ctxBinSampleRatio (ctxBinSampleRatio(bitDepth) or ctxBinSampleRatioBase) supplied from the ctxBinSampleRatio setting unit 151.

[0079] The RemCcbs initial value setting unit 152 sets the initial value of RemCcbs (the maximum number of context coding bins generated in encoding or decoding of an image) using the acquired ctxBinSampleRatio. For example, when the execution control flag is true, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs using ctxBinSampleRatio(bitDepth). The method of deriving the initial value of RemCcbs is arbitrary. For example, the RemCcbs initial value setting unit 152 may derive the initial value of RemCcbs using the above-mentioned equation (2).

[0080] On the other hand, if the execution control flag is false, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs using ctxBinSampleRatioBase. The method of deriving the initial value of RemCcbs is arbitrary. For example, the RemCcbs initial value setting unit 152 may derive the initial value of RemCcbs using the above-mentioned equation (1).

[0081] When setting the initial value of RemCcbs, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs based on ctxBinSampleRatio and any other parameters. For example, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs corresponding to the block to be processed based on the block size of the block to be processed and an execution control flag. For example, when the execution control flag is true, the RemCcbs initial value setting unit 152 may acquire ctxBinSampleRatio(bitDepth) supplied from the ctxBinSampleRatio setting unit 151 and may further acquire TbWidth and TbHeight of the block to be processed supplied from outside the RemCcbs setting device 100. Then, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs corresponding to the block to be processed using the acquired ctxBinSampleRatio(bitDepth), TbWidth, and TbHeight. Furthermore, when the execution control flag is false, the RemCcbs initial value setting unit 152 may acquire the ctxBinSampleRatioBase supplied from the ctxBinSampleRatio setting unit 151, and may also acquire the TbWidth and TbHeight of the block to be processed supplied from outside the RemCcbs setting device 100. Then, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs corresponding to the block to be processed using the acquired ctxBinSampleRatioBase, TbWidth, and TbHeight.

[0082] The RemCcbs initial value setting unit 152 outputs the set initial value of RemCcbs to the outside of the RemCcbs setting device 100 (for example, to a processing unit at a subsequent stage).

[0083] With such a configuration, by each processing unit performing the above-described processing, the RemCcbs setting device 100 can control the generation amount of context coding bin numbers using the execution control flag. Therefore, also in this case, the RemCcbs setting device 100 can suppress an increase in the processing amount of encoding and decoding. For example, the RemCcbs setting device 100 can suppress an increase in the processing amount of CABAC in the encoding and decoding of high bit-depth and high bit-rate images.

[0084] <Flow of RemCcbs setting process> An example of the flow of the RemCcbs setting process in this case will be described with reference to the flowchart of FIG. 7.

[0085] When the RemCcbs setting process is started, the ctxBinSampleRatio setting unit 151 of the RemCcbs setting device 100 determines in step S151 whether the execution control flag is true. If it is determined that the execution control flag is true, the process proceeds to step S152.

[0086] In step S152, the ctxBinSampleRatio setting unit 151 applies the above-described method 1-1, sets ctxBinSampleRatio(bitDepth) based on the bit depth, and sets that ctxBinSampleRatio(bitDepth) as ctxBinSampleRatio. At that time, the ctxBinSampleRatio setting unit 151 may set ctxBinSampleRatio(bitDepth) based on the bit depth and any other arbitrary parameters. For example, the ctxBinSampleRatio setting unit 151 may set ctxBinSampleRatio(bitDepth) based on bitDepth and ctxBinSampleRatioBase. At that time, the ctxBinSampleRatio setting unit 151 may derive ctxBinSampleRatio(bitDepth) using, for example, any one of the above-described formulas (3) to (5). When the processing of step S152 ends, the process proceeds to step S154.

[0087] If it is determined in step S151 that the execution control flag is false, the process proceeds to step S153.

[0088] In step S153, the ctxBinSampleRatio setting unit 151 sets ctxBinSampleRatioBase as ctxBinSampleRatio. When the process of step S153 ends, the process proceeds to step S154.

[0089] In step S154, the RemCcbs initial value setting unit 152 sets the RemCcbs initial value of the processing target block based on the ctxBinSampleRatio (ctxBinSampleRatio(bitDepth) or ctxBinSampleRatioBase) set in step S152 or step S153.

[0090] That is, when the execution control flag is true, the RemCcbs initial value setting unit 152 sets the initial value of the allowable remaining number of context coding bins based on the bit depth of the image. In other words, in this case, the RemCcbs initial value setting unit 152 sets a value according to the bit depth of the image as the maximum number of context coding bins that will occur in encoding or decoding of that image.

[0091] On the other hand, if the execution control flag is false, the RemCcbs initial value setting unit 152 sets the initial value of the allowable remaining number of context coding bins based on the reference value of the number of context coding bins. In other words, in this case, the RemCcbs initial value setting unit 152 sets a value according to the reference value of the number of context coding bins as the maximum number of context coding bins that may occur in encoding or decoding of the image.

[0092] When setting the initial value of RemCcbs, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs based on ctxBinSampleRatio and any other parameters. For example, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs corresponding to the block to be processed based on the block size of the block to be processed and an execution control flag. For example, when the execution control flag is true, the RemCcbs initial value setting unit 152 may set the initial value of RemCcbs corresponding to the block to be processed based on the block size (TbWidth and TbHeight) of the block to be processed and the number of context coding bins (ctxBinSampleRatio(bitDepth)), which depends on the bit depth. In this case, the RemCcbs initial value setting unit 152 may derive the initial value of RemCcbs using, for example, the above-mentioned equation (2). Furthermore, if the execution control flag is false, the RemCcbs initial value setting unit 152 may set an initial value of RemCcbs corresponding to the block to be processed based on the block size (TbWidth and TbHeight) of the block to be processed and the reference value of the number of context coding bins (ctxBinSampleRatioBase). In this case, the RemCcbs initial value setting unit 152 may derive the RemCcbs initial value using, for example, the above-mentioned equation (1). When the process of step S154 ends, the RemCcbs setting process ends.

[0093] By performing the RemCcbs setting process in this manner, the RemCcbs setting device 100 can use the execution control flag to control the number of context coding bins generated. Therefore, in this case as well, the RemCcbs setting device 100 can suppress an increase in the amount of encoding and decoding processing. For example, the RemCcbs setting device 100 can suppress an increase in the amount of CABAC processing in encoding and decoding images with a high bit depth and a high bit rate.

[0094] <Reference value control flag> As shown in the seventh row from the top of the table in Figure 2, the maximum number of context coding bins may be set according to processing speed control (Method 2). For example, a control flag indicating the CABAC processing speed mode may be transmitted from the encoding side to the decoding side, and the maximum number of context coding bins may be set according to the control flag. This makes it possible to control the number of context coding bins generated according to processing speed control, thereby suppressing an increase in the amount of encoding and decoding processing. For example, it is possible to suppress an increase in the amount of CABAC processing when encoding and decoding images with a high bit depth and high bit rate.

[0095] This control flag may be flag information that takes any value. For example, when this control flag is false (e.g., 0), it may indicate that CABAC is performed in normal speed mode, and when it is true (e.g., 1), it may indicate that CABAC is performed in high-speed mode. The high-speed mode is an operating mode in which the processing time is shorter than that in the normal speed mode.

[0096] For example, an image processing device may include a maximum context coding bin number setting unit that sets the maximum number of context coding bins generated in encoding or decoding of an image in accordance with such a control flag. Also, for example, an image processing method may set the maximum number of context coding bins generated in encoding or decoding of an image in accordance with such a control flag. That is, a parameter indicating the maximum number of context coding bins applied in encoding or decoding of an image may be set based on a control flag that indicates a processing speed mode.

[0097] For example, when the control flag indicates the normal speed mode (i.e., when the control flag is false), the maximum context coding bin number setting unit may set the maximum number of context coding bins based on a first reference value. That is, when image encoding and decoding are performed in a normal processing time, the maximum context coding bin number setting unit may set the first reference value for the normal speed mode as the reference value for the number of context coding bins of the CG level, and use the first reference value to set the maximum number of context coding bins.

[0098] On the other hand, if the control flag indicates the high-speed mode (i.e., the control flag is true), the maximum context-coding-bin-number setting unit may set the maximum number of context-coding bins based on a second reference value that is smaller than the first reference value. That is, if image encoding or decoding is performed in a shorter time than usual, the maximum context-coding-bin-number setting unit may set the second reference value for the high-speed mode, i.e., a value smaller than the first reference value, as the reference value for the number of context-coding bins of the CG level, and use the second reference value to set the maximum number of context-coding bins.

[0099] By doing so, when the control flag indicates the high-speed mode, the number of context coding bins generated is reduced compared to the normal speed mode, allowing encoding and decoding to be performed at higher speeds. In other words, when the control flag indicates the high-speed mode, the increase in the amount of encoding and decoding processing can be reduced compared to the normal speed mode. Therefore, for example, when encoding or decoding an image with a high bit depth and a high bit rate, by setting the control flag to indicate the high-speed mode, the increase in the amount of CABAC processing can be reduced.

[0100] In other words, this control flag can also be said to be a flag (also referred to as a reference value control flag) that controls the value of the reference value of the number of context encoding bins at the CG level. That is, when Method 2 is applied, as shown in the bottom row of the table in FIG. 2, this reference value control flag may be transmitted from the encoding side to the decoding side. Then, the reference value of the number of context encoding bins may be set according to the reference value control flag. And the maximum number of context encoding bins may be set according to the reference value of the number of context encoding bins corresponding to the reference value control flag (Method 2-1).

[0101] Note that the maximum number of context encoding bins setting unit may set the maximum number of context encoding bins corresponding to the processing target block based on the block size of the processing target block and this control flag (reference value control flag).

[0102] <RemCcbs setting device> FIG. 8 is a block diagram showing a main configuration example of the RemCcbs setting device 100 in this case. Note that in FIG. 8, main components such as the processing unit and the data flow are shown, and not all of the components shown in FIG. 8 are necessarily included. That is, the RemCcbs setting device 100 may have a processing unit not shown as a block in FIG. 8. Also, the RemCcbs setting device 100 may have a process or data flow not shown as an arrow or the like in FIG. 8.

[0103] In the case of FIG. 8, the RemCcbs setting device 100 has a ctxBinSampleRatio setting unit 181 and a RemCcbs initial value setting unit 182.

[0104] The ctxBinSampleRatio setting unit 181 performs processing related to setting ctxBinSampleRatio, which is a parameter indicating the number of context coding bins. For example, the ctxBinSampleRatio setting unit 181 acquires ctxBinSampleRatioBase1 (a first reference value for the number of context coding bins at the CG level) and ctxBinSampleRatioBase2 (a second reference value for the number of context coding bins at the CG level) supplied from outside the RemCcbs setting device 100. ctxBinSampleRatioBase2 takes a value smaller than ctxBinSampleRatioBase1. The value of ctxBinSampleRatioBase1 is arbitrary. For example, ctxBinSampleRatioBase1=28 may be set. Furthermore, the value of ctxBinSampleRatioBase2 is arbitrary as long as it is smaller than ctxBinSampleRatioBase1. For example, ctxBinSampleRatioBase2=0 may be set.

[0105] Furthermore, the ctxBinSampleRatio setting unit 181 acquires a reference value control flag supplied from outside the RemCcbs setting device 100. This reference value control flag is a control flag that controls the reference value of the number of context coding bins at the CG level.

[0106] The ctxBinSampleRatio setting unit 181 sets the value of ctxBinSampleRatio based on the reference value control flag. For example, if the reference value control flag is false (e.g., 0), the ctxBinSampleRatio setting unit 181 may set the value of ctxBinSampleRatio using the acquired ctxBinSampleRatioBase1. The method for setting this ctxBinSampleRatio is arbitrary as long as ctxBinSampleRatioBase1 is used. For example, the ctxBinSampleRatio setting unit 181 may set the acquired ctxBinSampleRatioBase1 as the ctxBinSampleRatio. In the following description, it is assumed that if the reference value control flag is false, this ctxBinSampleRatioBase1 is used as the ctxBinSampleRatio.

[0107] On the other hand, when the reference value control flag is true (for example, 1), the ctxBinSampleRatio setting unit 181 may set the ctxBinSampleRatio using the acquired ctxBinSampleRatioBase2. The method for setting this ctxBinSampleRatio is arbitrary as long as ctxBinSampleRatioBase2 is used. For example, the ctxBinSampleRatio setting unit 181 may set the acquired ctxBinSampleRatioBase2 as the ctxBinSampleRatio. In the following description, it is assumed that when the reference value control flag is false, this ctxBinSampleRatioBase2 is set as the ctxBinSampleRatio.

[0108] The ctxBinSampleRatio setting unit 181 supplies the ctxBinSampleRatio (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) set as described above to the RemCcbs initial value setting unit 182.

[0109] The RemCcbs initial value setting unit 182 performs processing related to setting the initial value of RemCcbs. For example, the RemCcbs initial value setting unit 182 acquires the ctxBinSampleRatio (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) supplied from the ctxBinSampleRatio setting unit 181.

[0110] The RemCcbs initial value setting unit 182 sets the initial value of RemCcbs (the maximum number of context coding bins generated in encoding or decoding of an image) using the acquired ctxBinSampleRatio. That is, the RemCcbs initial value setting unit 182 sets the initial value of RemCcbs according to a control flag (reference value control flag) indicating the processing speed mode. In other words, the RemCcbs initial value setting unit 182 sets a value according to the control flag indicating the processing speed mode as the initial value of RemCcbs.

[0111] For example, when the reference value control flag is false, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs using the acquired ctxBinSampleRatioBase1 (first reference value). Also, when the reference value control flag is true, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs using the acquired ctxBinSampleRatioBase2 (second reference value). The method of deriving this initial value of RemCcbs is arbitrary. For example, the RemCcbs initial value setting unit 182 may derive the initial value of RemCcbs using the above-described formula (1).

[0112] When setting the initial value of RemCcbs, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs based on ctxBinSampleRatio and any other parameters. For example, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs corresponding to the block to be processed based on the block size of the block to be processed and the reference value control flag. For example, if the reference value control flag is false, the RemCcbs initial value setting unit 182 may acquire ctxBinSampleRatioBase1 (first reference value) supplied from the ctxBinSampleRatio setting unit 181 and may further acquire TbWidth and TbHeight of the block to be processed supplied from outside the RemCcbs setting device 100. Then, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs corresponding to the block to be processed using the acquired ctxBinSampleRatioBase1, TbWidth, and TbHeight. Furthermore, when the reference value control flag is true, the RemCcbs initial value setting unit 182 may acquire ctxBinSampleRatioBase2 (second reference value) supplied from the ctxBinSampleRatio setting unit 181, and may also acquire TbWidth and TbHeight of the block to be processed supplied from outside the RemCcbs setting device 100. Then, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs corresponding to the block to be processed using the acquired ctxBinSampleRatioBase2, TbWidth, and TbHeight.

[0113] The RemCcbs initial value setting unit 182 outputs the set initial value of RemCcbs to the outside of the RemCcbs setting device 100 (for example, to a processing unit at a subsequent stage).

[0114] With such a configuration, by having each processing unit perform the above-described processing, the RemCcbs setting device 100 can control the generation amount of context encoding bins using the reference value control flag. That is, the RemCcbs setting device 100 can control the generation amount of context encoding bins according to the processing speed control of CABAC. Therefore, also in this case, the RemCcbs setting device 100 can suppress an increase in the processing amount of encoding and decoding. For example, the RemCcbs setting device 100 can suppress an increase in the processing amount of CABAC in the encoding and decoding of high bit-depth and high bit-rate images.

[0115] <Flow of RemCcbs setting process> An example of the flow of the RemCcbs setting process in this case will be described with reference to the flowchart of FIG. 9.

[0116] When the RemCcbs setting process is started, the ctxBinSampleRatio setting unit 181 of the RemCcbs setting device 100 determines in step S181 whether the reference value control flag is true. If it is determined that the reference value control flag is true, the process proceeds to step S182.

[0117] In step S182, the ctxBinSampleRatio setting unit 181 sets ctxBinSampleRatioBase2 as ctxBinSampleRatio. When the processing of step S182 ends, the process proceeds to step S184.

[0118] Also, in step S181, if it is determined that the reference value control flag is false, the process proceeds to step S183.

[0119] In step S183, the ctxBinSampleRatio setting unit 181 sets ctxBinSampleRatioBase1 as ctxBinSampleRatio. When the processing of step S183 ends, the process proceeds to step S184.

[0120] In step S184, the RemCcbs initial value setting unit 182 sets the RemCcbs initial value corresponding to the block to be processed based on the ctxBinSampleRatio (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) set in step S182 or step S183.

[0121] That is, the RemCcbs initial value setting unit 182 sets the initial value of the remaining allowable number of context coding bins based on the reference value control flag. In other words, the RemCcbs initial value setting unit 182 sets a value according to the reference value control flag as the maximum number of context coding bins that may occur in encoding or decoding of the image.

[0122] When setting the initial value of RemCcbs, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs based on ctxBinSampleRatio and any other parameters. For example, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs corresponding to the block to be processed based on the block size of the block to be processed and the reference value control flag. For example, the RemCcbs initial value setting unit 182 may set the initial value of RemCcbs corresponding to the block to be processed based on the block size (TbWidth and TbHeight) of the block to be processed and the reference value of the number of context coding bins corresponding to the reference value control flag (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2). In this case, the RemCcbs initial value setting unit 182 may derive the RemCcbs initial value using, for example, the above-described formula (1). When the process of step S184 ends, the RemCcbs setting process ends.

[0123] By performing the RemCcbs setting process in this manner, the RemCcbs setting device 100 can control the number of context coding bins generated using the reference value control flag. That is, the RemCcbs setting device 100 can control the number of context coding bins generated in accordance with CABAC processing speed control. Therefore, in this case as well, the RemCcbs setting device 100 can suppress an increase in the amount of encoding and decoding processing. For example, the RemCcbs setting device 100 can suppress an increase in the amount of CABAC processing when encoding and decoding high-bit-depth, high-bit-rate images.

[0124] <Encoding method> The image coding method to which RemCcbs is applied may be any coding method that uses context, and is not limited to the above-mentioned CABAC as an example.

[0125] <3. Embodiment> <Image encoding device> The present technology described above can be applied to any configuration. For example, the present technology can be applied to an image encoding device. FIG. 10 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 300 shown in FIG. 10 is a device that encodes image data of a moving image. For example, the image encoding device 300 can encode image data of a moving image using an encoding method described in any of the non-patent documents mentioned above.

[0126] Note that Fig. 10 shows the main processing units (blocks), data flows, etc., and does not necessarily show everything. That is, the image coding device 300 may have processing units that are not shown as blocks in Fig. 10. Furthermore, the image coding device 300 may have processes and data flows that are not shown as arrows, etc. in Fig. 10.

[0127] As shown in FIG. 10 , the image coding device 300 includes a control unit 301, a rearrangement buffer 311, a calculation unit 312, an orthogonal transformation unit 313, a quantization unit 314, a coding unit 315, an accumulation buffer 316, an inverse quantization unit 317, an inverse orthogonal transformation unit 318, a calculation unit 319, an in-loop filter unit 320, a frame memory 321, a prediction unit 322, and a rate control unit 323.

[0128] <Control unit> The control unit 301 divides the video data held in the rearrangement buffer 311 into blocks (CUs, PUs, transform blocks, etc.) based on an externally or pre-specified block size of the processing unit. The control unit 301 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).

[0129] These coding parameters will be described in detail later. After determining the coding parameters as described above, the control unit 301 supplies them to each block. Specifically, this is as follows.

[0130] The header information Hinfo is supplied to each block. The prediction mode information Pinfo is supplied to the encoding unit 315 and the prediction unit 322. The transformation information Tinfo is supplied to the encoding unit 315, the orthogonal transformation unit 313, the quantization unit 314, the inverse quantization unit 317, and the inverse orthogonal transformation unit 318. The filter information Finfo is supplied to the in-loop filter unit 320.

[0131] <Sorting buffer> Each field (input image) of video data is input to the image coding device 300 in its playback order (display order). The reordering buffer 311 acquires and holds (stores) each input image in its playback order (display order). Under the control of the control unit 301, the reordering buffer 311 reorders the input images in coding order (decoding order) and divides them into blocks, which are processing units. The reordering buffer 311 supplies each processed input image to the calculation unit 312. The reordering buffer 311 also supplies each input image (original image) to the prediction unit 322 and the in-loop filter unit 320.

[0132] <Arithmetic section> The calculation unit 312 receives an image I corresponding to a block of processing units and a predicted image P supplied from the prediction unit 322, 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 313.

[0133] D = I - P

[0134] <Orthogonal transformation section> The orthogonal transform unit 313 receives as input the prediction residual D supplied from the calculation unit 312 and the transform information Tinfo supplied from the control unit 301, and performs an orthogonal transform on the prediction residual D based on the transform information Tinfo to derive transform coefficients Coeff. For example, the orthogonal transform unit 313 performs a primary transform on the prediction residual D to generate primary transform coefficients, and performs a secondary transform on the primary transform coefficients based on the ST identifier to generate secondary transform coefficients. The orthogonal transform unit 313 supplies the obtained secondary transform coefficients as transform coefficients Coeff to the quantization unit 314. Note that the orthogonal transform unit 313 is not limited to an orthogonal transform and can perform any coefficient transform. That is, the transform coefficients Coeff may be derived by performing any coefficient transform on the prediction residual D. Therefore, the orthogonal transform unit 313 can also be referred to as a coefficient transform unit.

[0135] <Quantization part> The quantization unit 314 receives the transform coefficient Coeff supplied from the orthogonal transformation unit 313 and the transform information Tinfo supplied from the control unit 301 as input, and scales (quantizes) the transform coefficient Coeff based on the transform information Tinfo. The quantization rate is controlled by the rate control unit 323. The quantization unit 314 supplies a quantization coefficient level (also referred to as a quantization coefficient qcoeff), which is the level value of the transform coefficient quantized in this way, to the encoding unit 315 and the inverse quantization unit 317.

[0136] <Encoding part> The encoding unit 315 receives as input the quantization coefficient level supplied from the quantization unit 314, various encoding parameters (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, etc.) supplied from the control unit 301, information on filters such as filter coefficients supplied from the in-loop filter unit 320, and information on the optimal prediction mode supplied from the prediction unit 322. The encoding unit 315 performs variable-length coding (for example, arithmetic coding) on ​​the quantization coefficient level to generate a bit string (encoded data).

[0137] Furthermore, the encoding unit 315 includes information about the filter supplied from the in-loop filter unit 320 in the filter information Finfo, and includes information about the optimal prediction mode supplied from the prediction unit 322 in the prediction mode information Pinfo. Then, the encoding unit 315 encodes the various encoding parameters described above (header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, etc.) to generate a bit string.

[0138] The encoding unit 315 multiplexes the bit strings (encoded data) of the various types of information generated as described above to generate a bit stream of the encoded data. The encoding unit 315 supplies the bit stream to the accumulation buffer 316.

[0139] <Accumulation buffer> The accumulation buffer 316 temporarily stores the bit stream of coded data obtained by the coding unit 315. The accumulation buffer 316 outputs the stored bit stream of coded data to the outside of the image coding device 300 at a predetermined timing. For example, this bit stream is transmitted to the decoding side via any recording medium, any transmission medium, any information processing device, etc. In other words, the accumulation buffer 316 also functions as a transmission unit that transmits the bit stream (coded data).

[0140] <Inverse quantization part> The inverse quantization unit 317 performs processing related to inverse quantization. For example, the inverse quantization unit 317 receives the quantization coefficient level supplied from the quantization unit 314 and the transformation information Tinfo supplied from the control unit 301 as input, and scales (inverse quantizes) the value of the quantization coefficient level based on the transformation information Tinfo. Note that this inverse quantization is the inverse process of the quantization performed in the quantization unit 314. The inverse quantization unit 317 supplies the transformation coefficient Coeff_IQ obtained by such inverse quantization to the inverse orthogonal transform unit 318.

[0141] <Inverse orthogonal transform section> The inverse orthogonal transform unit 318 performs processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 318 receives as input the transform coefficients Coeff_IQ supplied from the inverse quantization unit 317 and the transform information Tinfo supplied from the control unit 301, and performs inverse orthogonal transform on the transform coefficients Coeff_IQ based on the transform information Tinfo to derive a prediction residual D'. This inverse orthogonal transform is the inverse process of the orthogonal transform performed in the orthogonal transform unit 313. The inverse orthogonal transform unit 318 supplies the prediction residual D' obtained by such inverse orthogonal transform to the calculation unit 319.

[0142] In other words, the inverse orthogonal transform unit 318 performs the inverse process of the process performed by the orthogonal transform unit 313. That is, similar to the orthogonal transform unit 313, the inverse orthogonal transform unit 318 can perform any inverse coefficient transform, not limited to inverse orthogonal transform. This inverse coefficient transform is the inverse process of the coefficient transform performed by the orthogonal transform unit 313. That is, the prediction residual D' may be derived by performing any inverse coefficient transform on the transform coefficients Coeff_IQ. Therefore, the inverse orthogonal transform unit 318 can also be said to be an inverse coefficient transform unit.

[0143] <Arithmetic section> The calculation unit 319 receives as input the prediction residual D' supplied from the inverse orthogonal transform unit 318 and the predicted image P supplied from the prediction unit 322. The calculation unit 319 adds the prediction residual D' to the predicted image P corresponding to the prediction residual D' to derive a locally decoded image Rlocal. The calculation unit 319 supplies the derived locally decoded image Rlocal to the in-loop filter unit 320 and the frame memory 321.

[0144] <In-loop filter section> The in-loop filter unit 320 performs processing related to in-loop filtering. For example, the in-loop filter unit 320 receives as input the locally decoded image Rlocal supplied from the calculation unit 319, filter information Finfo supplied from the control unit 301, and an input image (original image) supplied from the rearrangement buffer 311. Note that any information may be input to the in-loop filter unit 320, and information other than the above information may also be input. For example, information such as a prediction mode, motion information, a code amount target value, a quantization parameter QP, a picture type, and a block (CU, CTU, etc.) may be input to the in-loop filter unit 320 as needed.

[0145] The in-loop filter unit 320 performs appropriate filtering on the locally decoded image Rlocal based on the filter information Finfo. The in-loop filter unit 320 also uses the input image (original image) and other input information for the filtering, as necessary.

[0146] For example, the in-loop filter unit 320 applies four in-loop filters, namely, 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 to apply and in what order they are applied are arbitrary and can be selected as appropriate.

[0147] Of course, the filtering process performed by the in-loop filter unit 320 is arbitrary and is not limited to the above example. For example, the in-loop filter unit 320 may apply a Wiener filter or the like.

[0148] The in-loop filter unit 320 supplies the filtered locally decoded image Rlocal to the frame memory 321. When transmitting information about the filter, such as a filter coefficient, to the decoding side, the in-loop filter unit 320 supplies the information about the filter to the encoding unit 315.

[0149] <Frame memory> The frame memory 321 performs processing related to the storage of image-related data. For example, the frame memory 321 receives as input the locally decoded image Rlocal supplied from the calculation unit 319 and the filtered locally decoded image Rlocal supplied from the in-loop filter unit 320, and holds (stores) them. The frame memory 321 also reconstructs and holds a decoded image R for each picture using the locally decoded image Rlocal (storing it in a buffer within the frame memory 321). The frame memory 321 supplies the decoded image R (or a part thereof) to the prediction unit 322 in response to a request from the prediction unit 322.

[0150] <Prediction Department> The prediction unit 322 performs processing related to the generation of a predicted image. For example, the prediction unit 322 receives as input the prediction mode information Pinfo supplied from the control unit 301, the input image (original image) supplied from the rearrangement buffer 311, and the decoded image R (or a portion thereof) read from the frame memory 321. The prediction unit 322 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, and performs motion compensation processing based on the prediction result to generate a predicted image P. The prediction unit 322 supplies the generated predicted image P to the calculation unit 312 and the calculation unit 319. Furthermore, the prediction unit 322 supplies information on the prediction mode selected by the above processing, i.e., the optimal prediction mode, to the encoding unit 315 as necessary.

[0151] <Rate control section> The rate control unit 323 performs processing related to rate control. For example, the rate control unit 323 controls the rate of the quantization operation of the quantization unit 314 based on the code amount of the coded data accumulated in the accumulation buffer 316 so as to prevent overflow or underflow.

[0152] These processing units (the control unit 301, the reordering buffer 311, and the rate control unit 323) may have any configuration. For example, each processing unit may be configured with a logic circuit that realizes the above-described processing. Furthermore, each processing unit may have, for example, a CPU, a ROM, a RAM, etc., and may execute a program using these to realize the above-described processing. Of course, each processing unit may have both of these configurations, and may realize part of the above-described processing using a logic circuit and the other part by executing a program. The configurations of the processing units may be independent of each other. For example, some processing units may realize part of the above-described processing using a logic circuit, other processing units may execute a program to realize the above-described processing, and still other processing units may realize the above-described processing using both a logic circuit and by executing a program.

[0153] In the image encoding device 300 configured as described above, the present technology described in <2. Suppression of the number of context encoding bins> may be applied to the encoding unit 315. For example, method 1-1 of the present technology may be applied to the image encoding device 300.

[0154] <Encoding part> 11 is a block diagram showing an example of the main configuration of the encoding unit 315. As shown in FIG. 11, the encoding unit 315 in this case includes a selection unit 351, a TS residual encoding unit 352, and a non-TS residual encoding unit 353.

[0155] The selection unit 351 performs processing related to control of the operation mode of the encoding unit 315. For example, the selection unit 351 acquires the quantization coefficient level (quantization coefficient qcoeff) supplied from the quantization unit 314. The selection unit 351 also acquires transform_skip_flag[xTbY][yTbY][cIdx] and cIdx supplied from the control unit 301.

[0156] transform_skip_flag[xTbY][yTbY][cIdx] is a transform skip flag indicating whether or not to skip (omit) the coefficient transform performed by the orthogonal transform unit 313 (the inverse coefficient transform performed by the inverse orthogonal transform unit 318). For example, when transform_skip_flag is true (e.g., 1), the orthogonal transform unit 313 skips the coefficient transform on the prediction residual D. Furthermore, the inverse orthogonal transform unit 318 skips the inverse coefficient transform on the transform coefficient Coeff_IQ. On the other hand, when transform_skip_flag is false (e.g., 0), the orthogonal transform unit 313 performs coefficient transform on the prediction residual D to generate the transform coefficient Coeff. Furthermore, the inverse orthogonal transform unit 318 performs inverse coefficient transform on the transform coefficient Coeff_IQ to generate the prediction residual D'. cIdx is a component identifier for identifying a component such as a luminance component or a color component.

[0157] The selection unit 351 determines whether a transform skip has been performed based on transform_skip_flag[xTbY][yTbY][cIdx] and cIdx, and selects whether to encode the quantization coefficient level in the TS residual coding mode or the non-TS residual coding mode based on the determination result. The TS residual coding mode is a mode for encoding the quantization coefficient level when coefficient transformation is skipped in the orthogonal transform unit 313. The non-TS residual coding mode is a mode for encoding the quantization coefficient level when coefficient transformation is performed in the orthogonal transform unit 313.

[0158] If it is determined that the coefficient transform has been skipped, the selection unit 351 supplies the quantization coefficient level to the TS residual encoding unit 352. If it is determined that the coefficient transform has been performed, the selection unit 351 supplies the quantization coefficient level to the non-TS residual encoding unit 353.

[0159] Note that the selection unit 351 may determine whether or not a transform skip has been performed using an MTS (multiple transform selection) identifier (mts_idx[xTbY][yTbY][cIdx]), which is an identifier related to the primary transform, instead of transform_skip_flag. Additionally, the selection unit 351 may determine whether or not a transform skip has been performed based on transform mode information, which is information related to the mode of the coefficient transform processing performed by the orthogonal transform unit 313, and cIdx. This transform mode information includes transform_skip_flag and mts_idx.

[0160] The TS residual encoder 352 performs processing related to encoding in the TS residual encoding mode. For example, the TS residual encoder 352 acquires the quantization coefficient level supplied from the selector 351. The TS residual encoder 352 encodes the acquired quantization coefficient level in the TS residual encoding mode. The TS residual encoder 352 includes a RemCcbs setting unit 361. The RemCcbs setting unit 361 sets an initial value of RemCcbs. The TS residual encoder 352 encodes the acquired quantization coefficient level using the RemCcbs.

[0161] 12 is a diagram showing an example of syntax related to the TS residual coding mode. As shown in FIG. 12, if RemCcbs is equal to or greater than a threshold (>=4), the TS residual coding unit 352 performs context coding on syntax elements (sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[j], par_level_flag, etc.) related to the level values ​​of transform coefficients (i.e., quantization coefficient level) (Pass 1 and Pass 2 in the diagram). Also, if RemCcbs is less than the threshold (<4), the TS residual coding unit 352 bypass codes syntax elements (abs_remainder, coeff_sign_flag) related to the level values ​​of transform coefficients (i.e., quantization coefficient level) (Pass 3 in the diagram).

[0162] Note that sig_coeff_flag is a flag indicating whether the level of the corresponding transform coefficient (i.e., the quantization coefficient level) is 0 or not. For example, when sig_coeff_flag is true (e.g., 1), it indicates that the corresponding quantization coefficient level is not 0. When sig_coeff_flag is false (e.g., 0), it indicates that the corresponding quantization coefficient level is 0. Furthermore, coeff_sign_flag is a flag specifying the sign of the level of the corresponding transform coefficient (i.e., the quantization coefficient level). For example, when coeff_sign_flag is false (e.g., 0), it indicates that the corresponding quantization coefficient level is positive. When coeff_sign_flag is true (e.g., 1), it indicates that the corresponding quantization coefficient level is negative. Furthermore, abs_level_gtx_flag[j] is a flag specifying whether the absolute value of the level of the corresponding transform coefficient (i.e., the quantization coefficient level) is greater than (j << 1) + 1. Furthermore, par_level_flag is a flag specifying the parity of the level of the corresponding transform coefficient (i.e., the quantization coefficient level). Furthermore, abs_remainder is a parameter indicating the absolute value of the remaining level of the corresponding transform coefficient coded with the Golomb-Rice code (i.e., the quantized coefficient level coded with the Golomb-Rice code).

[0163] The TS residual encoder 352 subtracts the number of context coding bins generated by context coding the quantized coefficient level from RemCcbs (the remaining allowable number of context coding bins). When RemCcbs becomes less than the threshold (<4), the TS residual encoder 352 performs bypass coding on the subsequent quantized coefficient levels as described above.

[0164] The Non-TS residual encoder 353 performs processing related to encoding in the Non-TS residual encoding mode. For example, the Non-TS residual encoder 353 acquires the quantization coefficient level supplied from the selector 351. The Non-TS residual encoder 353 encodes the acquired quantization coefficient level in the Non-TS residual encoding mode. The Non-TS residual encoder 353 includes a RemCcbs setting unit 362. The RemCcbs setting unit 362 sets an initial value of RemCcbs. The Non-TS residual encoder 353 encodes the acquired quantization coefficient level using the RemCcbs.

[0165] 13 is a diagram showing an example of syntax related to the Non-TS residual coding mode. As shown in FIG. 13, if RemCcbs is equal to or greater than a threshold (>=4), the Non-TS residual coding unit 353 performs context coding on syntax elements (sig_coeff_flag, abs_level_gtx_flag[j], par_level_flag, etc.) related to the level values ​​of the transform coefficients (i.e., the quantization coefficient levels) (Pass 1 in the diagram). Furthermore, if RemCcbs is less than the threshold (<4), the Non-TS residual coding unit 353 bypass codes syntax elements (abs_remainder, dec_abs_level, coeff_sign_flag) related to the level values ​​of the transform coefficients (i.e., the quantization coefficient levels) (Pass 2 and Pass 3 in the diagram).

[0166] Note that dec_abs_level is a parameter indicating the intermediate value coded using Golomb-Rice coding.

[0167] The Non-TS residual encoder 353 subtracts the number of context coding bins generated by context coding the quantization coefficient level from RemCcbs (the remaining allowable number of context coding bins). Then, when RemCcbs becomes less than the threshold (<4), the Non-TS residual encoder 353 performs bypass coding on the subsequent quantization coefficient levels as described above.

[0168] The encoding unit 315 also encodes information other than the quantization coefficient level. For example, the encoding unit 315 encodes transform mode information (e.g., a transform skip flag, an MTS identifier, etc.). The encoding unit 315 also encodes RemCcbs setting information used to set RemCcbs (e.g., a reference value for the number of context coding bins (ctxBinSampleRatioBase), an image bit depth (bitDepth), a transform block size (TbWidth, TbHeight), etc.). The encoding unit 315 also encodes various other encoding parameters (e.g., header information Hinfo, prediction mode information Pinfo, transform information Tinfo, filter information Finfo, etc.). The encoding unit 315 multiplexes the obtained encoded data with the encoded data generated in the TS residual encoding unit 352 or the non-TS residual encoding unit 353 to generate a bitstream, and supplies the bitstream to the accumulation buffer 316. Note that the encoding (decoding) of the reference value of the number of context coding bins can be omitted by previously deciding between the encoder and decoder. Also, the unit for encoding (decoding) the RemCcbs setting information (particularly the reference value of the number of context coding bins) can be set in any unit within a feasible range, and may be, for example, per transform block or a higher processing unit (CU, CTU, slice, tile, picture, or sequence).

[0169] In such an encoding unit 315, the above-described method 1-1 of the present technology may be applied to the RemCcbs setting unit 361 and the RemCcbs setting unit 362. For example, the RemCcbs setting unit 361 and the RemCcbs setting unit 362 may have the same configuration as the RemCcbs setting device 100 shown in Fig. 3 and perform the same processing to set the initial value of RemCcbs.

[0170] In this case, the RemCcbs setting units 361 and 362 acquire bitDepth, a parameter indicating the bit depth of the image to be encoded, supplied from the control unit 301. Then, the RemCcbs setting units 361 and 362 use the bitDepth to set the number of context coding bins (ctxBinSampleRatio(bitDepth)), which depends on the bit depth. Then, the RemCcbs setting units 361 and 362 use the ctxBinSampleRatio(bitDepth) to set the initial value of RemCcbs.

[0171] The RemCcbs setting units 361 and 362 may set ctxBinSampleRatio(bitDepth) based on bitDepth and any other parameters. For example, the RemCcbs setting units 361 and 362 may acquire a reference value (ctxBinSampleRatioBase) for the number of context coding bins supplied from the control unit 301, and set ctxBinSampleRatio(bitDepth) using the above-mentioned bitDepth and its ctxBinSampleRatioBase.

[0172] Alternatively, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs based on ctxBinSampleRatio(bitDepth) and any other parameters. For example, the RemCcbs setting units 361 and 362 may acquire the block size (TbWidth and TbHeight) of the block to be processed supplied from the control unit 301, and set the initial value of RemCcbs corresponding to the block to be processed using the above-mentioned ctxBinSampleRatio(bitDepth) and the TbWidth and TbHeight.

[0173] For example, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs by applying any one of methods 1-1-1 to 1-1-3. For example, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs by applying any one of equations (2) and equations (3) to (5).

[0174] The encoding unit 315 (TS residual encoding unit 352 and non-TS residual encoding unit 353) encodes the image (quantization coefficient level) (in TS residual encoding mode or non-TS residual encoding mode) using the initial value of RemCcbs (maximum number of context encoding bins) set in this manner by the RemCcbs setting units 361 and 362. That is, the encoding unit 315 context-encodes the image (quantization coefficient level) using the maximum number of context encoding bins set by the RemCcbs setting units 361 and 362 by applying the present technology. That is, the encoding unit 315 can also be said to be an image encoding unit.

[0175] By doing so, it is possible to obtain the same effect as that described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 361 and 362 can control the number of context coding bins generated. Therefore, the encoding unit 315 can suppress an increase in the amount of encoding processing. For example, the encoding unit 315 can suppress an increase in the amount of CABAC processing when encoding high-bit-depth, high-bit-rate images.

[0176] In other words, the RemCcbs setting units 361 and 362 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated. Therefore, the encoding unit 315 can suppress an increase in the total amount of CABAC processing.

[0177] That is, the image encoding device 300 can suppress an increase in the amount of encoding processing.

[0178] <Image encoding process flow> Next, an example of the flow of image encoding processing executed by the image encoding device 300 configured as above will be described with reference to the flowchart of FIG.

[0179] When the image encoding process starts, in step S301, the reordering buffer 311 is controlled by the control unit 301 to reorder the frames of the input video data from display order to encoding order.

[0180] In step S302, the control unit 301 sets a processing unit for the input image held in the sorting buffer 311 (performs block division).

[0181] In step S303, the control unit 301 determines (sets) coding parameters for the input image held by the reordering buffer 311.

[0182] In step S304, the prediction unit 322 performs a prediction process to generate a predicted image etc. in an optimal prediction mode. For example, in this prediction process, the prediction unit 322 performs intra prediction to generate a predicted image etc. in an optimal intra prediction mode, performs inter prediction to generate a predicted image etc. in an optimal inter prediction mode, and selects an optimal prediction mode from among them based on a cost function value etc.

[0183] In step S305, the calculation unit 312 calculates the difference between the input image and the predicted image of the optimal mode selected by the prediction process in step S304. That is, the calculation unit 312 generates a prediction residual D between the input image and the predicted image. The prediction residual D calculated in this way has a reduced data amount compared to the original image data. Therefore, the data amount can be compressed compared to when the image is encoded as is.

[0184] In step S306, the orthogonal transform unit 313 performs an orthogonal transform process on the prediction residual D generated in the process of step S305, and derives a transform coefficient Coeff.

[0185] In step S307, the quantization unit 314 quantizes the transform coefficient Coeff obtained by the processing in step S306, for example, by using the quantization parameter calculated by the control unit 301, and derives the quantization coefficient level.

[0186] In step S308, the inverse quantization unit 317 inverse quantizes the quantization coefficient LEVEL generated by the process in step S307 using characteristics corresponding to the quantization characteristics in step S307, and derives the transform coefficient Coeff_IQ.

[0187] In step S309, the inverse orthogonal transform unit 318 performs inverse orthogonal transform on the transform coefficient Coeff_IQ obtained by the process in step S308 using a method corresponding to the orthogonal transform process in step S306, and derives a prediction residual D'.

[0188] In step S310, the calculation unit 319 generates a locally decoded image by adding the prediction image obtained by the prediction process in step S304 to the prediction residual D' derived in the process of step S309.

[0189] In step S311, the in-loop filter unit 320 performs in-loop filtering on the locally decoded image derived in the processing of step S310.

[0190] In step S312, the frame memory 321 stores the locally decoded image derived by the process of step S310 and the locally decoded image filtered in step S311.

[0191] In step S313, the encoding unit 315 performs encoding processing, encodes the quantization coefficient level and various encoding parameters obtained in the processing of step S307, and generates a bit stream of encoded data.

[0192] In step S314, the accumulation buffer 316 accumulates the bitstream obtained in step S313 and outputs it to the outside of the image encoding device 300. This bitstream is transmitted to the decoding side via, for example, a transmission path or a recording medium. In addition, the rate control unit 323 performs rate control as necessary.

[0193] When the process of step S314 ends, the image encoding process ends.

[0194] <Encoding process flow> An example of the flow of the encoding process executed in step S313 in FIG. 14 will be described with reference to the flowchart in FIG.

[0195] When the encoding process starts, the encoding unit 315 encodes the transform mode information (transform_skip_flag, mts_idx, etc.) in step S351 of FIG.

[0196] In step S352, the encoding unit 315 encodes the RemCcbs setting information (ctxBinSampleRatioBase, bitDepth, TbWidth, TbHeight, etc.) Furthermore, the encoding unit 315 encodes information other than the quantization coefficient level, such as various encoding parameters.

[0197] In step S353, the selection unit 351 determines whether or not to encode the quantization coefficient level (syntax related to the quantization coefficient level) in the TS residual coding mode, based on the transform mode information, etc. If it is determined that the TS residual coding mode is to be applied, the process proceeds to step S354.

[0198] In step S354, the RemCcbs setting unit 361 executes a RemCcbs setting process to set (the initial value of) RemCcbs.

[0199] In step S355, the TS residual encoding unit 352 encodes the quantization coefficient level in the TS residual encoding mode using (the initial value of) RemCcbs obtained in step S354. When the process of step S355 ends, the encoding process ends and the process returns to FIG. 14.

[0200] Also, if it is determined in step S353 of FIG. 15 that the TS residual coding mode is not to be applied (that is, the Non-TS residual coding mode is to be applied), the process proceeds to step S356.

[0201] In step S356, the RemCcbs setting unit 362 executes a RemCcbs setting process to set (the initial value of) RemCcbs.

[0202] In step S357, the Non-TS residual encoding unit 353 encodes the quantization coefficient level in the Non-TS residual encoding mode using (the initial value of) RemCcbs obtained in step S356. When the process of step S357 ends, the encoding process ends and the process returns to FIG. 14.

[0203] The above-described method 1-1 of the present technology may be applied to the RemCcbs setting process executed in steps S354 and S356 of this encoding process. For example, this RemCcbs setting process may be executed according to the flow described with reference to the flowchart in FIG. 4. For example, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs by applying any of methods 1-1-1 to 1-1-3. For example, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs by applying any of equations (2) and (3) to (5).

[0204] By doing so, it is possible to obtain the same effect as that described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 361 and 362 can control the number of context coding bins generated. Therefore, the encoding unit 315 can suppress an increase in the amount of encoding processing. For example, the encoding unit 315 can suppress an increase in the amount of CABAC processing when encoding high-bit-depth, high-bit-rate images.

[0205] In other words, the RemCcbs setting units 361 and 362 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated. Therefore, the encoding unit 315 can suppress an increase in the total amount of CABAC processing.

[0206] That is, by performing each process as described above, the image encoding device 300 can suppress an increase in the amount of encoding processing.

[0207] <Image decoding device> Fig. 16 is a block diagram showing an example of the 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 400 shown in Fig. 16 is a device that encodes encoded data of a moving image. For example, the image decoding device 400 can decode the encoded data using a decoding method described in any of the above-mentioned non-patent documents. For example, the image decoding device 400 decodes the encoded data (bit stream) generated by the above-mentioned image encoding device 300.

[0208] Note that Fig. 16 shows the main processing units (blocks), data flows, etc., and does not necessarily show everything. That is, the image decoding device 400 may have processing units that are not shown as blocks in Fig. 9. Furthermore, the image decoding device 400 may have processes and data flows that are not shown as arrows, etc. in Fig. 16.

[0209] 16, the image decoding device 400 includes an accumulation buffer 411, a decoding unit 412, an inverse quantization unit 413, an inverse orthogonal transform unit 414, a calculation unit 415, an in-loop filter unit 416, a rearrangement buffer 417, a frame memory 418, and a prediction unit 419. The prediction unit 419 includes an intra prediction unit and an inter prediction unit, etc., not shown. The image decoding device 400 is a device for generating moving image data by decoding coded data (bitstream).

[0210] <Accumulation buffer> The accumulation buffer 411 acquires and holds (stores) the bitstream input to the image decoding device 400. The accumulation buffer 411 supplies the accumulated bitstream to the decoding unit 412 at a predetermined timing or when a predetermined condition is met.

[0211] <Decryption section> The decoding unit 412 performs processing related to image decoding. For example, the decoding unit 412 receives the bit stream supplied from the accumulation buffer 411 as input, and variable-length decodes the syntax values ​​of each syntax element from the bit string in accordance with the definitions in the syntax table, thereby deriving parameters.

[0212] 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, filter information Finfo, etc. That is, the decoding unit 412 parses (analyzes and obtains) this information from the bitstream. These pieces of information will be described below.

[0213] <Header information Hinfo> The header information Hinfo includes header information such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header (SH), etc. The header information Hinfo includes information that specifies, for example, an image size (horizontal width PicWidth, vertical width PicHeight), a bit depth (luminance bitDepthY, chrominance bitDepthC), a chrominance array type ChromaArrayType, a maximum CU size (MaxCUSize) / a minimum CU size (MinCUSize), a maximum depth MaxQTDepth / a minimum depth MinQTDepth of quad-tree partitioning (also referred to as quad-tree partitioning), a maximum depth MaxBTDepth / a minimum depth MinBTDepth of binary-tree partitioning, a maximum transform skip block size MaxTSSize (also referred to as maximum transform skip block size), an on / off flag (also referred to as a valid flag) of each encoding tool, etc.

[0214] For example, the on / off flags for the encoding tools included in the header information Hinfo include on / off flags related to the following conversion and quantization processes. Note that the on / off flags for the encoding tools can also be interpreted as flags indicating whether or not syntax related to the encoding tool is present in the encoded data. Furthermore, if the value of the on / off flag is 1 (true), it indicates that the encoding tool is usable, and if the value of the on / off flag is 0 (false), it indicates that the encoding tool is unusable. Note that the interpretation of the flag values ​​may be reversed.

[0215] Inter-component prediction enabled flag (ccp_enabled_flag): Flag information indicating whether inter-component prediction (CCP (Cross-Component Prediction), also referred to as CC prediction) is available. For example, if this flag information is "1" (true), it indicates that it is available, and if it is "0" (false), it indicates that it is not available.

[0216] This CCP is also called cross-component linear prediction (CCLM or CCLMP).

[0217] <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 the like.

[0218] 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.

[0219] 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 luminance intra-prediction mode (IntraPredModeC) derived from these syntaxes.

[0220] 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.

[0221] The multi-class linear prediction mode flag (mclm_flag) is information related to the linear prediction mode (linear prediction mode information). More specifically, the multi-class linear prediction mode flag (mclm_flag) is flag information indicating whether 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).

[0222] The chroma sample location type identifier (chroma_sample_loc_type_idx) is an identifier that identifies the type of pixel location of a chroma component (also referred to as a chroma sample location type). For example, if the chroma array type (ChromaArrayType), which is information about the color format, indicates the 420 format, the chroma sample location type identifier is assigned according to the following formula:

[0223] 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

[0224] 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()).

[0225] The chrominance MPM identifier (chroma_mpm_idx) is an identifier indicating which prediction mode candidate in the chrominance intra prediction mode candidate list (intraPredModeCandListC) is to be specified as the chrominance intra prediction mode.

[0226] 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).

[0227] Of course, the prediction mode information Pinfo may include any information, and may include information other than the above information.

[0228] <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.

[0229] The width (TBWSize) and height (TBHSize) of the conversion block to be processed Transform skip flag (transform_skip_flag (also called ts_flag)) Scan Identifier (scanIdx) Quantization parameter (qp) Quantization matrix (scaling_matrix (e.g., JCTVC-W1005, 7.3.4 Scaling list data syntax))

[0230] Note that instead of TBWSize and TBHSize, log2TBWSize and log2TBHSize may be included in the transform information Tinfo. Log2TBWSize is the logarithmic value of TBWSize with base 2. Log2TBHSize is the logarithmic value of TBHSize with base 2. In the image decoding device 400, the transform skip flag is a flag indicating whether or not to skip the inverse coefficient transform (inverse primary transform and inverse secondary transform).

[0231] <Filter information Finfo> The filter information Finfo includes, for example, control information related to each of the following filter processes:

[0232] 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

[0233] More specifically, for example, the information includes information specifying the picture to which each filter is applied, an area within the 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 may be included in the filter information Finfo, and information other than these may be included.

[0234] Returning to the description of the decoding unit 412, the decoding unit 412 derives the quantization coefficient level by referring to the syntax related to the quantization coefficient level obtained by decoding the bitstream. The decoding unit 412 supplies the quantization coefficient level to the inverse quantization unit 413.

[0235] Furthermore, the decoding unit 412 supplies encoding parameters such as the parsed header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, and filter information Finfo to each block. For example, the decoding unit 412 supplies the header information Hinfo to the inverse quantization unit 413, the inverse orthogonal transform unit 414, the prediction unit 419, and the in-loop filter unit 416. Furthermore, the decoding unit 412 supplies the prediction mode information Pinfo to the inverse quantization unit 413 and the prediction unit 419. Furthermore, the decoding unit 412 supplies the transformation information Tinfo to the inverse quantization unit 413 and the inverse orthogonal transform unit 414. Furthermore, the decoding unit 412 supplies the filter information Finfo to the in-loop filter unit 416.

[0236] Of course, the above example is merely an example and is not limiting. For example, each encoding parameter may be supplied to any processing unit. Furthermore, other information may be supplied to any processing unit.

[0237] <Inverse quantization part> The inverse quantization unit 413 has at least the components necessary to perform processing related to inverse quantization. For example, the inverse quantization unit 413 receives the transformation information Tinfo and the quantization coefficient level supplied from the decoding unit 412 as input, scales (inverse quantizes) the value of the quantization coefficient level based on the transformation information Tinfo, and derives the transformation coefficient Coeff_IQ after inverse quantization. The inverse quantization unit 413 supplies the derived transformation coefficient Coeff_IQ to the inverse orthogonal transform unit 414.

[0238] Note that this inverse quantization is performed as the inverse process of the quantization performed by the quantization unit 314 of the image encoding device 300. Furthermore, this inverse quantization is the same process as the inverse quantization performed by the inverse quantization unit 317 of the image encoding device 300. In other words, the inverse quantization unit 317 of the image encoding device 300 performs the same process (inverse quantization) as the inverse quantization unit 413.

[0239] <Inverse orthogonal transform section> The inverse orthogonal transform unit 414 performs processing related to inverse orthogonal transform. For example, the inverse orthogonal transform unit 414 receives the transform coefficients Coeff_IQ supplied from the inverse quantization unit 413 and the transform information Tinfo supplied from the decoding unit 412 as input, and performs inverse orthogonal transform processing on the transform coefficients Coeff_IQ based on the transform information Tinfo to derive a prediction residual D'. For example, the inverse orthogonal transform unit 414 performs an inverse secondary transform on the transform coefficients Coeff_IQ based on the ST identifier to generate primary transform coefficients, and then performs a primary transform on the primary transform coefficients to generate a prediction residual D'. The inverse orthogonal transform unit 414 supplies the derived prediction residual D' to the calculation unit 415.

[0240] This inverse orthogonal transform is performed as the inverse process of the orthogonal transform performed by the orthogonal transform unit 313 of the image encoding device 300. This inverse orthogonal transform is the same process as the inverse orthogonal transform performed by the inverse orthogonal transform unit 318 of the image encoding device 300. That is, the inverse orthogonal transform unit 318 of the image encoding device 300 performs the same process (inverse orthogonal transform) as the inverse orthogonal transform unit 414.

[0241] Therefore, like the inverse orthogonal transform unit 318 of the image encoding device 300, the inverse orthogonal transform unit 414 can perform any inverse coefficient transform other than inverse orthogonal transform. This inverse coefficient transform is the inverse process of the coefficient transform performed by the orthogonal transform unit 313 of the image encoding device 300. In other words, the prediction residual D' may be derived by performing any inverse coefficient transform on the transform coefficients Coeff_IQ. Therefore, the inverse orthogonal transform unit 414 can also be said to be an inverse coefficient transform unit.

[0242] <Arithmetic section> The calculation unit 415 performs processing related to the addition of information related to images. For example, the calculation unit 415 receives as input a prediction residual D' supplied from the inverse orthogonal transform unit 414 and a predicted image P supplied from the prediction unit 419. As shown in the following equation, the calculation unit 415 adds the prediction residual D' and a predicted image P (prediction signal) corresponding to the prediction residual D' to derive a locally decoded image Rlocal. The calculation unit 415 supplies the derived locally decoded image Rlocal to the in-loop filter unit 416 and the frame memory 418.

[0243] Rlocal = D' + P

[0244] <In-loop filter section> The in-loop filter unit 416 performs processing related to in-loop filtering. For example, the in-loop filter unit 416 receives as input the locally decoded image Rlocal supplied from the calculation unit 415 and filter information Finfo supplied from the decoding unit 412. Note that any information may be input to the in-loop filter unit 416, and information other than the above information may also be input.

[0245] The in-loop filter unit 416 performs appropriate filtering on the locally decoded image Rlocal based on the filter information Finfo.

[0246] For example, the in-loop filter unit 416 applies four in-loop filters, namely, 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 to apply and in what order they are applied are arbitrary and can be selected as appropriate.

[0247] The in-loop filter unit 416 performs a filter process corresponding to the filter process performed on the encoding side (for example, the in-loop filter unit 320 of the image encoding device 300). Of course, the filter process performed by the in-loop filter unit 416 is arbitrary and is not limited to the above example. For example, the in-loop filter unit 416 may apply a Wiener filter or the like.

[0248] The in-loop filter unit 416 supplies the filtered locally decoded image Rlocal to a rearrangement buffer 417 and a frame memory 418 .

[0249] <Sorting buffer> The reordering buffer 417 receives the locally decoded image Rlocal supplied from the in-loop filter unit 416 as input and holds (stores) it. The reordering buffer 417 reconstructs a decoded image R for each picture using the locally decoded image Rlocal and holds it (stores it in the buffer). The reordering buffer 417 reorders the obtained decoded images R from the decoding order to the playback order. The reordering buffer 417 outputs the reordered decoded images R to the outside of the image decoding device 400 as video data.

[0250] <Frame memory> The frame memory 418 performs processing related to the storage of image data. For example, the frame memory 418 receives the locally decoded image Rlocal supplied from the calculation unit 415 as input, reconstructs a decoded image R for each picture, and stores the reconstructed image in a buffer within the frame memory 418.

[0251] The frame memory 418 also receives as input the in-loop filtered local decoded image Rlocal supplied from the in-loop filter unit 416, reconstructs a decoded image R for each picture, and stores the reconstructed image in a buffer within the frame memory 418. The frame memory 418 appropriately supplies the stored decoded image R (or a part thereof) to the prediction unit 419 as a reference image.

[0252] The frame memory 418 may store header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, and the like related to the generation of decoded images.

[0253] <Prediction Department> The prediction unit 419 performs processing related to generation of a predicted image. For example, the prediction unit 419 receives prediction mode information Pinfo supplied from the decoding unit 412 as input, performs prediction using 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 419 uses, as a reference image, a decoded image R (or a part thereof) before or after filtering stored in the frame memory 418 and specified by the prediction mode information Pinfo. The prediction unit 419 supplies the derived predicted image P to the calculation unit 415.

[0254] These processing units (accumulation buffer 411 to prediction unit 419) may have any configuration. For example, each processing unit may be configured with a logic circuit that realizes the above-described processing. Also, each processing unit may have, for example, a CPU, ROM, RAM, etc., and may execute a program using these to realize the above-described processing. Of course, each processing unit may have both of these configurations, and may realize part of the above-described processing using a logic circuit and the other part by executing a program. The configurations of each processing unit may be independent of each other. For example, some processing units may realize part of the above-described processing using a logic circuit, other processing units may execute a program to realize the above-described processing, and still other processing units may realize the above-described processing using both a logic circuit and by executing a program.

[0255] In the image decoding device 400 configured as above, the present technology described in <2. Suppression of the number of context coding bins> may be applied to the decoding unit 412. For example, method 1-1 of the present technology may be applied to the image decoding device 400.

[0256] <Decryption section> 17 is a block diagram showing an example of the main configuration of decoding section 412. As shown in FIG. 17, decoding section 412 in this case includes selection section 451, TS residual decoding section 452, and non-TS residual decoding section 453.

[0257] The decoding unit 412 acquires the bitstream supplied from the accumulation buffer 411. The decoding unit 412 performs variable-length decoding on the syntax values ​​of each syntax element from the bit string of the bitstream in accordance with the definition of the syntax table, and derives parameters other than the quantization coefficient level. For example, the decoding unit 412 decodes the bitstream and generates transform mode information (e.g., a transform skip flag, an MTS identifier, etc.) and RemCcbs setting information (e.g., a reference value of the number of context coding bins (ctxBinSampleRatioBase), an image bit depth (bitDepth), a transform block size (TbWidth, TbHeight), etc.). Furthermore, the decoding unit 412 decodes the bitstream and generates various other coding parameters (header information Hinfo, prediction mode information Pinfo, transform information Tinfo, filter information Finfo, etc.).

[0258] The selection unit 451 performs processing related to control of the operation mode of the decoding unit 412. For example, the selection unit 451 acquires a bitstream acquired by the decoding unit 412. The selection unit 451 also acquires transform mode information (for example, a transform skip flag (transform_skip_flag[xTbY][yTbY][cIdx])) and a component identifier (cIdx) obtained by the decoding unit 412 parsing the bitstream.

[0259] The selection unit 451 determines whether a transform skip was performed during encoding based on transform_skip_flag[xTbY][yTbY][cIdx] and cIdx, and selects whether to decode the coded data of the quantized coefficient level in the TS residual coding mode or the non-TS residual coding mode based on the determination result. The TS residual coding mode is a mode in which coded data of the quantized coefficient level generated by skipping the coefficient transform is decoded. The non-TS residual coding mode is a mode in which coded data of the quantized coefficient level generated by performing the coefficient transform is decoded.

[0260] If transform_skip_flag is true (for example, 1), the selection unit 451 determines that coefficient transform was skipped during encoding, and supplies the coded data of the quantized coefficient level to the TS residual decoding unit 452. If transform_skip_flag is false (for example, 0), the selection unit 451 determines that coefficient transform was performed during encoding, and supplies the coded data of the quantized coefficient level to the non-TS residual decoding unit 453.

[0261] Note that the selection unit 451 may use an MTS identifier (mts_idx[xTbY][yTbY][cIdx]) instead of transform_skip_flag to determine whether or not a transform skip has been performed during encoding. Additionally, the selection unit 451 may determine whether or not a transform skip has been performed during encoding based on transform mode information and cIdx. This transform mode information includes transform_skip_flag and mts_idx.

[0262] The TS residual decoding unit 452 performs processing related to decoding in TS residual coding mode. For example, the TS residual decoding unit 452 obtains coded data of the quantization coefficient level supplied from the selection unit 451. The TS residual decoding unit 452 decodes the coded data of the obtained quantization coefficient level in the TS residual coding mode to generate the quantization coefficient level. The TS residual decoding unit 452 includes a RemCcbs setting unit 461. The RemCcbs setting unit 461 sets an initial value of RemCcbs. The TS residual decoding unit 452 decodes the coded data of the obtained quantization coefficient level using the RemCcbs to generate the quantization coefficient level.

[0263] 12, if RemCcbs is equal to or greater than a threshold (>=4), the TS residual decoding unit 452 performs context decoding on the coded data of the syntax (sig_coeff_flag, coeff_sign_flag, abs_level_gtx_flag[j], par_level_flag, etc.) related to the level values ​​of the transform coefficients (i.e., the quantization coefficient level) (Pass 1 and Pass 2 in the figure). On the other hand, if RemCcbs is less than the threshold (<4), the TS residual decoding unit 452 bypass-decodes the coded data of the syntax (abs_remainder, coeff_sign_flag) related to the level values ​​of the transform coefficients (i.e., the quantization coefficient level) (Pass 3 in the figure).

[0264] The TS residual decoding unit 452 subtracts the number of context coding bins generated by context decoding the coded data of the quantization coefficient level from RemCcbs (the remaining allowable number of context coding bins). Then, when RemCcbs becomes less than the threshold (<4), the TS residual decoding unit 452 performs bypass decoding on the coded data of the subsequent quantization coefficient levels as described above.

[0265] The Non-TS residual decoding unit 453 performs processing related to decoding in Non-TS residual coding mode. For example, the Non-TS residual decoding unit 453 obtains coded data of the quantization coefficient level supplied from the selection unit 451. The Non-TS residual decoding unit 453 decodes coded data of the obtained quantization coefficient level in Non-TS residual coding mode to generate a quantization coefficient level. The Non-TS residual decoding unit 453 includes a RemCcbs setting unit 462. The RemCcbs setting unit 462 sets an initial value of RemCcbs. The Non-TS residual decoding unit 453 decodes coded data of the obtained quantization coefficient level using the RemCcbs to generate a quantization coefficient level.

[0266] 13, if RemCcbs is equal to or greater than the threshold (>=4), Non-TS residual decoding unit 453 performs context decoding on the coded data of syntax (sig_coeff_flag, abs_level_gtx_flag[j], par_level_flag, etc.) related to the level values ​​of the transform coefficients (i.e., the quantization coefficient level) (Pass 1 in the figure). Also, if RemCcbs is less than the threshold (<4), Non-TS residual decoding unit 453 bypass-decodes the coded data of syntax (abs_remainder, dec_abs_level, coeff_sign_flag) related to the level values ​​of the transform coefficients (i.e., the quantization coefficient level) (Pass 2 and Pass 3 in the figure).

[0267] The Non-TS residual decoding unit 453 subtracts the number of context coding bins generated by context decoding the coded data of the quantization coefficient level from RemCcbs (the remaining number of allowable context coding bins). Then, when RemCcbs becomes less than the threshold (<4), the Non-TS residual decoding unit 453 performs bypass decoding on the coded data of the subsequent quantization coefficient levels as described above.

[0268] The decoding unit 412 supplies the quantization coefficient level generated in the TS residual decoding unit 452 or the non-TS residual decoding unit 453 to the inverse quantization unit 413. In addition, the decoding unit 412 supplies information other than the quantization coefficient level obtained by decoding the bitstream (for example, header information Hinfo, prediction mode information Pinfo, transformation information Tinfo, filter information Finfo, etc.) to any block.

[0269] Note that when decoding is performed by the TS residual decoding unit 452 in the TS residual coding mode, that is, when transform_skip_flag is true (for example, 1), the inverse coefficient transform on the transform coefficients Coeff_IQ by the inverse orthogonal transform unit 414 is skipped. On the other hand, when decoding is performed by the non-TS residual decoding unit 453 in the non-TS residual coding mode, that is, when transform_skip_flag is false (for example, 0), the inverse orthogonal transform unit 414 performs inverse coefficient transform on the transform coefficients Coeff_IQ, and a prediction residual D' is generated.

[0270] In such a decoding unit 412, the above-described method 1-1 of the present technology may be applied to the RemCcbs setting unit 461 and the RemCcbs setting unit 462. For example, the RemCcbs setting unit 461 and the RemCcbs setting unit 462 may have the same configuration as the RemCcbs setting device 100 shown in Fig. 3 and perform the same processing to set the initial value of RemCcbs.

[0271] In this case, the RemCcbs setting units 461 and 462 acquire the bit depth (bitDepth) of the image to be coded, which is obtained by the decoding unit 412 decoding the bitstream. Then, the RemCcbs setting units 461 and 462 use the bitDepth to set the number of context coding bins (ctxBinSampleRatio(bitDepth)), which depends on the bit depth. Then, the RemCcbs setting units 461 and 462 use the ctxBinSampleRatio(bitDepth) to set the initial value of RemCcbs.

[0272] The RemCcbs setting units 461 and 462 may set ctxBinSampleRatio(bitDepth) based on bitDepth and any other parameters. For example, the RemCcbs setting units 461 and 462 may obtain a reference value (ctxBinSampleRatioBase) for the number of context coding bins and set ctxBinSampleRatio(bitDepth) using the above-mentioned bitDepth and its ctxBinSampleRatioBase. This ctxBinSampleRatioBase may be determined in advance (the same value as that on the coding side (image coding device 300)) or may be included in a bitstream transmitted from the coding side (image coding device 300).

[0273] Furthermore, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs based on the ctxBinSampleRatio(bitDepth) set in this manner and any other parameters. For example, the RemCcbs setting units 461 and 462 may acquire the block size (TbWidth and TbHeight) of the block to be processed obtained by the decoding unit 412 decoding the bitstream, and set the initial value of RemCcbs corresponding to the block to be processed using the above-mentioned ctxBinSampleRatio(bitDepth) and the TbWidth and TbHeight.

[0274] For example, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs by applying any one of methods 1-1-1 to 1-1-3. For example, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs by applying any one of equations (2) and (3) to (5).

[0275] The decoding unit 412 (TS residual decoding unit 452 and non-TS residual decoding unit 453) decodes (in TS residual coding mode or non-TS residual coding mode) the coded data of the image (quantization coefficient level) using the initial value of RemCcbs (maximum number of context coding bins) set in this way by the RemCcbs setting units 461 and 462. That is, the decoding unit 412 context-decodes a bitstream in which the image is context-coded, using the maximum number of context coding bins set by the RemCcbs setting units 461 and 462 by applying the present technology, to generate an image (quantization coefficient level). That is, the decoding unit 412 can also be said to be an image decoding unit.

[0276] By doing so, it is possible to obtain the same effect as that described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 461 and 462 can control the number of context coding bins generated. Therefore, the decoding unit 412 can suppress an increase in the amount of decoding processing. For example, the decoding unit 412 can suppress an increase in the amount of CABAC processing when decoding high-bit-depth, high-bit-rate images.

[0277] In other words, the RemCcbs setting units 461 and 462 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated, thereby suppressing an increase in the total number of context coding bins and bypass coding bins generated. Therefore, the decoding unit 412 can suppress an increase in the total amount of CABAC processing.

[0278] That is, the image decoding device 400 can suppress an increase in the amount of decoding processing.

[0279] <Flow of image decoding process> Next, an example of the flow of image decoding processing executed by the image decoding device 400 configured as above will be described with reference to the flowchart of FIG.

[0280] When the image decoding process starts, in step S401, the accumulation buffer 411 acquires and holds (accumulates) coded data (bitstream) supplied from outside the image decoding device 400.

[0281] In step S402, the decoding unit 412 executes a decoding process to decode the coded data (bitstream) to obtain the quantization coefficients LEVEL. Furthermore, the decoding unit 412 parses (analyzes and obtains) various coding parameters from the coded data (bitstream) through this decoding.

[0282] In step S403, the inverse quantization unit 413 performs inverse quantization, which is the inverse process of the quantization performed on the encoding side, on the quantization coefficient LEVEL obtained by the process in step S402 to obtain the transform coefficient Coeff_IQ.

[0283] In step S404, the inverse orthogonal transform unit 414 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 S403, to obtain a prediction residual D'.

[0284] In step S405, the prediction unit 419 performs prediction processing using a prediction method specified by the encoding side based on the information parsed in step S402, and generates a predicted image P by, for example, referring to a reference image stored in the frame memory 418.

[0285] In step S406, the calculation unit 415 adds the prediction residual D' obtained in step S404 and the predicted image P obtained in step S405 to derive a locally decoded image Rlocal.

[0286] In step S407, the in-loop filter unit 416 performs in-loop filtering on the locally decoded image Rlocal obtained by the processing in step S406.

[0287] In step S408, the reordering buffer 417 derives decoded images R using the filtered locally decoded images R obtained in step S407, and reorders the order of the decoded images R from the decoding order to the playback order. The reordered decoded images R are output as a moving image to the outside of the image decoding device 400.

[0288] In step S409, the frame memory 418 stores at least one of the locally decoded image Rlocal obtained by the process in step S406 and the locally decoded image Rlocal after the filtering process obtained by the process in step S407.

[0289] When the process of step S409 ends, the image decoding process ends.

[0290] <Decryption process flow> An example of the flow of the decoding process executed in step S402 in FIG. 18 will be described with reference to the flowchart in FIG.

[0291] When the decoding process starts, the decoding unit 412 decodes the bitstream and generates transform mode information (transform_skip_flag, mts_idx, etc.) in step S451 of FIG.

[0292] In step S452, the decoding unit 412 decodes the bitstream and generates RemCcbs setting information (ctxBinSampleRatioBase, bitDepth, TbWidth, TbHeight, etc.). Furthermore, the decoding unit 412 decodes the bitstream and generates information other than the quantization coefficient level, such as various coding parameters.

[0293] In step S453, the selection unit 451 determines whether to decode the coded data of the quantization coefficient level (syntax related to the quantization coefficient level) in the TS residual coding mode, based on the transform mode information, etc. For example, if the transform skip flag indicates that coefficient transform should be skipped during coding (transform_skip_flag[cIdx]="IS_SKIP"), the selection unit 451 determines to decode in the TS residual coding mode. On the other hand, if the transform skip flag does not indicate that coefficient transform should be skipped during coding, the selection unit 451 determines to decode in the non-TS residual coding mode.

[0294] Note that when the MTS identifier indicates skipping of primary transform during encoding (mts_idx[cIdx]="IS_SKIP"), the selection unit 451 may determine to perform decoding in the TS residual coding mode. In this case, when the MTS identifier does not indicate skipping of primary transform during encoding, the selection unit 451 determines to perform decoding in the non-TS residual coding mode.

[0295] If it is determined that the TS residual coding mode is to be applied, the process proceeds to step S454.

[0296] In step S454, the RemCcbs setting unit 461 executes a RemCcbs setting process to set (the initial value of) RemCcbs.

[0297] In step S455, the TS residual decoding unit 452 decodes the coded data of the quantization coefficient level in the TS residual coding mode using the (initial value of) RemCcbs obtained in step S454. When the process of step S455 ends, the decoding process ends and the process returns to FIG. 18.

[0298] Also, if it is determined in step S453 of FIG. 19 that the TS residual coding mode is not to be applied (that is, the Non-TS residual coding mode is to be applied), the process proceeds to step S456.

[0299] In step S456, the RemCcbs setting unit 462 executes a RemCcbs setting process to set (the initial value of) RemCcbs.

[0300] In step S457, the Non-TS residual decoding unit 453 decodes the coded data of the quantization coefficient level in the Non-TS residual coding mode using the (initial value of) RemCcbs obtained in step S456. When the process of step S457 ends, the decoding process ends and the process returns to FIG. 18.

[0301] The above-described method 1-1 of the present technology may be applied to the RemCcbs setting process executed in steps S454 and S456 of this decoding process. For example, this RemCcbs setting process may be executed according to the flow described with reference to the flowchart in FIG. 4. For example, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs by applying any of methods 1-1-1 to 1-1-3. For example, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs by applying any of equations (2) and (3) to (5).

[0302] By doing so, it is possible to obtain the same effect as that described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 461 and 462 can control the number of context coding bins generated. Therefore, the decoding unit 412 can suppress an increase in the amount of decoding processing. For example, the decoding unit 412 can suppress an increase in the amount of CABAC processing when decoding high-bit-depth, high-bit-rate images.

[0303] In other words, the RemCcbs setting units 461 and 462 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated, thereby suppressing an increase in the total number of context coding bins and bypass coding bins generated. Therefore, the decoding unit 412 can suppress an increase in the total amount of CABAC processing.

[0304] That is, by performing each process as described above, the image decoding device 400 can suppress an increase in the amount of decoding processing.

[0305] <Control unit / Encoding unit> Furthermore, method 1-1-4 of the present technology may be applied to the image encoding device 300. Fig. 20 is a block diagram showing an example of the main configuration of the control unit 301 and the encoding unit 315 in that case. As shown in Fig. 20, in this case, the control unit 301 has an execution control flag generation unit 511. Furthermore, the encoding unit 315 has a selection unit 351, a TS residual encoding unit 352, a Non-TS residual encoding unit 353, and an execution control flag encoding unit 512.

[0306] The execution control flag generation unit 511 generates the execution control flag described in <Execution Control Flag> in <2. Suppression of the Number of Context Coding Bins>, etc. The execution control flag generation unit 511 supplies the generated execution control flag to the encoding unit 315. For example, the execution control flag generation unit 511 may supply the generated execution control flag to the execution control flag encoding unit 512. Furthermore, the execution control flag generation unit 511 may supply the generated execution control flag to the RemCcbs setting unit 361 and the RemCcbs setting unit 362.

[0307] This execution control flag is a flag indicating whether or not to apply the present technology. For example, when this execution control flag is true, method 1 (method 1-1) of the present technology is applied, and the maximum number of context coding bins is set according to the number of context coding bins that depends on the bit depth. On the other hand, when this execution control flag is false, method 1 (method 1-1) of the present technology is not applied, and the maximum number of context coding bins is set according to the reference value of the number of context coding bins.

[0308] The execution control flag generation unit 511 may generate this execution control flag based on any information. For example, the execution control flag generation unit 511 may generate the execution control flag based on an image to be coded or parameters related to the image. Alternatively, the execution control flag generation unit 511 may generate the execution control flag based on an instruction from outside the image coding device 300, such as a user or an application.

[0309] The execution control flag encoding unit 512 performs processing related to encoding of the execution control flag. For example, the execution control flag encoding unit 512 acquires the execution control flag supplied from the execution control flag generation unit 511. The execution control flag encoding unit 512 then encodes the acquired execution control flag to generate encoded data. The encoded data of the execution control flag is stored in a bit stream of encoded data such as the quantization coefficient level by the encoding unit 315.

[0310] The selection unit 351, the TS residual coding unit 352, and the non-TS residual coding unit 353 perform the same processing as in Fig. 11. That is, the selection unit 351 selects whether to code the quantization coefficient level in the TS residual coding mode or the non-TS residual coding mode based on transform_skip_flag[xTbY][yTbY][cIdx] and cIdx. The TS residual coding unit 352 codes the quantization coefficient level in the TS residual coding mode. The non-TS residual coding unit 353 codes the quantization coefficient level in the non-TS residual coding mode.

[0311] The TS residual coding unit 352 has a RemCcbs setting unit 361. The RemCcbs setting unit 361 performs basically the same processing as in the case of FIG. 11. That is, the RemCcbs setting unit 361 sets an initial value of RemCcbs, and the TS residual coding unit 352 encodes the quantization coefficient level obtained using that RemCcbs. The non-TS residual coding unit 353 has a RemCcbs setting unit 362. The RemCcbs setting unit 362 performs basically the same processing as in the case of FIG. 11. That is, the RemCcbs setting unit 362 sets an initial value of RemCcbs, and the non-TS residual coding unit 353 encodes the quantization coefficient level obtained using that RemCcbs.

[0312] The above-described method 1-1-4 of the present technology may be applied to such RemCcbs setting units 361 and 362. That is, when the execution control flag is true, the RemCcbs setting units 361 and 362 may set a bit-depth-dependent number of context coding bins based on the bit-depth of the image, and set a maximum number of context coding bins based on the bit-depth-dependent number of context coding bins, and when the execution control flag is false, set the maximum number of context coding bins based on a reference value of the number of context coding bins. For example, the RemCcbs setting units 361 and 362 may have a configuration similar to that of the RemCcbs setting device 100 shown in FIG. 6 and may set the initial value of RemCcbs by performing similar processing.

[0313] In this case, the RemCcbs setting units 361 and 362 acquire the execution control flag supplied from the execution control flag generation unit 511. Then, the RemCcbs setting units 361 and 362 determine the setting method for ctxBinSampleRatio based on the execution control flag.

[0314] For example, when the execution control flag is true (e.g., 1), the RemCcbs setting units 361 and 362 set the number of context coding bins (ctxBinSampleRatio(bitDepth)) that depends on the bit depth. That is, the RemCcbs setting units 361 and 362 acquire the bit depth supplied from the control unit 301, and use that bit depth to set the number of context coding bins (ctxBinSampleRatio(bitDepth)) that depends on the bit depth. Then, the RemCcbs setting units 361 and 362 use that ctxBinSampleRatio(bitDepth) to set the initial value of RemCcbs.

[0315] In this case, the RemCcbs setting units 361 and 362 may set ctxBinSampleRatio(bitDepth) based on bitDepth and any other parameters. For example, the RemCcbs setting units 361 and 362 may acquire a reference value (ctxBinSampleRatioBase) for the number of context coding bins supplied from the control unit 301, and set ctxBinSampleRatio(bitDepth) using the above-mentioned bitDepth and its ctxBinSampleRatioBase.

[0316] In this case, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs based on ctxBinSampleRatio(bitDepth) and any other parameters. For example, the RemCcbs setting units 361 and 362 may acquire the block size (TbWidth and TbHeight) of the block to be processed supplied from the control unit 301, and set the initial value of RemCcbs corresponding to the block to be processed using the above-mentioned ctxBinSampleRatio(bitDepth) and the TbWidth and TbHeight.

[0317] In this case, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs by applying any one of methods 1-1-1 to 1-1-3. For example, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs by applying any one of equations (2) and (3) to (5).

[0318] On the other hand, if the execution control flag is false (for example, 0), the RemCcbs setting units 361 and 362 set the number of context coding bins (ctxBinSampleRatio) that does not depend on bitDepth. That is, the RemCcbs setting units 361 and 362 obtain a reference value (ctxBinSampleRatioBase) for the number of context coding bins supplied from the control unit 301, and set the obtained ctxBinSampleRatioBase as ctxBinSampleRatio. Then, the RemCcbs setting units 361 and 362 use the obtained ctxBinSampleRatio (i.e., ctxBinSampleRatioBase) to set the initial value of RemCcbs.

[0319] In this case, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs based on ctxBinSampleRatio and any other parameters. For example, the RemCcbs setting units 361 and 362 may acquire the block size (TbWidth and TbHeight) of the block to be processed supplied from the control unit 301, and set the initial value of RemCcbs corresponding to the block to be processed using the above-mentioned ctxBinSampleRatio (i.e., ctxBinSampleRatioBase) and its TbWidth and TbHeight.

[0320] The encoding unit 315 (TS residual encoding unit 352 and non-TS residual encoding unit 353) encodes the image (quantization coefficient level) (in TS residual encoding mode or non-TS residual encoding mode) using the initial value of RemCcbs (maximum number of context encoding bins) set in this manner by the RemCcbs setting units 361 and 362. That is, the encoding unit 315 context-encodes the image (quantization coefficient level) using the maximum number of context encoding bins set by the RemCcbs setting units 361 and 362 by applying the present technology. That is, in this case as well, the encoding unit 315 can be said to be an image encoding unit.

[0321] By doing so, it is possible to obtain the same effect as described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 361 and 362 can also control the number of generated context coding bins in this case. Therefore, the encoding unit 315 can suppress an increase in the amount of encoding processing. For example, the encoding unit 315 can suppress an increase in the amount of CABAC processing when encoding high-bit-depth, high-bit-rate images.

[0322] In other words, the RemCcbs setting units 361 and 362 can also suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated in this case. Therefore, the encoding unit 315 can suppress an increase in the total amount of CABAC processing.

[0323] That is, the image encoding device 300 can suppress an increase in the amount of encoding processing.

[0324] <Image encoding process flow> Next, an example of the flow of image encoding processing executed by an image encoding device 300 having an encoding unit 315 configured as shown in FIG. 20 will be described with reference to the flowchart of FIG.

[0325] When the image encoding process is started, the processes of steps S501 and S502 are executed in the same manner as the processes of steps S301 and S302 in FIG.

[0326] In step S503, the execution control flag generation unit 511 generates an execution control flag.

[0327] The processes of steps S504 to S515 are executed in the same manner as the processes of steps S303 to S314 in FIG.

[0328] When the process of step S515 ends, the image encoding process ends.

[0329] <Encoding process flow> An example of the flow of the encoding process executed in step S514 in FIG. 21 will be described with reference to the flowchart in FIG.

[0330] When the encoding process starts, the processes of steps S551 and S552 in FIG. 22 are executed in the same manner as the processes of steps S351 and S352 in FIG.

[0331] In step S553, the execution control flag encoding unit 512 encodes the execution control flag generated in step S503 of FIG.

[0332] Then, the processes of steps S554 to S558 are executed in the same manner as the processes of steps S353 to S357 in Fig. 15. When the process of step S556 or step S558 ends, the encoding process ends and the process returns to Fig. 21.

[0333] The above-described method 1-1-4 of the present technology may be applied to the RemCcbs setting process executed in steps S555 and S557 of this encoding process. For example, this RemCcbs setting process may be executed according to the flow described with reference to the flowchart in FIG. 7. For example, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs by applying any of methods 1-1-1 to 1-1-3. For example, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs by applying any of equations (2) and (3) to (5).

[0334] By doing so, it is possible to obtain the same effect as described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 361 and 362 can also control the number of generated context coding bins in this case. Therefore, the encoding unit 315 can suppress an increase in the amount of encoding processing. For example, the encoding unit 315 can suppress an increase in the amount of CABAC processing when encoding high-bit-depth, high-bit-rate images.

[0335] In other words, the RemCcbs setting units 361 and 362 can also suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated in this case. Therefore, the encoding unit 315 can suppress an increase in the total amount of CABAC processing.

[0336] That is, by performing each process as described above, the image encoding device 300 can suppress an increase in the amount of encoding processing.

[0337] <Decryption section> Furthermore, method 1-1-4 of the present technology may be applied to the image decoding device 400. Fig. 23 is a block diagram showing an example of the main configuration of the decoding unit 412 in that case. As shown in Fig. 23, the decoding unit 412 includes a selection unit 451, a TS residual decoding unit 452, a Non-TS residual decoding unit 453, and an execution control flag decoding unit 611.

[0338] The execution control flag decoder 611 decodes the bitstream and generates the execution control flag described in <Execution Control Flag> in <2. Suppression of the Number of Context Coding Bins>, etc. The execution control flag decoder 611 supplies the generated execution control flag to the RemCcbs setting units 461 and 462.

[0339] The selection unit 451, the TS residual decoding unit 452, and the non-TS residual decoding unit 453 perform the same processing as in Fig. 17. That is, the selection unit 451 selects whether to decode the coded data of the quantization coefficient level in the TS residual coding mode or the non-TS residual coding mode, based on transform_skip_flag[xTbY][yTbY][cIdx] and cIdx. The TS residual decoding unit 452 decodes the coded data of the quantization coefficient level in the TS residual coding mode. The non-TS residual decoding unit 453 decodes the coded data of the quantization coefficient level in the non-TS residual coding mode.

[0340] The TS residual decoding unit 452 has a RemCcbs setting unit 461. The RemCcbs setting unit 461 performs basically the same processing as in the case of FIG. 17. That is, the RemCcbs setting unit 461 sets an initial value of RemCcbs, and the TS residual decoding unit 452 decodes coded data with the quantization coefficient level obtained using that RemCcbs. The non-TS residual decoding unit 453 has a RemCcbs setting unit 462. The RemCcbs setting unit 462 performs basically the same processing as in the case of FIG. 17. That is, the RemCcbs setting unit 462 sets an initial value of RemCcbs, and the non-TS residual decoding unit 453 decodes coded data with the quantization coefficient level obtained using that RemCcbs.

[0341] The above-described method 1-1-4 of the present technology may be applied to such RemCcbs setting units 461 and 462. That is, when the execution control flag is true, the RemCcbs setting units 461 and 462 may set a bit-depth-dependent number of context coding bins based on the bit-depth of the image, and set a maximum number of context coding bins based on the bit-depth-dependent number of context coding bins, and when the execution control flag is false, set the maximum number of context coding bins based on a reference value of the number of context coding bins. For example, the RemCcbs setting units 461 and 462 may have a configuration similar to that of the RemCcbs setting device 100 shown in FIG. 6 and may set the initial value of RemCcbs by performing similar processing.

[0342] In this case, the RemCcbs setting units 461 and 462 acquire the execution control flag supplied from the execution control flag decoding unit 611. Then, the RemCcbs setting units 461 and 462 determine a setting method for ctxBinSampleRatio based on the execution control flag. This method is the same as that used by the RemCcbs setting units 361 and 362 (FIG. 20). For example, if the execution control flag is true (e.g., 1), the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs by applying any one of methods 1-1-1 to 1-1-3. For example, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs by applying any one of equations (2) and (3) to (5).

[0343] The decoding unit 412 (TS residual decoding unit 452 and non-TS residual decoding unit 453) decodes (in TS residual coding mode or non-TS residual coding mode) the coded data of the image (quantization coefficient level) using the initial value of RemCcbs (maximum number of context coding bins) set in this way by the RemCcbs setting units 461 and 462. That is, the decoding unit 412 context-decodes the coded data of the image (quantization coefficient level) using the maximum number of context coding bins set by the RemCcbs setting units 461 and 462 by applying the present technology. That is, in this case as well, the decoding unit 412 can be said to be an image decoding unit.

[0344] By doing so, it is possible to obtain the same effect as described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 461 and 462 can also control the number of generated context coding bins in this case. Therefore, the decoding unit 412 can suppress an increase in the amount of decoding processing. For example, the decoding unit 412 can suppress an increase in the amount of CABAC processing when decoding high-bit-depth, high-bit-rate images.

[0345] In other words, the RemCcbs setting units 461 and 462 can also suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated in this case. Therefore, the decoding unit 412 can suppress an increase in the total amount of CABAC processing.

[0346] That is, the image decoding device 400 can suppress an increase in the amount of decoding processing.

[0347] <Encoding process flow> The image encoding process executed by the image decoding device 400 having the decoding unit 412 configured as shown in FIG. 23 is performed in the same manner as described with reference to the flowchart in FIG.

[0348] An example of the flow of the encoding process executed in step S402 in FIG. 18 in this case will be described with reference to the flowchart in FIG.

[0349] When the decoding process is started, the processes of steps S651 and S652 in FIG. 24 are executed in the same manner as the processes of steps S451 and S452 in FIG.

[0350] In step S653, the execution control flag decoding unit 611 decodes the bitstream and generates an execution control flag.

[0351] Then, the processes of steps S654 to S658 are executed in the same manner as the processes of steps S453 to S457 in Fig. 19. When the process of step S656 or step S658 ends, the decoding process ends and the process returns to Fig. 18.

[0352] The above-described method 1-1-4 of the present technology may be applied to the RemCcbs setting process executed in steps S655 and S657 of this decoding process. For example, this RemCcbs setting process may be executed according to the flow described with reference to the flowchart in FIG. 7. For example, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs by applying any of methods 1-1-1 to 1-1-3. For example, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs by applying any of equations (2) and (3) to (5).

[0353] By doing so, it is possible to obtain the same effect as described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 461 and 462 can also control the number of generated context coding bins in this case. Therefore, the decoding unit 412 can suppress an increase in the amount of decoding processing. For example, the decoding unit 412 can suppress an increase in the amount of CABAC processing when decoding high-bit-depth, high-bit-rate images.

[0354] In other words, the RemCcbs setting units 461 and 462 can also suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated in this case. Therefore, the decoding unit 412 can suppress an increase in the total amount of CABAC processing.

[0355] That is, by performing each process as described above, the image decoding device 400 can suppress an increase in the amount of decoding processing.

[0356] <Control unit / Encoding unit> Furthermore, method 2 (or method 2-1) of the present technology may be applied to the image encoding device 300. Fig. 25 is a block diagram showing an example of the main configuration of the control unit 301 and the encoding unit 315 in this case. As shown in Fig. 25, in this case, the control unit 301 has a reference value control flag generation unit 711. Furthermore, the encoding unit 315 has a selection unit 351, a TS residual encoding unit 352, a non-TS residual encoding unit 353, and a reference value control flag encoding unit 712.

[0357] The reference value control flag generation unit 711 generates the reference value control flag described in <Reference Value Control Flag> in <2. Suppression of the Number of Context Coding Bins>, etc. The reference value control flag generation unit 711 supplies the generated reference value control flag to the encoding unit 315. For example, the reference value control flag generation unit 711 may supply the generated reference value control flag to the reference value control flag encoding unit 712. Furthermore, the reference value control flag generation unit 711 may supply the generated reference value control flag to the RemCcbs setting unit 361 and the RemCcbs setting unit 362.

[0358] This reference value control flag is a flag that controls the reference value of the number of context coding bins at the CG level. For example, when this reference value control flag is true (e.g., 1), the initial value of RemCcbs (the maximum number of context coding bins generated in encoding an image) is set using ctxBinSampleRatioBase1 (a first reference value of the number of context coding bins at the CG level). When this reference value control flag is false (e.g., 0), the initial value of RemCcbs (the maximum number of context coding bins generated in encoding an image) is set using ctxBinSampleRatioBase2 (a second reference value of the number of context coding bins at the CG level). The value of ctxBinSampleRatioBase1 is arbitrary. For example, ctxBinSampleRatioBase1=28 may be used. The value of ctxBinSampleRatioBase2 is arbitrary as long as it is smaller than ctxBinSampleRatioBase1. For example, ctxBinSampleRatioBase2=0 may be used.

[0359] The reference value control flag generation unit 711 may generate this reference value control flag based on any information. For example, the reference value control flag generation unit 711 may generate the reference value control flag based on an image to be coded or parameters related to the image. Alternatively, the reference value control flag generation unit 711 may generate the reference value control flag based on an instruction from outside the image coding device 300, such as a user or an application.

[0360] The reference value control flag encoding unit 712 performs processing related to encoding of the reference value control flag. For example, the reference value control flag encoding unit 712 acquires a reference value control flag supplied from the reference value control flag generation unit 711. The reference value control flag encoding unit 712 also encodes the acquired reference value control flag to generate encoded data. The encoded data of the reference value control flag is stored in a bit stream of encoded data such as quantization coefficient level by the encoding unit 315.

[0361] The selection unit 351, the TS residual coding unit 352, and the non-TS residual coding unit 353 perform the same processing as in Fig. 11. That is, the selection unit 351 selects whether to code the quantization coefficient level in the TS residual coding mode or the non-TS residual coding mode based on transform_skip_flag[xTbY][yTbY][cIdx] and cIdx. The TS residual coding unit 352 codes the quantization coefficient level in the TS residual coding mode. The non-TS residual coding unit 353 codes the quantization coefficient level in the non-TS residual coding mode.

[0362] The TS residual coding unit 352 has a RemCcbs setting unit 361. The RemCcbs setting unit 361 performs basically the same processing as in the case of FIG. 11. That is, the RemCcbs setting unit 361 sets an initial value of RemCcbs, and the TS residual coding unit 352 encodes the quantization coefficient level obtained using that RemCcbs. The non-TS residual coding unit 353 has a RemCcbs setting unit 362. The RemCcbs setting unit 362 performs basically the same processing as in the case of FIG. 11. That is, the RemCcbs setting unit 362 sets an initial value of RemCcbs, and the non-TS residual coding unit 353 encodes the quantization coefficient level obtained using that RemCcbs.

[0363] The above-described method 2 (or method 2-1) of the present technology may be applied to the RemCcbs setting units 361 and 362. That is, the RemCcbs setting units 361 and 362 may set the maximum number of context coding bins in accordance with processing speed control. For example, the RemCcbs setting units 361 and 362 may set the maximum number of context coding bins based on a reference value control flag.

[0364] In this case, the RemCcbs setting units 361 and 362 acquire the reference value control flag supplied from the reference value control flag generation unit 711. Then, the RemCcbs setting units 361 and 362 determine a method for setting the initial value of RemCcbs based on the reference value control flag.

[0365] For example, when the reference value control flag is false (e.g., 0), the RemCcbs setting units 361 and 362 set the initial value of RemCcbs based on ctxBinSampleRatioBase1. When the reference value control flag is true (e.g., 1), the RemCcbs setting units 361 and 362 set the initial value of RemCcbs based on ctxBinSampleRatioBase2. For example, the RemCcbs setting units 361 and 362 may have a configuration similar to that of the RemCcbs setting device 100 shown in FIG. 8 and may set the initial value of RemCcbs by performing similar processing.

[0366] In this case, the RemCcbs setting units 361 and 362 may set the number of context coding bins (ctxBinSampleRatio) that does not depend on bitDepth based on the reference value (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) selected according to the reference value control flag. For example, the RemCcbs setting units 361 and 362 may set ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2 as the ctxBinSampleRatio. Then, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs using the ctxBinSampleRatio (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2). For example, the RemCcbs setting units 361 and 362 may derive the initial value of RemCcbs using the above-mentioned equation (1).

[0367] In this case, the RemCcbs setting units 361 and 362 may set the initial value of RemCcbs based on ctxBinSampleRatio and any other parameters. For example, the RemCcbs setting units 361 and 362 may acquire the block size (TbWidth and TbHeight) of the block to be processed supplied from the control unit 301, and set the initial value of RemCcbs corresponding to the block to be processed using the above-mentioned ctxBinSampleRatio (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) and its TbWidth and TbHeight.

[0368] The encoding unit 315 (TS residual encoding unit 352 and non-TS residual encoding unit 353) encodes the image (quantization coefficient level) (in TS residual encoding mode or non-TS residual encoding mode) using the initial value of RemCcbs (maximum number of context encoding bins) set in this manner by the RemCcbs setting units 361 and 362. That is, the encoding unit 315 context-encodes the image (quantization coefficient level) using the maximum number of context encoding bins set by the RemCcbs setting units 361 and 362 by applying the present technology. That is, in this case as well, the encoding unit 315 can be said to be an image encoding unit.

[0369] This can achieve the same effect as that described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 361 and 362 can control the number of context coding bins generated using the reference value control flag. That is, the RemCcbs setting units 361 and 362 can control the number of context coding bins generated in accordance with the CABAC processing speed control. Therefore, the encoding unit 315 can suppress an increase in the amount of encoding processing. For example, the encoding unit 315 can suppress an increase in the amount of CABAC processing when encoding high-bit-depth, high-bit-rate images.

[0370] In other words, the RemCcbs setting units 361 and 362 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated in accordance with the CABAC processing speed control. Therefore, the encoding unit 315 can suppress an increase in the total amount of CABAC processing.

[0371] That is, the image encoding device 300 can suppress an increase in the amount of encoding processing.

[0372] <Image encoding process flow> Next, an example of the flow of image encoding processing executed by an image encoding device 300 having an encoding unit 315 configured as shown in FIG. 25 will be described with reference to the flowchart of FIG.

[0373] When the image encoding process is started, the processes of steps S701 and S702 are executed in the same manner as the processes of steps S301 and S302 in FIG.

[0374] In step S703, the reference value control flag generation unit 711 generates a reference value control flag.

[0375] The processes of steps S704 to S715 are executed in the same manner as the processes of steps S303 to S314 in FIG.

[0376] When the process of step S715 ends, the image encoding process ends.

[0377] <Encoding process flow> An example of the flow of the encoding process executed in step S714 in FIG. 26 will be described with reference to the flowchart in FIG.

[0378] When the encoding process is started, the processes of steps S751 and S752 in FIG. 27 are executed in the same manner as the processes of steps S351 and S352 in FIG.

[0379] In step S753, the reference value control flag encoding unit 712 encodes the reference value control flag generated in step S703 of FIG.

[0380] Then, the processes of steps S754 to S758 are executed in the same manner as the processes of steps S353 to S357 in Fig. 15. When the process of step S756 or step S758 ends, the encoding process ends and the process returns to Fig. 26.

[0381] The above-described method 2 (or method 2-1) of the present technology may be applied to the RemCcbs setting process executed in step S755 and step S757 of the encoding process. For example, the RemCcbs setting process may be executed according to the flow described with reference to the flowchart in FIG.

[0382] For example, the RemCcbs setting units 361 and 362 may select a reference value (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) according to the reference value control flag and derive the initial value of RemCcbs using that reference value. In this case, the RemCcbs setting units 361 and 362 may derive the initial value of RemCcbs using the above-mentioned equation (1).

[0383] This can achieve the same effect as that described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 361 and 362 can control the number of context coding bins generated using the reference value control flag. That is, the RemCcbs setting units 361 and 362 can control the number of context coding bins generated in accordance with the CABAC processing speed control. Therefore, the encoding unit 315 can suppress an increase in the amount of encoding processing. For example, the encoding unit 315 can suppress an increase in the amount of CABAC processing when encoding high-bit-depth, high-bit-rate images.

[0384] In other words, the RemCcbs setting units 361 and 362 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated in accordance with the CABAC processing speed control. Therefore, the encoding unit 315 can suppress an increase in the total amount of CABAC processing.

[0385] That is, by performing each process as described above, the image encoding device 300 can suppress an increase in the amount of encoding processing.

[0386] <Decryption section> Furthermore, method 2 (or method 2-1) of the present technology may be applied to the image decoding device 400. Fig. 28 is a block diagram showing an example of the main configuration of the decoding unit 412 in that case. As shown in Fig. 28, the decoding unit 412 includes a selection unit 451, a TS residual decoding unit 452, a Non-TS residual decoding unit 453, and a reference value control flag decoding unit 811.

[0387] The reference value control flag decoder 811 decodes the bitstream and generates the reference value control flag described in <Reference value control flag> in <2. Suppression of the number of context coding bins>, etc. The reference value control flag decoder 811 supplies the generated reference value control flag to the RemCcbs setting unit 461 and the RemCcbs setting unit 462.

[0388] The selection unit 451, the TS residual decoding unit 452, and the non-TS residual decoding unit 453 perform the same processing as in Fig. 17. That is, the selection unit 451 selects whether to decode the coded data of the quantization coefficient level in the TS residual coding mode or the non-TS residual coding mode, based on transform_skip_flag[xTbY][yTbY][cIdx] and cIdx. The TS residual decoding unit 452 decodes the coded data of the quantization coefficient level in the TS residual coding mode. The non-TS residual decoding unit 453 decodes the coded data of the quantization coefficient level in the non-TS residual coding mode.

[0389] The TS residual decoding unit 452 has a RemCcbs setting unit 461. The RemCcbs setting unit 461 performs basically the same processing as in the case of FIG. 17. That is, the RemCcbs setting unit 461 sets an initial value of RemCcbs, and the TS residual decoding unit 452 decodes coded data with the quantization coefficient level obtained using that RemCcbs. The non-TS residual decoding unit 453 has a RemCcbs setting unit 462. The RemCcbs setting unit 462 performs basically the same processing as in the case of FIG. 17. That is, the RemCcbs setting unit 462 sets an initial value of RemCcbs, and the non-TS residual decoding unit 453 decodes coded data with the quantization coefficient level obtained using that RemCcbs.

[0390] The above-described method 2 (or method 2-1) of the present technology may be applied to the RemCcbs setting units 461 and 462. That is, the RemCcbs setting units 461 and 462 may set the maximum number of context coding bins in accordance with processing speed control. For example, the RemCcbs setting units 461 and 462 may set the maximum number of context coding bins based on a reference value control flag.

[0391] In this case, the RemCcbs setting units 461 and 462 acquire the reference value control flag supplied from the reference value control flag decoding unit 811. Then, the RemCcbs setting units 461 and 462 determine a method for setting the initial value of RemCcbs based on the reference value control flag.

[0392] For example, when the reference value control flag is false (e.g., 0), the RemCcbs setting units 461 and 462 set the initial value of RemCcbs based on ctxBinSampleRatioBase1. When the reference value control flag is true (e.g., 1), the RemCcbs setting units 461 and 462 set the initial value of RemCcbs based on ctxBinSampleRatioBase2. For example, the RemCcbs setting units 461 and 462 may have a configuration similar to that of the RemCcbs setting device 100 shown in FIG. 8 and may set the initial value of RemCcbs by performing similar processing.

[0393] In this case, the RemCcbs setting units 461 and 462 may set the number of context coding bins (ctxBinSampleRatio) that does not depend on bitDepth based on the reference value (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) selected according to the reference value control flag. For example, the RemCcbs setting units 461 and 462 may set ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2 as the ctxBinSampleRatio. Then, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs using the ctxBinSampleRatio (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2). For example, RemCcbs setting units 461 and 462 may derive the initial value of RemCcbs using equation (1) above.

[0394] In this case, the RemCcbs setting units 461 and 462 may set the initial value of RemCcbs based on ctxBinSampleRatio and any other parameters. For example, the RemCcbs setting units 461 and 462 may acquire the block size (TbWidth and TbHeight) of the block to be processed obtained by decoding the bitstream by the decoding unit 412, and set the initial value of RemCcbs corresponding to the block to be processed using the above-mentioned ctxBinSampleRatio (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) and its TbWidth and TbHeight.

[0395] The decoding unit 412 (TS residual decoding unit 452 and non-TS residual decoding unit 453) decodes (in TS residual coding mode or non-TS residual coding mode) the coded data of the image (quantization coefficient level) using the initial value of RemCcbs (maximum number of context coding bins) set in this way by the RemCcbs setting units 461 and 462. That is, the decoding unit 412 context-decodes the coded data of the image (quantization coefficient level) using the maximum number of context coding bins set by the RemCcbs setting units 461 and 462 by applying the present technology. That is, in this case as well, the decoding unit 412 can be said to be an image decoding unit.

[0396] By doing so, it is possible to obtain the same effect as that described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 461 and 462 can control the number of context coding bins generated using the reference value control flag. That is, the RemCcbs setting units 461 and 462 can control the number of context coding bins generated in accordance with CABAC processing speed control. Therefore, the decoding unit 412 can suppress an increase in the amount of decoding processing. For example, the decoding unit 412 can suppress an increase in the amount of CABAC processing when decoding high-bit-depth, high-bit-rate images.

[0397] In other words, the RemCcbs setting units 461 and 462 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated in accordance with the CABAC processing speed control. Therefore, the decoding unit 412 can suppress an increase in the total amount of CABAC processing.

[0398] That is, the image decoding device 400 can suppress an increase in the amount of encoding processing.

[0399] <Encoding process flow> The image encoding process executed by the image decoding device 400 having the decoding unit 412 configured as shown in FIG. 28 is performed in the same manner as described with reference to the flowchart in FIG.

[0400] An example of the flow of the encoding process executed in step S402 in FIG. 18 in this case will be described with reference to the flowchart in FIG.

[0401] When the decoding process is started, the processes of steps S851 and S852 in FIG. 29 are executed in the same manner as the processes of steps S451 and S452 in FIG.

[0402] In step S853, the reference value control flag decoder 811 decodes the bitstream and generates a reference value control flag.

[0403] Then, the processes of steps S854 to S858 are executed in the same manner as the processes of steps S453 to S457 in Fig. 19. When the process of step S856 or step S858 ends, the decoding process ends and the process returns to Fig. 18.

[0404] The above-described method 2 (or method 2-1) of the present technology may be applied to the RemCcbs setting process executed in step S855 and step S857 of the decoding process. For example, the RemCcbs setting process may be executed according to the flow described with reference to the flowchart in FIG.

[0405] For example, the RemCcbs setting units 461 and 462 may select a reference value (ctxBinSampleRatioBase1 or ctxBinSampleRatioBase2) according to the reference value control flag and derive the initial value of RemCcbs using that reference value. In this case, the RemCcbs setting units 461 and 462 may derive the initial value of RemCcbs using the above-mentioned equation (1).

[0406] By doing so, it is possible to obtain the same effect as that described above in <2. Suppression of the Number of Context Coding Bins>. That is, the RemCcbs setting units 461 and 462 can control the number of context coding bins generated using the reference value control flag. That is, the RemCcbs setting units 461 and 462 can control the number of context coding bins generated in accordance with CABAC processing speed control. Therefore, the decoding unit 412 can suppress an increase in the amount of decoding processing. For example, the decoding unit 412 can suppress an increase in the amount of CABAC processing when decoding high-bit-depth, high-bit-rate images.

[0407] In other words, the RemCcbs setting units 461 and 462 can suppress an increase in the total number of context coding bins and bypass coding bins by suppressing the number of context coding bins generated in accordance with the CABAC processing speed control. Therefore, the decoding unit 412 can suppress an increase in the total amount of CABAC processing.

[0408] That is, by performing each process as described above, the image decoding device 400 can suppress an increase in the amount of decoding processing.

[0409] <4. Notes> <Computer> The above-described 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 on a computer. Here, the term "computer" includes computers built into dedicated hardware, and general-purpose personal computers, etc., that can execute various functions by installing various programs.

[0410] FIG. 30 is a block diagram showing an example of the hardware configuration of a computer that executes the above-described series of processes by a program.

[0411] In a computer 900 shown in FIG. 30, a CPU (Central Processing Unit) 901, a ROM (Read Only Memory) 902, and a RAM (Random Access Memory) 903 are interconnected via a bus 904.

[0412] An input / output interface 910 is also connected to the bus 904. To the input / output interface 910, an input unit 911, an output unit 912, a storage unit 913, a communication unit 914, and a drive 915 are connected.

[0413] The input unit 911 includes, for example, a keyboard, a mouse, a microphone, a touch panel, an input terminal, etc. The output unit 912 includes, for example, a display, a speaker, an output terminal, etc. The storage unit 913 includes, for example, a hard disk, a RAM disk, a non-volatile memory, etc. The communication unit 914 includes, for example, a network interface. The drive 915 drives removable media 921 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory.

[0414] In a computer configured as above, the CPU 901 performs the above-described series of processes by, for example, loading a program stored in the storage unit 913 into the RAM 903 via the input / output interface 910 and the bus 904 and executing the program. The RAM 903 also stores data necessary for the CPU 901 to execute various processes as appropriate.

[0415] The program executed by the computer can be applied by recording it on removable media 921 such as package media, for example. In this case, the program can be installed in storage unit 913 via input / output interface 910 by inserting removable media 921 into drive 915.

[0416] 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 914 and installed in the storage unit 913.

[0417] Alternatively, this program can be installed in advance in the ROM 902 or the storage unit 913 .

[0418] <Applicable targets of this technology> This technology can be applied to any image encoding or 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 and decoding, such as transform (inverse transform), quantization (inverse quantization), encoding (decoding), and prediction, are arbitrary and are not limited to the above-mentioned examples. Furthermore, as long as it does not conflict with the above-mentioned technology, some of these processes may be omitted.

[0419] The present technology can also be applied to a multi-viewpoint image coding system that codes a multi-viewpoint image including images from a plurality of views. The present technology can also be applied to a multi-viewpoint image decoding system that decodes coded data of a multi-viewpoint image including images from a plurality of views. In that case, the present technology can be applied in the coding and decoding of each view.

[0420] Furthermore, the present technology can be applied to a hierarchical image coding (scalable coding) system that codes hierarchical images that are layered (hierarchized) so as to have a scalability function for a predetermined parameter. Also, the present technology can be applied to a hierarchical image decoding (scalable decoding) system that decodes coded data of hierarchical images that are layered (hierarchized) so as to have a scalability function for a predetermined parameter. In this case, the present technology can be applied in the coding and decoding of each layer.

[0421] Furthermore, the present technology can be applied to any configuration. For example, the present technology can be applied to various electronic devices, such as transmitters and receivers (for example, television receivers and mobile phones) in satellite broadcasting, cable TV and other wired broadcasting, distribution over the Internet, and distribution to terminals via cellular communication, or devices (for example, hard disk recorders and cameras) that record images on media such as optical disks, magnetic disks, and flash memories, or play images from these storage media.

[0422] Furthermore, for example, the present technology can also be implemented as a 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).

[0423] Furthermore, for example, the present technology can also be applied to a network system configured with multiple devices. For example, the present technology may be implemented as cloud computing in which multiple devices share and collaborate on processing via a network. For example, the present technology may be implemented in a cloud service that provides image (video)-related services to any terminal, such as a computer, AV (Audio Visual) equipment, a portable information processing terminal, or an IoT (Internet of Things) device.

[0424] In this specification, a system refers to a collection of multiple components (devices, modules (components), etc.), regardless of whether all the components are contained in the same housing. Therefore, multiple devices housed in separate housings and connected via a network, and a single device housed in a single housing with multiple modules, are both systems.

[0425] <Fields and uses 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 thereof are also arbitrary.

[0426] For example, the present technology can be applied to systems and devices used to provide viewing content, etc. Furthermore, for example, the present technology can also be applied to systems and devices used for transportation, such as monitoring traffic conditions and controlling automatic driving. Furthermore, for example, the present technology can also be applied to systems and devices used for security. Furthermore, for example, the present technology can also be applied to systems and devices used for automatic control of machines, etc. Furthermore, for example, the present technology can also be applied to systems and devices used for agriculture and livestock farming. Furthermore, for example, the present technology can also be applied to systems and devices used to monitor natural conditions, such as volcanoes, forests, and oceans, and wildlife. Furthermore, for example, the present technology can also be applied to systems and devices used for sports.

[0427] <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. Therefore, the value that this "flag" can take may be, for example, two values, 1 / 0, or 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, identification information (including flags) can be assumed not only to include the identification information in the bit stream, but also to include difference information of the identification information relative 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 relative to the reference information.

[0428] Furthermore, various types of information (metadata, etc.) related to the coded data (bitstream) may be transmitted or recorded in any form as long as they are 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. In other words, data associated with each other may be combined into one piece of data or may be individual pieces of data. For example, information associated with coded data (image) may be transmitted over a transmission path separate from that of the coded data (image). Also, for example, information associated with coded data (image) may be recorded on a recording medium separate from that of the coded data (image) (or on a different recording area of ​​the same recording medium). Note that this "association" may refer to only a portion of the data, rather than the entire data. For example, an image and information corresponding to that image may be associated with each other in any unit, such as multiple frames, one frame, or a portion of a frame.

[0429] In this specification, terms such as "composite," "multiplex," "add," "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.

[0430] Furthermore, the embodiments of the present technology are not limited to the above-described embodiments, and various modifications are possible within the scope of the gist of the present technology.

[0431] For example, a configuration described as one device (or processing unit) may be divided and configured as multiple devices (or processing units). Conversely, 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 each processing unit). Furthermore, as long as the configuration and operation of the entire system 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).

[0432] Furthermore, for example, the above-described 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.

[0433] Also, for example, each step of a single 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.

[0434] Furthermore, the program executed by the computer may have the following features. For example, the processing of the steps of writing the program may be executed in chronological order according to the order described in this specification. The processing of the steps of writing the program may also be executed in parallel. Furthermore, the processing of the steps of writing the program may be executed individually at the necessary timing, such as when called. In other words, as long as no contradiction occurs, the processing of each step may be executed in an order different from the order described above. Furthermore, the processing of the steps of writing the program may be executed in parallel with the processing of another program. Furthermore, the processing of the steps of writing the program may be executed in combination with the processing of another program.

[0435] Furthermore, for example, multiple technologies related to the present technology can be implemented independently and independently, as long as no contradiction occurs. Of course, any multiple technologies can also be implemented in combination. For example, part or all of the present technology described in any embodiment can be implemented in combination with part or all of the present technology described in another embodiment. Furthermore, part or all of any of the above-described present technologies can be implemented in combination with other technologies not described above.

[0436] The present technology can also be configured as follows. (1) An image processing device comprising: a context coding bin maximum number setting unit that sets a value according to the bit depth of an image as the maximum number of context coding bins that will be generated in encoding or decoding the image. (2) The context coding bin maximum number setting unit sets a bit-depth-dependent number of context coding bins based on the bit depth of the image, and sets the maximum number of context coding bins based on the bit-depth-dependent number of context coding bins. The image processing device according to (1). (3) The maximum context coding bin number setting unit sets a value obtained by dividing a reference value of the number of context coding bins by a value according to the bit depth of the image as the number of context coding bins depending on the bit depth. (2) An image processing device according to the present invention. (4) The maximum context coding bin number setting unit sets a value obtained by subtracting a value according to the bit depth of the image from a reference value of the number of context coding bins as the number of context coding bins depending on the bit depth. (2) An image processing device according to the present invention. (5) The context coding bin maximum number setting unit sets a value according to the bit depth of the image as the bit-depth-dependent context coding bin number. (2) An image processing device according to the present invention. (6) The maximum number of context coding bins setting unit sets the maximum number of context coding bins corresponding to the current block based on a block size of the current block and a number of context coding bins that depends on the bit depth. An image processing device according to any one of (2) to (5). (7) The present invention further includes an image encoding unit that performs context encoding on the image using the maximum number of context encoding bins. An image processing device according to any one of (1) to (6). (8) a calculation unit that subtracts a predicted image from the image and the predicted image to derive a prediction residual; a coefficient conversion unit that performs coefficient conversion on the prediction residual to derive transform coefficients; a quantization unit that quantizes the transform coefficients to derive quantized coefficients; Furthermore, The image encoding unit performs context encoding on the quantized coefficients using the maximum number of context encoding bins. (7) An image processing device according to (7). (9) The image encoding unit encodes the quantized coefficients in a TS residual encoding mode or a Non-TS residual encoding mode. (8) An image processing device according to (8). (10) The image decoding unit further includes an image decoding unit that context-decodes a bitstream in which the image is context-coded using the maximum number of context coding bins. An image processing device according to any one of (1) to (6). (11) The image decoding unit performs context decoding on the bitstream using the maximum number of context coding bins to derive quantization coefficients; an inverse quantization unit that inverse quantizes the quantized coefficients to derive transform coefficients; an inverse coefficient transform unit that performs inverse coefficient transform on the transform coefficients to derive prediction residuals; a calculation unit that adds a predicted image of the image to the prediction residual to derive the image; The image processing device according to (10) further comprises: (12) The image decoding unit decodes the bitstream in a TS residual coding mode or a Non-TS residual coding mode. The image processing device according to (11). (13) When the control flag is true, the maximum number of context coding bins setting unit sets a bit-depth-dependent number of context coding bins based on the bit depth of the image, and sets the maximum number of context coding bins based on the bit-depth-dependent number of context coding bins. When the control flag is false, the maximum number of context coding bins is set based on a reference value of the number of context coding bins. An image processing device according to any one of (1) to (6). (14) a control flag generation unit that generates the control flag; a control flag encoding unit that encodes the control flag; an image encoding unit that performs context encoding on the image using the maximum number of context encoding bins; The image processing device according to (13) further comprises: (15) a control flag decoding unit that decodes the bitstream to derive the control flag; an image decoding unit that context-decodes a bitstream in which the image is context-coded, using the maximum number of context coding bins; The image processing device according to (13) further comprises: (16) A value according to the bit depth of an image is set as the maximum number of context coding bins that occur in encoding or decoding the image. Image processing methods. (17) A context coding bin maximum number setting unit that sets the maximum number of context coding bins generated in encoding or decoding of an image according to a control flag indicating a mode of processing speed. An image processing device comprising: (18) The context coding bin maximum number setting unit if the control flag indicates a normal rate mode, setting the maximum number of context coding bins based on a first reference value; If the control flag indicates a high-speed mode, the maximum number of context coding bins is set based on a second reference value that is smaller than the first reference value. (17) An image processing device according to (17). (19) The context coding bin maximum number setting unit sets the maximum number of context coding bins corresponding to the current block based on a block size of the current block and the control flag. The image processing device according to (17) and (18). (20) Set the maximum number of context coding bins that occur in encoding or decoding an image according to a control flag indicating the mode of the processing speed. Image processing methods. [Explanation of symbols]

[0437] 100 RemCcbs setting device, 101 ctxBinSampleRatio (bitDepth) setting unit, 102 RemCcbs initial value setting unit, 151 ctxBinSampleRatio unit, 152 RemCcbs initial value setting unit, 181 ctxBinSampleRatio unit, 182 RemCcbs initial value setting unit, 300 image encoding device, 301 control unit, 315 encoding unit, 351 selection unit, 352 TS residual encoding unit, 352 Non-TS residual encoding unit, 361 RemCcbs setting unit, 362 RemCcbs setting unit, 400 image decoding device, 412 decoding unit, 451 selection unit, 452 TS residual decoding unit, 452 Non-TS residual decoding unit, 461 RemCcbs setting unit, 462 RemCcbs setting unit, 511 execution control flag generation unit, 512 execution control flag encoding unit, 611 execution control flag decoding unit, 711 reference value control flag generation unit, 712 reference value control flag encoding unit, 811 reference value control flag decoding unit, 900 computer

Claims

1. a maximum context coding bin number setting unit that sets the maximum number of context coding bins generated in encoding or decoding of an image according to a control flag that indicates a mode of processing speed; An image processing device comprising:

2. The context coding bin maximum number setting unit if the control flag indicates a normal rate mode, setting the maximum number of context coding bins based on a first reference value; If the control flag indicates a high-speed mode, the maximum number of context coding bins is set based on a second reference value that is smaller than the first reference value. The image processing device according to claim 1 .

3. The context coding bin maximum number setting unit sets the maximum number of context coding bins corresponding to the current block based on a block size of the current block and the control flag. The image processing device according to claim 1 .

4. Set the maximum number of context coding bins that occur in encoding or decoding an image according to a control flag indicating the mode of processing speed. Image processing methods.