CPC H04N 19/13 (2014.11) [H04N 19/117 (2014.11); H04N 19/124 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/44 (2014.11); H04N 19/46 (2014.11); H04N 19/513 (2014.11); H04N 19/60 (2014.11); H04N 19/61 (2014.11); H04N 19/70 (2014.11); H04N 19/91 (2014.11)] | 24 Claims |
1. A method for decoding coded data of a transform unit, the method comprising:
decoding a sub-block coefficient presence/absence flag for a target sub-block of the transform unit indicating whether or not one or more non-zero transform coefficients are included in the target sub-block, the transform unit comprising a plurality of sub-blocks including the target sub-block, a right adjacent sub-block to the target sub-block, and a lower adjacent sub-block to the target sub-block;
when the sub-block coefficient presence/absence flag for the target sub-block indicates that there are one or more non-zero transform coefficients included in the target sub-block, deriving a parameter used to derive a context index for decoding a transform coefficient presence/absence flag indicating whether or not a transform coefficient of the target sub-block is 0, wherein the parameter is derived as follows:
when a sub-block coefficient presence/absence flag for the right adjacent sub-block indicates that there are no non-zero transform coefficients included in the right adjacent sub-block and a sub-block coefficient presence/absence flag for the lower adjacent sub-block indicates that there are no non-zero transform coefficients included in the lower adjacent sub-block,
setting the parameter to a first value in a case where a sum of a horizontal coordinate and a vertical coordinate indicating a position of the transform coefficient of the target sub-block is equal to a first threshold value,
setting the parameter to a second value in a case where the sum of the horizontal coordinate and the vertical coordinate indicating the position of the transform coefficient of the target sub-block is greater than the first threshold and is less than a second threshold value, and
setting the parameter to a third value in a case where the sum of the horizontal coordinate and the vertical coordinate indicating the position of the transform coefficient of the target sub-block is greater than or equal to the second threshold value, and
when the sub-block coefficient presence/absence flag for the right adjacent sub-block indicates that there are one or more non-zero transform coefficients included in the right adjacent sub-block and the sub-block coefficient presence/absence flag for the lower adjacent sub-block indicates that there are one or more non-zero transform coefficients included in the lower adjacent sub-block,
setting the parameter to the first value regardless of the position of the transform coefficient of the target sub-block;
deriving a context index based on the parameter;
identifying a context based on the derived context index; and
decoding the transform coefficient presence/absence flag using the identified context.
|