摘要 |
PROBLEM TO BE SOLVED: To efficiently obtain a code amount when a moving image is encoded.SOLUTION: A moving image encoder includes a code amount calculation device which calculates a code amount of a code outputted from entropy encoding means on the basis of a series of a binary code string on a residual signal between a target image and a prediction image and encoding information such as prediction information and a series of a context variable on the encoding information. The code amount calculation device includes: means for storing initial section width when processing starts; means for holding section width updated with the initial section width as an initial value; means for controlling state transition of the section width which is held in accordance with the series of the binary code string and the series of the context variable; means for counting the number of bit-shifting times of the section width by normalization for each binary code string; and means for calculating the code amount outputted from the entropy encoding means on the basis of a code amount corresponding to a count value and the initial section width and a code amount corresponding to the section width held when the processing is terminated. |