Patent ID: 9332260
Filing Date: 2016-05-03
CPC Classification: H04N

Claim Text:
1. A coding device comprising: a predictive value data generator that sequentially generates predictive value data, which is a predictive value of pixel data; a predictive error data generator that sequentially generates predictive error data, which is a difference between the pixel data and the predictive value data; a coder that sequentially codes the predictive error data to sequentially generate variable-length coded data, in which a code length is variable and equal to or shorter than a set maximum code length; and a coding controller that sequentially controls the coder, wherein, while a predetermined number of pieces of the variable-length coded data are generated, the coding controller sequentially calculates an accumulated value by accumulating a difference between the code length of the variable-length coded data generated by the coder and a target code length, the coding controller sequentially sets the maximum code length corresponding to a difference between a limit value of the accumulated value and the accumulated value, the limit value being determined according to the number of coding times, which is the number of times of coding performed by the coder, such that the accumulated value is equal to or lower than 0 at the time the predetermined number of pieces of variable-length coded data are generated, and the limit value decreases in a continuous or stepwise manner as the number of coding times increases, and the limit value becomes 0 at least before the number of coding times reaches the predetermined number.