Patent ID: 7965896

Claim:
An image encoding apparatus comprising: an image acquiring unit that acquires an image signal; a modeling-parameter setting unit that selects a selection parameter sequentially from among a plurality of parameters included in a modeling equation for deriving a quantization matrix, and sets a value of the selection parameter to a predetermined value; a quantization-matrix calculating unit that calculates the quantization matrix by using the modeling equation for each time the selection parameter is set; a tentative-encoding processing unit that performs a tentative encoding of the image signal by using the quantization matrix, and derives a quantization parameter representing a code amount, an encoding distortion, and a quantization scale; an approximate-expression estimating unit that derives a first approximate expression approximating a relation between the code amount and the selection parameter and a second approximate expression approximating a relation between the encoding distortion and the selection parameter; a code-amount-distortion-expression calculating unit that calculates code-amount-distortion relational expression representing a relation between the code amount and the encoding distortion by using the first approximate expression and the second approximate expression; a target-code-amount calculating unit that calculates a target code amount or a target encoding distortion by using the code-amount-distortion relational expression and the quantization parameter; a modeling-parameter calculating unit that calculates a value of the selection parameter corresponding to the target code amount by using the first approximate expression, or calculates a value of the selection parameter corresponding to the target encoding distortion by using the second approximate expression; an optimized-quantization-matrix calculating unit that calculates an optimized quantization matrix for encoding the image signal based on the calculated value of the selection parameter and the modeling equation; and a final-encoding processing unit that performs a final encoding of the image signal using the optimized quantization matrix; wherein the approximate-expression estimating unit derives the first approximate expression and the second approximate expression in such a manner that each of a logarithm of the code amount and a logarithm of the encoding distortion is linearly approximated with respect to the selection parameter.