# US 2008/0187043 A1 · Method and apparatus for encoding/decoding image using adaptive quantization step

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0187043 A1
- Document ID: US20080187043A1
- Status: Published application
- Kind: A1
- Application number: 12/026,201
- Filed: 2008-02-05
- Published: 2008-08-07
- Earliest claimed: 2007-02-05
- Assignees: Samsung Electronics Co., Ltd.
- Inventors: Tae-gyoung AHN; Sung-kyu CHOI; Jae-hun LEE; Chang-su HAN
- Web page: https://patentgrep.com/patent/US20080187043A1

## CPC

- H04N 19/154: Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion (use of rate-distortion criteria H04N19/147)
- H04N 19/124: Quantisation
- H04N 19/139: Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
- H04N 19/14: Coding unit complexity, e.g. amount of activity or edge presence estimation (H04N19/146 takes precedence)
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/61: in combination with predictive coding
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method and apparatus for encoding and/or decoding an image are provided. The method of encoding an image includes: generating a prediction block that is an intra or inter prediction value of a current block; calculating a color difference between the current block and the generated prediction block; and, encoding the current block by adjusting a quantization step, based on the calculated color difference. In this way, color distortion in a restored image that can occur when a color of a current block is incorrectly predicted can be prevented.

## Claims

### Claim 1

A method of encoding an image comprising:
generating a prediction block that is an intra or inter prediction value of a current block;
calculating a color difference between the current block and the generated prediction block; and
encoding the current block by adjusting a quantization step, based on the calculated color difference.

### Claim 2 (depends on 1)

The method of claim 1, wherein the calculating a color difference comprises:
transforming Y, Cb, and Cr values of pixels included in the current block and the prediction block into Lab values; and
calculating a distance between the current block and the prediction block on an ab plane based on the transformed Lab values.

### Claim 3 (depends on 2)

The method of claim 2, wherein the calculating a distance comprises:
determining a position of the current block on the ab plane by obtaining an average of a values and b values from Lab values of the pixels included in the current block;
determining a position of the prediction block on the ab plane by obtaining an average of a values and b values from Lab values of the pixels included in the prediction block; and
calculating a distance between the current block and the prediction block on the ab plane, based on the determined position of the current block on the ab plane and the determined position of the prediction block on the ab plane.

### Claim 4 (depends on 1)

The method of claim 1, wherein the encoding the current block comprises:
generating a residue that is a difference value between the current block and the prediction block;
performing discrete cosine transform (DCT) of the generated residue; and
quantizing the coefficients generated as a result of the DCT transform according to the quantization step adjusted based on the calculated color difference.

### Claim 5 (depends on 4)

The method of claim 4, wherein the quantizing the coefficients comprises quantizing the coefficients by applying a quantization parameter (QP) adjusted based on the color difference.

### Claim 6 (depends on 4)

The method of claim 4, wherein the quantizing the coefficients comprises quantizing the coefficients by applying a quantization matrix adjusted based on the color difference.

### Claim 7

An apparatus for encoding an image comprising:
a prediction unit that generates a prediction block that is an intra or inter prediction value of a current block;
a control unit that calculates a color difference between the current block and the generated prediction block; and
an encoding unit that encodes the current block by adjusting a quantization step, based on the calculated color difference.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the control unit comprises:
a color coordinate transform unit that transforms Y, Cb, and Cr values of pixels included in the current block and prediction block into the Lab values; and
a difference determination unit that calculates a distance between the current block and the prediction block on an ab plane based on the transformed Lab values.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein the difference determination unit comprises:
a first position determination unit that determines a position of the current block on the ab plane by obtaining an average of a values and b values from Lab values of the pixels included in the current block;
a second position determination unit that determines a position of the prediction block on the ab plane by obtaining an average of a values and b values from Lab values of the pixels included in the prediction block; and
a difference calculation unit that calculates a distance between the current block and the prediction block on the ab plane, based on the determined position of the current block on the ab plane and the determined position of the prediction block on the ab plane.

### Claim 10 (depends on 7)

The apparatus of claim 7, wherein the encoding unit comprises:
a differential unit that generates a residue that is a difference value between the current block and the prediction block;
a transform unit that DCT transforms the generated residue; and
a quantization unit that quantizes the coefficients generated as a result of the DCT transform according to the quantization step adjusted based on the calculated color difference.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein the quantization unit quantizes the coefficients by applying a QP adjusted based on the color difference.

### Claim 12 (depends on 10)

The apparatus of claim 10, wherein the quantization unit quantizes the coefficients by applying a quantization matrix adjusted based on the color difference.

### Claim 13

A method of decoding an image comprising:
receiving a bitstream including data on a current block encoded by adjusting a quantization step based on a color difference, after a prediction block which is an intra or inter prediction value of the current block is generated and the color difference between the current block and the prediction block is calculated;
extracting the data on the current block and information on the adjusted quantization step from the received bitstream; and
inverse-quantizing the extracted data on the current block based on the information on the extracted quantization step.

### Claim 14 (depends on 13)

The method of claim 13, wherein the data on the current block is data on coefficients generated by DCT transforming a residue that is a difference value between the current block and the prediction block, and the information on the quantization step is information on a QP.

### Claim 15 (depends on 14)

The method of claim 14, wherein the inverse-quantizing of the data comprises multiplying the coefficients by the QP.

### Claim 16

An apparatus for decoding an image comprising:
an entropy decoding unit that receives a bitstream including data on a current block encoded by adjusting a quantization step based on a color difference, after a prediction block which is an intra or inter prediction value of the current block is generated and the color difference between the current block and the prediction block is calculated, and extracts the data on the current block and information on the adjusted quantization step from the received bitstream; and
an inverse quantization unit that inverse-quantizes the extracted data on the current block based on the information on the extracted quantization step.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the data on the current block is data on coefficients generated by DCT transforming a residue that is a difference value between the current block and the prediction block, and the information on the quantization step is information on a QP.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein the inverse-quantization unit multiplies the coefficients by the QP.

### Claim 19

A computer readable recording medium having embodied thereon a computer program for executing a method of decoding an image comprising:
receiving a bitstream including data on a current block encoded by adjusting a quantization step based on a color difference, after a prediction block which is an intra or inter prediction value of the current block is generated and the color difference between the current block and the prediction block is calculated;
extracting the data on the current block and information on the adjusted quantization step from the received bitstream; and
inverse-quantizing the extracted data on the current block based on the information on the extracted quantization step.
