Image coding method including selecting a context for performing arithmetic coding on a parameter indicating a coding-target coefficient included in a sub-block
An image coding method for coding an image on a block-by-block basis, includes: selecting, for each of a plurality of sub-blocks included in a coding-target block and each including a plurality of coefficients, a context for performing arithmetic coding on a parameter indicating a coding-target coefficient included in the sub-block from a context set corresponding to the sub-block, based on at least one reference coefficient located around the coding-target coefficient, the coding-target block being a transform unit; and performing arithmetic coding on the parameter indicating the coding-target coefficient using probability information about the selected context, wherein, in the selecting, the context is selected from the context set, the context set corresponding to a sum of (i) a value indicating a position in a horizontal direction of the sub-block in the coding-target block and (ii) a value indicating a position in a vertical direction of the sub-block in the coding-target block.
1. An image decoding method for decoding an image coded on a block-by-block basis, the image decoding method comprising:
selecting, for each of a plurality of sub-blocks included in a decoding-target block and each including a plurality of coefficients, a context for performing arithmetic decoding on a parameter indicating a decoding-target coefficient included in the sub-block from a context set corresponding to the sub-block, based on at least one reference coefficient located around the decoding-target coefficient, the decoding-target block being a transform unit; and
performing arithmetic decoding on the parameter indicating the decoding-target coefficient using probability information about the selected context,
wherein, in the selecting, the context is selected from the context set, the context set corresponding to a sum of (i) a horizontal value indicating a position in a horizontal direction of the sub-block in the decoding-target block and (ii) a vertical value indicating a position in a vertical direction of the sub-block in the decoding-target block,
the horizontal value is an integer part of (a horizontal position of the coding-target coefficient/4), where the horizontal position of the coding target coefficient is a horizontal direction distance from a position of an upper left coefficient in the coding-target block, and
the vertical value is an integer part of (a vertical position of the coding-target coefficient/4), where the vertical position of the coding target coefficient is a vertical direction distance from the position of the upper left coefficient in the coding-target block.
2. An image decoding apparatus which decodes an image coded on a block-by-block basis, the image decoding apparatus comprising:
a context selecting unit configured to select, for each of a plurality of sub-blocks included in a decoding-target block and each including a plurality of coefficients, a context for performing arithmetic decoding on a parameter indicating a decoding-target coefficient included in the sub-block from a context set corresponding to the sub-block, based on at least one reference coefficient located around the decoding-target coefficient, the decoding-target block being a transform unit; and
an arithmetic decoder configured to perform arithmetic decoding on the parameter indicating the decoding-target coefficient using probability information about the selected context,
wherein, the context selecting unit is configured to select the context from the context set, the context set corresponding to a sum of (i) a horizontal value indicating a position in a horizontal direction of the sub-block in the decoding-target block and (ii) a vertical value indicating a position in a vertical direction of the sub-block in the decoding-target block,
the horizontal value is an integer part of (a horizontal position of the coding-target coefficient/4), where the horizontal position of the coding target coefficient is a horizontal direction distance from a position of an upper left coefficient in the coding-target block, and
the vertical value is an integer part of (a vertical position of the coding-target coefficient/4), where the vertical position of the coding target coefficient is a vertical direction distance from the position of the upper left coefficient in the coding-target block.
3. An image decoding apparatus which decodes an image coded on a block-by-block basis, the image decoding apparatus comprising:
a processor; and
a non-transitory memory having stored thereon executable instructions, which when executed, cause the processor to perform:
selecting, for each of a plurality of sub-blocks included in a decoding-target block and each including a plurality of coefficients, a context for performing arithmetic decoding on a parameter indicating a decoding-target coefficient included in the sub-block from a context set corresponding to the sub-block, based on at least one reference coefficient located around the decoding-target coefficient, the decoding-target block being a transform unit; and
performing arithmetic decoding on the parameter indicating the decoding-target coefficient using probability information about the selected context,
wherein, in the selecting, the context is selected from the context set, the context set corresponding to a sum of (i) a horizontal value indicating a position in a horizontal direction of the sub-block in the decoding-target block and (ii) a vertical value indicating a position in a vertical direction of the sub-block in the decoding-target block,
the horizontal value is an integer part of(a horizontal position of the coding-target coefficient/4), where the horizontal position of the coding target coefficient is a horizontal direction distance from a position of an upper left coefficient in the coding-target block, and
the vertical value is an integer part of (a vertical position of the coding-target coefficient/4), where the vertical position of the coding target coefficient is a vertical direction distance from the position of the upper left coefficient in the coding-target block.