TECHNICAL FIELD

The present invention relates to the encoding and decoding of an image and, more particularly, to a method of scanning residual signals.

BACKGROUND ART

Broadcast service having High Definition (HD) resolution (1280×1024 or 1920×1080) is extended nationwide and globally. Accordingly, many users are accustomed to video having high resolution and high picture quality. Accordingly, a lot of institutes are giving impetus to the development of the next-generation image device. Furthermore, as there is a growing interest in Ultra High Definition (UHD) having resolution 4 times higher than that of HDTV along with HDTV, moving image standardization organizations have become recognized a need for compression technology for an image having higher resolution and higher picture quality. Furthermore, there is an urgent need for a new standard which can maintain the same picture quality and also have many advantages in terms of a frequency band or storage through higher compression efficiency than that of H.264/AVC that is now used in HDTV, mobile phones, and Blue ray players.

Today, Moving Picture Experts Group (MPEG) and Video Coding Experts Group (VCEG) are jointly standardizing High Efficiency Video Coding (HEVC), that is, the next-generation video codec, and are aiming to encode an image including a UHD image with compression efficiency twice than that of H.264/AVC. This can provide an image having a lower frequency than and higher picture quality than a current image even in 3D broadcasting and a mobile communication network as well as HD and UHD images.

DISCLOSURE

Technical Problem

The present invention provides a method and apparatus for encoding and decoding an image, which are capable of improving encoding and decoding efficiency.

The present invention provides a method and apparatus for scanning residual signals, which are capable of improving encoding and decoding efficiency.

Technical Solution

In accordance with an aspect of the present invention, there is provided an image decoding method. The method includes deriving a scan type for the residual signals of a current block depending on whether or not the current block is a transform skip block and applying the scan type to the residual signals of the current block, wherein the transform skip block is the current block to which transform has not been applied and is specified based on information indicating whether or not to apply the transform to the current block.

The deriving of the scan type for the residual signals of the current block may include driving any one of a vertical scan, a horizontal scan, and an up-right scan as the scan type for the residual signals if the current block is a transform skip block.

The deriving of the scan type for the residual signals of the current block may include setting a scan type, derived based on an intra-prediction mode of the current block, as the scan type for the residual signals if the current block is a transform skip block.

A horizontal scan may be set again as the scan type for the residual signals if the scan type derived based on the intra-prediction mode of the current block is a vertical scan.

A vertical scan may be set again as the scan type for the residual signals if the scan type derived based on the intra-prediction mode of the current block is a horizontal scan.

An up-right scan may be set again as the scan type for the residual signals if the scan type derived based on the intra-prediction mode of the current block is not a vertical scan or a horizontal scan.

The deriving of the scan type for the residual signals of the current block may include deriving any one of a vertical scan, a horizontal scan, and an up-right scan as the scan type for the residual signals of the current block if the current block is a transform skip block and a size of the current block is a specific size or lower.

The specific size may be a 4×4 size.

The deriving of the scan type for the residual signals of the current block may include setting a scan type, deriving based on an intra-prediction mode of the current block, again if the current block is a transform skip block and a size of the current block is a specific size or lower.

A horizontal scan may be set again as the scan type for the residual signals if the scan type derived based on the intra-prediction mode of the current block is a vertical scan.

A vertical scan may be set again as the scan type for the residual signals if the scan type derived based on the intra-prediction mode of the current block is a horizontal scan.

An up-right scan may be set again as the scan type for the residual signals if the scan type derived based on the intra-prediction mode of the current block is not a vertical scan or a horizontal scan.

The specific size may be a 4×4 size.

The deriving of the scan type for the residual signals of the current block may include deriving the scan type for the residual signals of the current block based on an intra-prediction mode of the current block if the current block is not a transform skip block.

In accordance with another aspect of the present invention, there is provided an image decoding apparatus. The apparatus include a scan type deriving module for deriving a scan type for residual signals of a current block depending on whether or not the current block is a transform skip block and a scanning module for applying the scan type to the residual signals of the current block, wherein the transform skip block is the current block to which transform has not been applied and is specified based on information indicating whether or not to apply the transform to the current block.

In accordance with yet another aspect of the present invention, there is provided an image encoding method. The method includes deriving a scan type for residual signals of a current block depending on whether or not the current block is a transform skip block and applying the scan type to the residual signals of the current block, wherein the transform skip block is the current block to which transform has not been applied and is specified based on information indicating whether or not to apply the transform to the current block.

In accordance with further yet another aspect of the present invention, there is provided an image encoding apparatus. The apparatus includes a scan type deriving module for deriving a scan type for residual signals of a current block depending on whether or not the current block is a transform skip block and a scanning module for applying the scan type to the residual signals of the current block, wherein the transform skip block is the current block to which transform has not been applied and is specified based on information indicating whether or not to apply the transform to the current block.

Advantageous Effects

Since a transform process is not performed on a block to which a transform skip algorithm has been applied, a block on which an existing transform process has been performed and the transform skip block have different transform coefficient characteristics. Accordingly, encoding and decoding efficiency for residual signals can be improved by providing a method and apparatus for deriving a scan type, which are suitable for the characteristics of a transform skip block, not a transform coefficient scan method applied to a block on which an existing transform process has been performed.

