CPC H04N 19/126 (2014.11) [H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/18 (2014.11); H04N 19/91 (2014.11)] | 8 Claims |
1. An image encoding apparatus for encoding an image, comprising:
a prediction unit configured to generate, for a target block to be encoded, a predicted image, and obtain prediction errors that are a difference between the target block and the predicted image;
a transform unit configured to frequency-transform the prediction errors obtained by the prediction unit, to derive transform coefficients;
a quantization unit configured to quantize, using a quantization matrix, transform coefficients obtained by the transform unit; and
an encoding unit configured to entropy-encode quantized transform coefficients obtained by the quantization unit,
wherein the quantization matrix is a first quantization matrix for intra-prediction or a second quantization matrix for inter-prediction,
wherein in a case where the prediction unit generates the predicted image for the target block by performing right shift, by a predetermined number, of a result of adding at least (a) a result of a multiplication of a first value and an intra predicted sample value which is obtained by intra-prediction for the target block and (b) a result of a multiplication of a second value and an inter predicted sample value which is obtained by inter-prediction for the target block, the quantization unit uses the second quantization matrix for inter-prediction as the quantization matrix to be used to quantize the transform coefficients, and
wherein the first value and the second value are determined from a single weight value.
|