CPC H04N 19/13 (2014.11) [H04N 19/176 (2014.11); H04N 19/46 (2014.11); H04N 19/1887 (2014.11)] | 3 Claims |
1. An encoder comprising:
memory; and
a processor coupled to the memory and which, in operation, performs Context-Based Adaptive Binary Arithmetic Coding (CABAC), wherein
in prediction residual coding of a current block, the processor, in operation,
encodes a plurality of flags by CABAC, each of the plurality of flags relating to a coefficient included in the current block;
determines a base level;
calculates a prediction absolute value of the coefficient based on a sum of absolute values of five neighboring coefficients of the coefficient in the current block;
derives a rice parameter based on a difference between the prediction absolute value and the base level, wherein
if the difference is below a first value, the rice parameter is set to zero, and
if the difference is equal to or larger than the first value and smaller than a second value, the rice parameter is set to one:
encodes a remainder value of the coefficient using the derived rice parameter, wherein the remainder value is obtained by using an absolute value of the coefficient and the base level; and
encodes a sign flag indicating whether the coefficient has a positive value or a negative value if the absolute value of the coefficient is more than zero.
|