KR20140019012A - High definition video encoding/decoding method and apparatus - Google Patents

High definition video encoding/decoding method and apparatus Download PDF

Info

Publication number
KR20140019012A
KR20140019012A KR1020140000438A KR20140000438A KR20140019012A KR 20140019012 A KR20140019012 A KR 20140019012A KR 1020140000438 A KR1020140000438 A KR 1020140000438A KR 20140000438 A KR20140000438 A KR 20140000438A KR 20140019012 A KR20140019012 A KR 20140019012A
Authority
KR
South Korea
Prior art keywords
block
transform
filtering
quantization
image
Prior art date
Application number
KR1020140000438A
Other languages
Korean (ko)
Other versions
KR101575634B1 (en
Inventor
김수년
임정연
이영렬
문주희
전병우
김해광
서정훈
김기오
홍성욱
Original Assignee
에스케이텔레콤 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Priority to KR1020140000438A priority Critical patent/KR101575634B1/en
Publication of KR20140019012A publication Critical patent/KR20140019012A/en
Application granted granted Critical
Publication of KR101575634B1 publication Critical patent/KR101575634B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention relates to a method and an apparatus for encoding/decoding high-definition video. The present invention provides an image encoding method characterized by predicting a current block to generate a prediction block, subtracting the prediction block from the current block to generate a residual block, determining types of transform and quantization depending on the block type of the current block, transforming and quantizing the residual block according to the determined types of transform and quantization, and encoding the transformed and quantized residual block. According to the present invention, the encoding can be performed using high correlation of temporally/spatially neighboring pixels shown on an image, thereby improving the encoding efficiency. Further, the block distortion can be reduced, thereby improving the compression efficiency. Further, the number of times the filtering is performed can be decreased, thereby reducing the degree of complexity of the apparatus for encoding/decoding an image. [Reference numerals] (AA) Filtering when various types of transform and quantization are applied according to an embodiment of the present invention; (B1, B2, B5, B6, B18, B16, B17, B24, B27) 16 X 16 transform; (B10, B11, B23, B25, B26) 16 X 8 transform; (B12, B13, B14, B15) 4 X 8 transform; (B18, B20, B21, B22) 16 X 16 transform; (B28) 32 X 16 transform; (B3, B4, B9) 32 X 8 transform; (B7, B8) 8 X 16 transform

Description

고해상도 동영상의 부호화/복호화 방법 및 장치{High Definition Video Encoding/Decoding Method and Apparatus}High Definition Video Encoding / Decoding Method and Apparatus

본 발명은 고해상도 영상 부호화/복호화 방법 및 장치에 관한 것이다. 더욱 상세하게는, 다양한 형태의 블록 단위로 부호화 및 복호화를 수행하고 그에 적합한 블록 형태로 변환, 양자화, 스캐닝, 필터링을 수행함으로써 부호화 효율을 향상시키기 위한 방법 및 장치에 관한 것이다.The present invention relates to a high resolution image encoding / decoding method and apparatus. More specifically, the present invention relates to a method and apparatus for improving coding efficiency by performing encoding and decoding on a block basis of various types, and performing transformation, quantization, scanning, and filtering on a block type suitable for the same.

MPEG(Moving Picture Experts Group)과 VCEG(Video Coding Experts Group)은 기존의 MPEG-4 Part 2와 H.263 표준안보다 더욱 우수하고 뛰어난 비디오 압축 기술을 개발하였다. 이 새로운 표준안은 H.264/AVC(Advanced video Coding)이라 호칭하고 MPEG-4 Part 10 AVC와 ITU-T Recommendation H.264로 공동 발표되었다. H.264/AVC(이하 'H.264'로 약칭함) 표준안에서는 다양한 형태의 서브블록(Subblock)을 가지는 매크로블록(Macroblock) 단위로 인트라 예측/인터 예측(Intra Prediction/Inter Prediction)을 수행하여 잔차 신호(Residual Signal)를 생성하며, 생성된 잔차 신호를 변환(Transform)하고 양자화(Quantization)한 후 부호화하여 부호화된 데이터의 비트수를 더욱 줄일 수 있다.The Moving Picture Experts Group (MPEG) and the Video Coding Experts Group (VCEG) have developed superior video compression techniques that are superior to the existing MPEG-4 Part 2 and H.263 standards. This new standard was called H.264 / AVC (Advanced Video Coding) and jointly announced as MPEG-4 Part 10 AVC and ITU-T Recommendation H.264. In the H.264 / AVC (abbreviated as 'H.264') standard, intra prediction / inter prediction is performed in units of macroblocks having various types of subblocks. The residual signal may be generated, and the generated residual signal may be transformed, quantized, and encoded to further reduce the number of bits of the encoded data.

통상적인 매크로블록 단위의 부호화 과정을 부호화기 측면에서 살펴 보면, 입력 영상을 매크로블록 단위로 나누고, 각 매크로블록에 대해서 인터 모드(Inter Mode) 또는 인트라 모드(Intra Mode)에 따라 가질 수 있는 서브블록의 크기로 예측을 수행하여 잔차 블록(Residual Block)을 생성하며, 생성된 잔차 블록은 4x4 또는 8x8 단위의 이산 코사인 변환(DCT: Discrete Cosine Transform)을 기반으로 설계된 정수 변환(Integer Transform)을 적용하여 변환 계수(Transform Coefficient)를 생성하며, 변환 계수를 다시 주어진 양자화 계수(QP: Quantization Parameter)에 따라 양자화한다. 그리고 변환 과정 및 양자화 과정으로 인하여 발생하는 블록화 현상을 루프 필터링(Loop Filtering)을 통해 줄인다.Referring to the encoding process of a conventional macroblock unit from the encoder side, the input image is divided into macroblock units, and each macroblock is divided into subblocks that may have an inter mode or an intra mode. A residual block is generated by performing prediction by magnitude, and the generated residual block is transformed by applying an integer transform designed based on a Discrete Cosine Transform (DCT) of 4x4 or 8x8 units. A transform coefficient is generated, and the transform coefficient is quantized according to a given quantization parameter (QP). Blocking caused by the transform process and the quantization process is reduced through loop filtering.

H.264와 같은 통상적인 영상 압축 기술에서는 부호화 할 영상을 16x16 매크로블록 단위로 나누어 부호화를 수행하며, 변환의 단위도 4x4 블록 크기, 8x8 블록 크기로 고정되어 있어서, 화소간에 높은 상관성을 가지는 영상의 경우 부호화 효율이 저하되는 문제점이 있다. 즉, 화소간에 높은 상관성을 가지는 경우 16x16 블록 크기의 매크로블록보다 큰 매크로블록 단위 또는 다양한 형태의 매크로블록 단위로 예측하는 것이 효율적일 수 있으며, 그에 따라 변환 단위도 4x4 블록 크기 또는 8x8 블록 크기가 아닌 다양한 형태로 예측하는 것이 효율적일 수 있으나, 통상적인 영상 압축 기술에서는 매크로블록의 크기와 변환의 크기가 고정되어 있어 영상의 특성에 따라 적응적인 부호화가 불가능하여 부호화 효율이 저하되는 문제점이 있다.In a typical image compression technique such as H.264, encoding is performed by dividing an image to be encoded into 16x16 macroblock units, and a unit of transformation is also fixed to 4x4 block size and 8x8 block size, so that the image having high correlation between pixels In this case, there is a problem that the coding efficiency is lowered. That is, when there is a high correlation between pixels, it may be more efficient to predict macroblock units or macroblock units of various types than macroblocks having a 16x16 block size. Although it may be efficient to predict the shape, the conventional video compression technique has a problem in that the encoding efficiency is deteriorated because the size of the macroblock and the size of the transform are fixed, so that adaptive encoding is impossible according to the characteristics of the image.

전술한 문제점을 해결하기 위해 본 발명은, 고해상도 영상에 적합한 다양한 형태의 매크로블록 단위로 부호화를 수행하고, 그에 상응하는 다양한 형태의 예측, 변환 및 양자화, 스캐닝, 필터링 등을 수행하여 압축 효율을 향상시키는 데 주된 목적이 있다.In order to solve the above problems, the present invention performs encoding in units of macroblocks of various types suitable for high resolution images, and improves compression efficiency by performing various types of prediction, transformation and quantization, scanning, and filtering corresponding thereto. Has a main purpose.

전술한 목적을 달성하기 위해 본 발명은, 영상을 부호화하는 방법에 있어서, 현재 블록을 예측하여 예측 블록을 생성하는 단계; 현재 블록과 예측 블록을 감산하여 잔여 블록을 생성하는 단계; 현재 블록의 블록 타입에 따라 변환 및 양자화 타입을 결정하고, 결정된 변환 및 양자화 타입에 따라 잔여 블록을 변환 및 양자화하는 단계; 및 변환 및 양자화된 잔여 블록을 부호화하는 단계를 포함하는 것을 특징으로 하는 영상 부호화 방법을 제공한다.In order to achieve the above object, the present invention provides a method of encoding an image, the method comprising: generating a prediction block by predicting a current block; Generating a residual block by subtracting a current block from a prediction block; Determining a transform and quantization type according to the block type of the current block, and transforming and quantizing the residual block according to the determined transform and quantization type; And encoding the transformed and quantized residual block.

또한, 본 발명의 다른 목적에 의하면, 영상을 부호화하는 장치에 있어서, 현재 블록을 예측하여 예측 블록을 생성하는 예측기; 현재 블록과 예측 블록을 감산하여 잔여 블록을 생성하는 감산기; 현재 블록의 블록 타입에 따라 변환 및 양자화 타입을 결정하고, 결정된 변환 및 양자화 타입에 따라 잔여 블록을 변환 및 양자화하는 변환기 및 양자화기; 및 변환 및 양자화된 잔여 블록을 부호화하는 부호화기를 포함하는 것을 특징으로 하는 영상 부호화 장치를 제공한다.According to another object of the present invention, there is provided an apparatus for encoding an image, comprising: a predictor for predicting a current block to generate a predicted block; A subtractor for subtracting a current block from a prediction block to generate a residual block; A converter and quantizer for determining a transform and quantization type according to the block type of the current block, and for transforming and quantizing a residual block according to the determined transform and quantization type; And an encoder for encoding the transformed and quantized residual blocks.

또한, 본 발명의 다른 목적에 의하면, 영상을 복호화하는 방법에 있어서, 부호화 데이터를 복호화하여 변환 및 양자화된 잔여 블록을 복원하는 단계; 변환 및 양자화된 잔여 블록을 변환 및 양자화 타입에 따라 역 양자화 및 역 변환하여 잔여 블록을 복원하는 단계; 현재 블록을 예측하여 예측 블록을 생성하는 단계; 및 복원되는 잔여 블록과 예측 블록을 가산하여 현재 블록을 복원하는 단계를 포함하는 것을 특징으로 하는 영상 복호화 방법을 제공한다.According to another object of the present invention, there is provided a method of decoding an image, the method comprising: restoring a transformed and quantized residual block by decoding encoded data; Inverse quantization and inverse transformation on the transformed and quantized residual blocks according to the transform and quantization type to recover the residual block; Predicting a current block to generate a predicted block; And restoring a current block by adding a residual block and a prediction block to be reconstructed.

또한, 본 발명의 또 다른 목적에 의하면, 영상을 복호화하는 장치에 있어서, 부호화 데이터를 복호화하여 변환 및 양자화된 잔여 블록을 복원하는 복호화기; 변환 및 양자화된 잔여 블록을 변환 및 양자화 타입에 따라 역 양자화 및 역 변환하여 잔여 블록을 복원하는 역 양자화기 및 역 변환기; 현재 블록을 예측하여 예측 블록을 생성하는 예측기; 및 복원되는 잔여 블록과 예측 블록을 가산하여 현재 블록을 복원하는 가산기를 포함하는 것을 특징으로 하는 영상 복호화 장치를 제공한다.According to still another object of the present invention, there is provided an apparatus for decoding an image, comprising: a decoder configured to decode encoded data to restore a transformed and quantized residual block; An inverse quantizer and an inverse transformer for reconstructing the residual block by inverse quantization and inverse transformation on the transformed and quantized residual block according to the transform and quantization type; A predictor for predicting a current block to generate a predicted block; And an adder for adding a residual block to be reconstructed and a prediction block to reconstruct a current block.

이상에서 설명한 바와 같이 본 발명에 의하면, 영상에서 나타나는 시간적/공간적으로 인접한 화소들의 높은 상관성을 이용한 부호화를 수행할 수 있어 부호화 효율을 높일 수 있을 뿐만 아니라, 블록 왜곡을 감소시켜 압축 효율을 향상시킬 수 있으며, 필터링의 수행 회수를 줄일 수 있어 영상의 부호화 및 복호화를 위한 장치의 구현 복잡도를 낮출 수 있다.As described above, according to the present invention, encoding can be performed using a high correlation between temporally and spatially adjacent pixels appearing in an image, thereby increasing encoding efficiency and reducing block distortion to improve compression efficiency. In addition, since the number of times of filtering may be reduced, the complexity of implementing the apparatus for encoding and decoding an image may be reduced.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치의 구성을 간략하게 나타낸 블록 구성도,
도 2 내지 도 4는 통상적인 영상 부호화에서 이용되는 매크로블록 타입에 따른 인트라 예측 모드를 나타낸 예시도,
도 5는 통상적인 영상 부호화에서 이용되는 매크로블록 타입에 따른 인터 예측 모드를 나타낸 예시도,
도 6은 본 발명의 일 실시예에 따른 MxN 블록 크기의 매크로블록을 나타낸 예시도,
도 7은 본 발명의 일 실시예에 따른 MxN 블록 크기의 매크로블록이 가질 수 있는 다양한 종류의 서브 매크로블록을 나타낸 예시도,
도 8은 본 발명의 일 실시예에 따른 8x4 변환에 대한 MF를 나타내는 예시도,
도 9는 본 발명의 일 실시예에 따라 다양한 변환 및 양자화 타입이 적용된 경우의 필터링을 설명하기 위한 예시도,
도 10 본 발명의 일 실시예에 따라 블록 경계에 디블로킹 필터링하는 과정을 설명하기 위한 예시도,
도 11은 본 발명의 일 실시예에 따라 디링잉 필터링을 수행하는 과정을 설명하기 위한 예시도,
도 12는 본 발명의 일 실시예에 따른 변환 및 양자화 타입에 따른 스캐닝 순서를 나타낸 예시도,
도 13 내지 도 18은 본 발명의 일 실시예에 따른 변환 및 양자화 타입에 따른 CAVLC 적용 방법을 설명하기 위한 예시도,
도 19는 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 순서도,
도 20은 본 발명의 일 실시예에 따른 영상 복호화 장치를 간략하게 나타낸 블록 구성도,
도 21은 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 순서도이다.
1 is a block diagram schematically illustrating a configuration of an image encoding apparatus according to an embodiment of the present invention;
2 to 4 are exemplary diagrams illustrating an intra prediction mode according to a macroblock type used in conventional video encoding.
5 is an exemplary diagram illustrating an inter prediction mode according to a macroblock type used in conventional video encoding;
6 is an exemplary view showing a macroblock of an MxN block size according to an embodiment of the present invention;
FIG. 7 is an exemplary diagram illustrating various types of sub macroblocks that a macroblock of an MxN block size may have according to an embodiment of the present invention; FIG.
8 is an exemplary diagram illustrating MF for 8x4 transform according to an embodiment of the present invention;
9 is an exemplary diagram for describing filtering when various transform and quantization types are applied according to an embodiment of the present invention;
10 is a diagram illustrating a process of deblocking filtering on a block boundary according to an embodiment of the present invention.
11 is an exemplary diagram for explaining a process of performing de-ring filtering according to an embodiment of the present invention;
12 is an exemplary view showing a scanning order according to a transform and quantization type according to an embodiment of the present invention;
13 to 18 are exemplary diagrams for explaining a CAVLC application method according to a transform and quantization type according to an embodiment of the present invention;
FIG. 19 is a flowchart illustrating an image encoding method according to an embodiment of the present invention. FIG.
20 is a block diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention;
21 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail with reference to exemplary drawings. It should be noted that, in adding reference numerals to the constituent elements of the drawings, the same constituent elements are denoted by the same reference symbols as possible even if they are shown in different drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.

또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are intended to distinguish the constituent elements from other constituent elements, and the terms do not limit the nature, order or order of the constituent elements. When a component is described as being "connected", "coupled", or "connected" to another component, the component may be directly connected or connected to the other component, Quot; may be "connected," "coupled," or "connected. &Quot;

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치의 구성을 간략하게 나타낸 블록 구성도이다.1 is a block diagram schematically illustrating a configuration of an image encoding apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 부호화 장치(100)는 영상을 부호화하는 장치로서, 예측기(Predictor, 110), 감산기(Subtracter, 120), 변환기 및 양자화기(Transformer and Quantizer, 130), 스캐너(Scanner, 140), 부호화기(Encoder, 150), 역 양자화기 및 역 변환기(Inverse Quantizer and Transformer, 160), 가산기(Adder, 170) 및 필터(Filter, 180)를 포함하여 구성될 수 있다. 이러한 영상 부호화 장치(100)는 개인용 컴퓨터(PC: Personal Computer), TV, 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 이동통신 단말기(Mobile Communication Terminal) 등 일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리, 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비 하는 다양한 장치를 의미한다.The image encoding apparatus 100 according to an embodiment of the present invention is an apparatus for encoding an image, and includes a predictor 110, a subtracter 120, a transformer and quantizer 130, and a scanner. The scanner 140 may include an encoder 150, an inverse quantizer and a transformer 160, an adder 170, and a filter 180. The video encoding apparatus 100 may be a personal computer (PC), a TV, a notebook computer, a personal digital assistant (PDA), a portable multimedia player (PMP), or a PlayStation Portable (PSP). PlayStation Portable), a mobile communication terminal, and the like, a communication device such as a communication modem for communicating with various devices or a wired / wireless communication network, a memory for storing various programs and data for encoding an image, Means a variety of devices including a microprocessor for executing and operating a program.

부호화하고자 하는 입력 영상은 블록 단위로 입력될 수 있는데, 블록은 매크로블록(Macroblock)이 될 수 있다. 본 발명의 일 실시예에서 매크로블록의 형태는 MxN 일 수 있다. 여기서, M과 N은 2n(단, n은 1 이상의 정수임)의 값을 가지는 정수일 수 있는데, 특히 M과 N은 16보다 크거나 동일한 정수일 수 있다. 또한, 부호화할 프레임마다 다른 형태의 블록을 이용할 수 있으며, 이에 대한 정보인 블록 타입에 대한 정보를 각 프레임마다 부호화하여, 영상 복호화 장치에서 부호화된 데이터를 복호화할 때 복호화할 프레임의 블록의 형태를 결정하도록 할 수 있다. 어떠한 형태의 블록을 이용할지에 대한 결정은 현재 프레임을 다양한 형태의 블록으로 부호화하여 최적의 효율을 내는 블록의 형태를 선택하거나, 프레임의 특성을 분석하여 분석된 특성에 따라 블록의 형태를 선택할 수 있다. 예를 들면, 프레임의 영상이 가로 방향의 상관성이 높으면 가로 방향으로 긴 형태의 블록이 선택될 수 있고, 세로 방향의 상관성이 높으면 세로 방향으로 긴 형태의 블록이 선택될 수 있다.The input image to be encoded may be input in units of blocks, and the block may be a macroblock. In an embodiment of the present invention, the shape of the macroblock may be M × N. Here, M and N may be an integer having a value of 2 n (where n is an integer of 1 or more), in particular M and N may be an integer greater than or equal to 16. In addition, a different type of block may be used for each frame to be encoded, and information about a block type, which is information about the frame type, may be encoded for each frame to determine a form of a block of a frame to be decoded when the image decoding apparatus decodes the encoded data. You can decide. Determination of which type of block to use can be made by selecting the type of block that has the best efficiency by encoding the current frame into various types of blocks, or by selecting the type of block according to the analyzed characteristics by analyzing the characteristics of the frame. have. For example, if the image of the frame has a high correlation in the horizontal direction, a block having a long shape in the horizontal direction may be selected, and if the image has a high correlation in the vertical direction, a block having a long shape in the vertical direction may be selected.

이를 위해, 영상 부호화 장치(100)는 블록 타입을 결정하고 블록 타입에 대한 정보를 부호화하여 부호화 데이터에 포함시키는 블록 타입 결정기(미도시)를 추가로 포함하여 구성될 수 있다.To this end, the image encoding apparatus 100 may further include a block type determiner (not shown) that determines the block type and encodes information about the block type in the encoded data.

예측기(110)는 입력 영상에서 현재 부호화하고자 하는 블록(이하에서는 '현재 블록(Current Block)'라 칭함)을 예측하여 예측 블록(Predicted Block)을 생성한다. 즉, 예측기(110)는 인트라 예측(Intra Prediction) 또는 인터 예측(Inter Prediction) 등을 이용하여 입력 영상에서 현재 블록을 예측함으로써 예측 화소값(Predicted Pixel Value)을 각 화소의 화소값으로 가지는 예측 블록을 생성한다.The predictor 110 generates a predicted block by predicting a block to be currently encoded (hereinafter, referred to as a current block) in the input image. That is, the predictor 110 predicts a current block from an input image by using intra prediction or inter prediction, and has a predicted pixel value as a pixel value of each pixel. Create

이때, 예측 화소값을 최적화하기 위해, 필요에 따라 블록은 더 작은 형태의 블록으로 나뉘어져 예측될 수 있다. 즉, 블록으로부터 분할된 서브블록(Subblock) 단위로 예측 블록이 생성될 수 있다. 여기서, 블록은 전술한 바와 같이 정사각형 혹은 직사각형 형태를 가지는 MxN 형태의 블록일 수 있으며, 서브블록은 블록(또는 매크로블록)의 크기를 넘어서지 않는 범위 내에서 가로와 세로 각각 2n 크기를 가지는 QxP 형태의 블록일 수 있다.In this case, in order to optimize the predicted pixel value, the block may be divided into smaller blocks and predicted as necessary. That is, the prediction block may be generated in units of subblocks divided from the blocks. Herein, the block may be an MxN block having a square or rectangular shape as described above, and the subblock may have a QxP shape having a size of 2 n horizontally and vertically within a range not exceeding the size of the block (or macroblock). It may be a block of.

감산기(120)는 현재 블록에서 예측 블록을 감산하여 잔여 블록(Residual Block)을 생성한다. 즉, 감산기(120)는 현재 블록의 각 화소의 원 화소값 (Original Pixel Value)과 예측 블록의 각 화소의 예측 화소값의 차이값을 계산하여 잔여 신호(Residual Signal)를 가지는 잔여 블록을 생성한다.The subtractor 120 subtracts the prediction block from the current block to generate a residual block. That is, the subtractor 120 calculates a difference value between an original pixel value of each pixel of the current block and a predicted pixel value of each pixel of the prediction block to generate a residual block having a residual signal. .

변환기 및 양자화기(130)는 현재 블록의 블록 타입에 따라 변환 및 양자화 타입을 결정하고, 결정된 변환 및 양자화 타입에 따라 잔여 블록을 변환 및 양자화한다. 즉, 변환기 및 양자화기(130)는 잔여 블록의 잔여 신호를 주파수 영역(Frequency Domain)으로 변환하여 변환 계수(Transform Coefficient)를 가지는 잔여 블록을 생성하고 양자화하여 양자화된 변환 계수를 가지는 변환 및 양자화된 잔여 블록(Transformed and Quantized Residual Block)을 생성한다.The transformer and quantizer 130 determines a transform and quantization type according to the block type of the current block, and transforms and quantizes the residual block according to the determined transform and quantization type. That is, the transformer and quantizer 130 transforms the residual signal of the residual block into a frequency domain to generate and quantize a residual block having a transform coefficient, and transform and quantize the quantized transform coefficient. Create a residual and transformed block.

변환기 및 양자화기(130)가 잔여 블록을 변환 및 양자화할 때, 양자화 과정에 변환 과정이 포함되어 있기 때문에 양자화가 완료되어야만 변환도 완료된다. 여기서, 변환 방식으로는 하다마드 트랜스폼(Hadamard Transform), 이산 코사인 트랜스폼 기반의 정수 변환(Discrete Cosine Transform Based Integer Transform, 이하 '정수 변환'이라고 약칭함) 등과 같은 공간 영역의 영상 신호를 주파수 영역으로 변환하는 기법이 이용될 수 있으며, 양자화 방식으로는 데드존 균일 경계 양자화(DZUTQ: Dead Zone Uniform Threshold Quantization, 이하 'DZUTQ'라 칭함) 또는 양자화 가중치 매트릭스(Quantization Weighted Matrix) 등과 같은 다양한 양자화 기법이 이용될 수 있다.When the transformer and the quantizer 130 transform and quantize the residual block, the transformation is completed only when the quantization is completed because the transformation process is included in the quantization process. In this case, the video signal in the spatial domain, such as Hadamard Transform, Discrete Cosine Transform Based Integer Transform (hereinafter abbreviated as 'Integer Transform'), is used for the frequency domain. A quantization scheme may be used, and various quantization techniques such as Dead Zone Uniform Threshold Quantization (DZUTQ) or Quantization Weighted Matrix (DZUTQ) may be used. Can be used.

또한, 변환 및 양자화 타입은 현재 블록의 크기를 초과하지 않는 범위 내에서 PxQ 블록 크기의 변환 및 양자화와 같이 다양하게 변형될 수 있다. 여기서, PxQ 블록 크기의 변환 및 양자화는 통상적인 4x4 블록 크기의 변환 및 양자화와 8x8 블록 크기의 변환 및 양자화에 추가로 MxN 블록 크기의 현재 블록이 가질 수 있는 서브블록 크기의 변환 및 양자화일 수 있다.In addition, the transform and quantization type may be variously modified such as transform and quantization of the PxQ block size within a range not exceeding the size of the current block. Here, the transform and quantization of the PxQ block size may be a transform and quantization of a subblock size that a current block having an MxN block size may have in addition to the transform and quantization of a 4x4 block size and the transform and quantization of an 8x8 block size. .

이를 위해, 변환기 및 양자화기(130)는 현재 블록의 블록 타입에 따라 변환 및 양자화 타입을 결정하여 잔여 블록을 변환 및 양자화할 수 있다. 이때, 현재 블록의 블록 타입이 인트라 블록 타입인 경우, 변환 및 양자화 타입을 인트라 블록 타입의 블록 크기와 동일하게 결정할 수 있으며, 현재 블록의 블록 타입이 인터 블록 타입인 경우, 부호화 비용을 이용하여 복수 개의 변환 및 양자화 타입 중 하나의 변환 및 양자화 타입을 결정할 수 있다. 여기서, 복수 개의 변환 및 양자화 타입은 서브블록의 블록 크기와 동일한 변환 및 양자화 타입일 수 있지만 이뿐만 아니라 다른 다양한 블록 크기를 가지는 변환 및 양자화 타입이 될 수도 있다. 변환 및 양자화기(130)가 잔여 블록을 변환 및 양자화하는 과정에 대해서는 후술하는 과정에서 상세히 설명한다.To this end, the converter and quantizer 130 may transform and quantize the residual block by determining a transform and quantization type according to the block type of the current block. In this case, when the block type of the current block is an intra block type, the transform and quantization type may be determined to be the same as the block size of the intra block type, and when the block type of the current block is an inter block type, a plurality of encoding may be performed using an encoding cost. One of the transform and quantization types may be determined. Here, the plurality of transform and quantization types may be the same transform and quantization type as the block size of the subblock, but may also be a transform and quantization type having other various block sizes. A process of transforming and quantizing the residual block by the transform and quantizer 130 will be described in detail later.

여기서, 현재 블록이란 영상 부호화 장치(100)에서 현재 부호화하고자 하는 블록을 말한다. 블록 타입이란 블록을 부호화하는 방식과 블록 크기를 지정하는 블록의 유형으로서, 인트라 블록 타입과 인터 블록 타입으로 분류될 수 있다. 인트라 블록 타입은 다시 인트라 4x4 블록 타입, 인트라 8x8 블록 타입, 인트라 16x16 블록 타입으로 세부적으로 나누어질 수 있으며, 이외에도 인트라 32x32 블록 타입, 인트라 16x32 블록 타입 등 다양한 인트라 블록 타입으로 나누어질 수 있다. 인터 블록 타입은 인터 4x4 블록 타입, 인터 8x4 블록 타입, 인터 4x8 블록 타입, 인터 8x8 블록 타입, 인터 8x16 블록 타입, 인터 16x8 블록 타입, 인터 16x16 블록 타입 등으로 세부적으로 나누어 질 수 있으며, 이외에도 인터 32x16 블록 타입, 인터 16x32 블록 타입, 인터 32x32 블록 타입 등 다양한 인터 블록 타입으로 나누어질 수 있다.Here, the current block refers to a block to be currently encoded by the video encoding apparatus 100. A block type is a type of a block specifying a method of encoding a block and a block size, and may be classified into an intra block type and an inter block type. The intra block type may be further divided into an intra 4x4 block type, an intra 8x8 block type, an intra 16x16 block type, and may be further divided into various intra block types such as an intra 32x32 block type and an intra 16x32 block type. The inter block type can be divided into inter 4x4 block type, inter 8x4 block type, inter 4x8 block type, inter 8x8 block type, inter 8x16 block type, inter 16x8 block type, inter 16x16 block type, and the like. It can be divided into various inter block types such as block type, inter 16x32 block type, inter 32x32 block type.

스캐너(140)는 변환기 및 양자화기(130)에 의해 변환 및 양자화된 잔여 블록의 양자화 변환 계수들을 스캐닝(Scanning)하여 양자화 변환 계수열을 생성한다. 이때, 스캐닝 방식은 변환 기법, 양자화 기법, 블록(매크로블록 또는 서브블록)의 특성을 고려하며, 스캐닝 순서는 스캐닝한 양자화 변환 계수열이 최소의 길이가 되도록 결정된다. 도 1에서는 스캐너(140)가 부호화기(150)와 독립적으로 구현되는 것으로 도시하고 설명하지만, 스캐너(140)는 생략되어 그 기능이 부호화기(150)에 통합될 수 있다.The scanner 140 scans the quantized transform coefficients of the residual block transformed and quantized by the transformer and quantizer 130 to generate a quantized transform coefficient sequence. In this case, the scanning method considers characteristics of a transform technique, a quantization technique, and a block (macroblock or subblock), and the scanning order is determined so that the scanned quantization transform coefficient sequence has a minimum length. In FIG. 1, the scanner 140 is illustrated and described as being implemented independently of the encoder 150, but the scanner 140 may be omitted, and its function may be integrated into the encoder 150.

부호화기(150)는 변환 및 양자화된 잔여 블록을 부호화하여 부호화 데이터를 생성한다. 즉, 부호화기(150)는 변환기 및 양자화기(130)에 의해 변환 및 양자화된 잔여 블록의 양자화 변환 계수들을 스캔하여 생성되는 양자화 변환 계수열을 부호화하여 부호화 데이터를 생성하거나 스캐너(140)에 의해 스캔되어 생성되는 양자화 변환 계수열을 부호화하여 부호화 데이터를 생성한다.The encoder 150 encodes the transformed and quantized residual block to generate encoded data. That is, the encoder 150 generates encoded data by encoding the quantized transform coefficient string generated by scanning the quantized transform coefficients of the residual block transformed and quantized by the transformer and the quantizer 130, or scans by the scanner 140. The encoded quantized transform coefficient sequence is generated to generate encoded data.

이러한 부호화 기술로서는 엔트로피 부호화(Entropy Encoding) 기술이 이용될 수 있으나, 반드시 이에 한정하지 않고 다른 다양한 부호화 기술이 사용될 수도 있을 것이다. 또한, 부호화기(150)는 양자화 변환 계수열을 부호화한 비트열뿐만 아니라 부호화된 비트열을 복호화하는 데 필요한 다양한 정보들을 부호화 데이터에 포함시킬 수 있다. 여기서, 부호화된 비트열을 복호화하는 데 필요한 다양한 정보들이란 블록 타입에 대한 정보, 예측 모드가 인트라 예측 모드인 경우에는 인트라 예측 모드에 대한 정보, 예측 모드가 인터 예측 모드인 경우에는 움직임 벡터에 대한 정보, 변환 및 양자화 타입에 대한 정보 등이 될 수 있지만, 이외의 다양한 정보들이 될 수도 있다.As the encoding technique, an entropy encoding technique may be used, but various encoding techniques may be used without being limited thereto. In addition, the encoder 150 may include not only a bit string encoding the quantized transform coefficient sequence but also various pieces of information necessary to decode the encoded bit sequence in the encoded data. Here, the various pieces of information necessary to decode the encoded bit strings include information about a block type, information about an intra prediction mode when the prediction mode is an intra prediction mode, and information about a motion vector when the prediction mode is an inter prediction mode. Information, information on transform and quantization types, and the like, but also various other information.

역 양자화기 및 역 변환기(160)는 변환기 및 양자화기(130)에 의해 변환 및 양자화된 잔여 블록을 역 양자화(Inverse Quantization)하고 역 변환(Inverse Transform)하여 잔여 블록을 복원(Reconstruction)한다. 역 양자화와 역 변환은 변환기 및 양자화기(130)가 수행한 변환 과정과 양자화 과정을 역으로 수행함으로써 이루어질 수 있다. 즉, 역 양자화기 및 역 변환기(160)는 변환기 및 양자화기(140)로부터 전달되는 변환 및 양자화에 관한 정보(예를 들어, 변환 및 양자화 타입에 대한 정보)를 이용하여 변환기 및 양자화기(130)가 변환 및 양자화한 방식을 역으로 수행하여 역 양자화 및 역 변환을 수행할 수 있다.The inverse quantizer and inverse transformer 160 inverse quantizes and inverse transforms the residual block transformed and quantized by the transformer and quantizer 130 to reconstruct the residual block. Inverse quantization and inverse transformation may be performed by inversely performing a transform process and a quantization process performed by the transformer and quantizer 130. That is, inverse quantizer and inverse transformer 160 use transform and quantization information transmitted from transformer and quantizer 140 (eg, information about the type of transform and quantization) to transform and quantizer 130. Inverse transformation and quantization may be performed inversely to perform inverse quantization and inverse transformation.

가산기(170)는 예측기(110)에 의해 예측된 예측 블록과 역 양자화 및 역 변환기(170)에 의해 역 양자화 및 역 변환된 잔여 블록을 가산하여 현재 블록을 복원한다.The adder 170 reconstructs the current block by adding the prediction block predicted by the predictor 110 and the residual block inversely quantized and inversely transformed by the inverse quantization and inverse transformer 170.

필터(180)는 가산기(170)에 의해 복원되는 현재 블록을 필터링(Filtering)한다. 이때, 필터(180)는 영상의 블록 단위의 변환 및 양자화에 의해 블록 경계에서 발생하는 블록화 현상(Blocking Effects)과 양자화 과정에서 고주파 손실로 인해 영상의 에지(Edge) 주변에서 발생하는 링잉 노이즈(Ringing Noise)를 감소시킨다. 여기서, 블록화 현상과 링잉 노이즈를 감소시키기 위해 각각 디블록킹 필터(Deblocking Filter)와 디링잉 필터(Deringing Filter)가 이용될 수 있는데, 디블록킹 필터와 디링잉 필터 두 가지 모두를 이용하는 방법, 두 가지 중 한 가지 필터만을 이용하는 방법, 두 가지 모두를 이용하지 않는 방법 중 하나를 선택적으로 이용할 수 있다. 또한, 디블록킹 필터링은 서브블록 간의 경계와 매크로블록 간의 경계에 필터를 적용하거나 매크로블록 간의 경계에만 필터를 적용하는 방법 중 하나를 선택적으로 이용할 수 있다.The filter 180 filters the current block restored by the adder 170. In this case, the filter 180 is a ringing effect occurring at a block boundary due to block-by-block transformation and quantization of an image, and ringing noise generated around an edge of the image due to high frequency loss during quantization. Reduce noise. Here, a deblocking filter and a deringing filter may be used to reduce the blocking phenomenon and the ringing noise, respectively. Among the two methods, a deblocking filter and a deringing filter may be used. You can optionally choose to use only one filter, or not both. In addition, the deblocking filtering may selectively use one of applying a filter to a boundary between subblocks and a macroblock or applying a filter only to a boundary between macroblocks.

한편, 통상적인 영상 부호화에서, 영상 부호화를 위해 사용되는 매크로블록의 형태는 가로, 세로가 동일한 16x16 화소이며, 각 매크로블록에 대해 인트라 예측 및 인터 예측 중 하나 이상이 수행되어 예측 블록이 생성될 수 있다. 매크로블록 단위로 영상을 부호화하는 것은 영상의 지역적인 특성을 고려한 효율적인 부호화가 가능하기 때문에 널리 사용되고 있는 부호화 방법이다. 그리고 예측 블록을 생성하기 위해 다양한 방법의 인트라 예측 또는 인터 예측을 사용하기 때문에 높은 부호화 효율을 보인다.Meanwhile, in a typical image encoding, a macroblock used for image encoding is 16x16 pixels having the same width and height, and one or more of intra prediction and inter prediction may be performed on each macroblock to generate a prediction block. have. Encoding an image in units of macroblocks is an encoding method that is widely used because efficient encoding considering local characteristics of an image is possible. In addition, since various methods of intra prediction or inter prediction are used to generate a prediction block, high coding efficiency is shown.

도 2 내지 도 4는 통상적인 영상 부호화에서 이용되는 매크로블록 타입에 따른 인트라 예측 모드를 나타낸 예시도이다.2 to 4 are exemplary diagrams illustrating an intra prediction mode according to a macroblock type used in conventional video encoding.

도 2는 매크로블록 타입이 인트라 4x4 매크로블록인 경우의 9 가지의 인트라 예측 모드를 나타낸 예시도이고, 도 3은 매크로블록 타입이 인트라 8x8 매크로블록인 경우의 9 가지의 인트라 예측 모드를 나타낸 예시도이며, 도 4는 매크로블록 타입이 인트라 16x16 매크로블록인 경우의 4 가지의 인트라 예측 모드를 나타낸 예시도이다.2 is an exemplary diagram illustrating nine intra prediction modes when the macroblock type is an intra 4x4 macroblock, and FIG. 3 is an exemplary diagram illustrating nine intra prediction modes when the macroblock type is an intra 8x8 macroblock. 4 is an exemplary diagram illustrating four intra prediction modes when the macroblock type is an intra 16x16 macroblock.

매크로블록 타입이 인트라 블록 타입인 경우, 부호화할 매크로블록은 인트라 예측을 이용하여 예측된다. 인트라 블록 타입도 세부적으로 인트라 4x4 매크로블록, 인트라 8x8 매크로블록, 인트라 16x16 매크로블록 등으로 구분되는데, 각각의 경우에 매크로블록은 도 2 내지 도 4에 도시한 바와 같은 예측 모드에 따라 이미 부호화되고 복호화되어 복원된 인접 블록의 인접 화소들을 이용하여 예측된다.If the macroblock type is an intra block type, the macroblock to be encoded is predicted using intra prediction. Intra block types are further classified into intra 4x4 macroblocks, intra 8x8 macroblocks, intra 16x16 macroblocks, and the like. In each case, macroblocks are already encoded and decoded according to prediction modes as shown in FIGS. 2 to 4. And predicted using the neighboring pixels of the restored neighboring block.

도 5는 통상적인 영상 부호화에서 이용되는 매크로블록 타입에 따른 인터 예측 모드를 나타낸 예시도이다.5 is an exemplary diagram illustrating an inter prediction mode according to a macroblock type used in conventional image encoding.

매크로블록 타입이 인터 예측 타입인 경우, 부호화할 매크로블록은 인터 예측을 이용하여 예측된다. 이 경우, 도 3에 도시한 바와 같이, 매크로블록은 이전에 이미 부호화되고 복호화되어 복원된 프레임을 이용하여 16x16, 16x8, 8x16 또는 8x8 블록 크기로 예측되어 예측 블록이 생성되는데, 매크로블록이 8x8 블록 크기로 예측되는 경우에는 각 8x8 블록들은 8x8, 8x4, 4x8 또는 4x4 블록 크기로 예측되어 예측 블록이 생성된다.If the macroblock type is the inter prediction type, the macroblock to be encoded is predicted using inter prediction. In this case, as shown in FIG. 3, the macroblock is predicted to a 16x16, 16x8, 8x16 or 8x8 block size using a frame that has been previously encoded, decoded and reconstructed to generate a prediction block. The macroblock is an 8x8 block. In the case of predicting the size, each 8x8 block is predicted to have an 8x8, 8x4, 4x8 or 4x4 block size to generate a predicted block.

하지만, 통상적인 영상 부호화와 같이 16x16 블록 크기의 매크로블록 단위로 고해상도 영상을 부호화하면, 고해상도 영상이 갖는 특징인 화소간의 높은 상관성을 이용한 효율적인 부호화를 수행할 수 없다. 이는, 확장된 MxN 블록 크기의 매크로블록 단위로 생성된 예측 블록의 예측 정확도와 통상적인 16x16 블록 크기의 매크로블록으로 생성된 예측 블록의 예측 정확도가 비슷하므로, 16x16 블록 크기의 매크로블록 단위로 영상을 부호화 하는 경우 부호화할 매크로블록의 개수가 많아져 부호화 효율이 저하되기 때문이다.However, if a high resolution image is encoded in a macroblock unit having a 16x16 block size as in conventional image encoding, efficient encoding using high correlation between pixels, which is a characteristic of a high resolution image, cannot be performed. Since the prediction accuracy of the prediction block generated in the macroblock unit of the extended MxN block size is similar to that of the prediction block generated in the macroblock of the normal 16x16 block size, the image is recorded in the macroblock unit of the 16x16 block size. This is because, in the case of encoding, the number of macroblocks to be encoded increases, thereby reducing the encoding efficiency.

또한, 통상적인 영상 부호화에서는 이산 코사인 변환을 기반으로 하는 4x4 블록 크기 또는 8x8 블록 크기의 정수 변환을 이용한다. 정수 변환은 이산 코사인 변환의 특성을 최대한 유지하면서 이산 코사인 변환이 갖는 단점인 실수 단위의 연산을 수행하지 않고 정수 단위 연산만을 수행하므로, 부호화 효율과 복잡도 측면에서 장점이 있다. 블록 단위의 변환으로 인하여 발생하는 블록화 현상과 링잉 노이즈는 필터링을 이용하여 최소화될 수 있다.In addition, conventional video encoding uses an integer transform of 4x4 block size or 8x8 block size based on discrete cosine transform. Integer transform has an advantage in terms of coding efficiency and complexity because it performs only integer unit operations without performing real unit operation, which is a disadvantage of discrete cosine transform, while maintaining the characteristics of the discrete cosine transform. Blocking phenomena and ringing noise caused by block-by-block conversion can be minimized by using filtering.

하지만, 영상 부호화 장치(100)는 더욱 다양한 PxQ 블록 크기의 변환 및 양자화를 추가적으로 이용하여 고해상도 영상을 부호화하는 것이 통상적인 4x4 블록 크기 또는 8x8 블록 크기의 변환 및 양자화만을 이용하여 고해상도 영상을 부호화하는 것보다 더욱 효율적이다. 이는, 고해상도 영상의 특징인 높은 상관성을 가지는 화소들이 밀집해 있는 넓은 영역을 부호화할 경우, 통상적인 4x4 블록 크기의 변환 및 양자화 또는 8x8 블록 크기의 변환 및 양자화만을 이용하게 되면 블록화 현상이 많이 발생하고 고주파 성분에서 많은 손실이 발생하기 때문이다.However, the image encoding apparatus 100 encodes a high resolution image using only transformation and quantization of 4x4 block size or 8x8 block size, which is conventional to encode a high resolution image by additionally using more various PxQ block sizes. Even more efficient. When encoding a large area in which high correlation pixels, which are characteristic of a high resolution image, are concentrated, a blockage phenomenon occurs when only a typical 4x4 block size transform and quantization or 8x8 block size transform and quantization are used. This is because a lot of loss occurs in the high frequency component.

반면, 다양한 형태의 PxQ 블록 크기의 변환 및 양자화를 선택적으로 이용하여 변환 및 양자화를 수행할 수 있다면, 블록화 현상을 줄일 수 있고 고주파 성분에서의 손실을 통상적인 블록 크기의 변환 및 양자화만을 이용하는 경우보다 줄일 수 있어 링잉 노이즈도 줄일 수 있다. 그에 따라 필터링 작업의 회수도 줄어들어 영상 부호화 장치(100)와 후술할 영상 복호화 장치의 복잡도 측면에서 많은 부분을 차지하고 있는 필터링 작업을 위한 복잡도를 줄일 수 있다. 또한, 다양한 형태의 PxQ 블록 크기의 변환 및 양자화가 이용되기 때문에, 스캐너(140)에서 변환기 및 양자화기(130)에 의해 생성되는 양자화 변환 계수를 변환 및 양자화를 위한 블록 크기에 적합한 방식으로 스캐닝하여 부호화 효율을 높일 수 있다.On the other hand, if transform and quantization can be selectively performed using various types of transform and quantization of PxQ block sizes, the blockage phenomenon can be reduced and the loss in the high frequency component is higher than that of conventional block size conversion and quantization. It can also reduce ringing noise. Accordingly, the number of filtering operations may be reduced, thereby reducing the complexity for the filtering operation, which takes up a large part in terms of the complexity of the image encoding apparatus 100 and the image decoding apparatus to be described later. In addition, since various types of transform and quantization of PxQ block sizes are used, the scanner 140 scans the quantized transform coefficients generated by the transformer and the quantizer 130 in a manner suitable for the block size for transform and quantization. Encoding efficiency can be improved.

따라서, 본 발명의 일 실시예에서는 16x16 블록 크기의 매크로블록으로 영상을 부호화하는 통상적인 영상 부호화 방식과는 달리, 확장된 형태의 MxN 블록 크기의 매크로블록 단위로 예측하여 잔여 블록을 생성하고 변환 및 양자화를 위한 블록 크기도 4x4 블록 크기 또는 8x8 블록 크기만을 이용하는 것이 아니라 다양한 형태의 PxQ 블록 크기에 따라 변환 및 양자화를 수행하고 변환 및 양자화의 블록 크기에 적합한 필터링 및 스캐닝을 수행한다.Therefore, in one embodiment of the present invention, unlike a conventional video encoding method of encoding an image with a macroblock of 16x16 block size, the residual block is generated, transformed, and predicted in units of macroblocks having an extended MxN block size. The block size for quantization is not only using a 4x4 block size or an 8x8 block size, but also performs transform and quantization according to various types of PxQ block sizes, and performs filtering and scanning suitable for the block size of transform and quantization.

도 6은 본 발명의 일 실시예에 따른 MxN 블록 크기의 매크로블록을 나타낸 예시도이다.6 is an exemplary diagram illustrating a macroblock of an M × N block size according to an embodiment of the present invention.

본 발명의 일 실시예에 따르면, 도 6에 도시한 바와 같이, 32x32 블록 크기의 매크로블록, 32x16 블록 크기의 매크로블록 등이나 이외에도 64x64 블록 크기의 매크로블록, 128x128 블록 크기의 매크로블록, 64x128 블록 크기의 매크로블록 등 다양한 블록 크기의 매크로블록 단위로 영상을 부호화할 수 있다. 도 6에 도시한 바와 같이, 본 발명의 일 실시예에 따른 MxN 블록 크기의 매크로블록은 정사각형의 형태뿐만 아니라 직사각형의 형태를 가질 수도 있다.According to an embodiment of the present invention, as shown in FIG. 6, a macroblock of 32x32 block size, a macroblock of 32x16 block size, or the like, in addition to the macroblock of 64x64 block size, the macroblock of 128x128 block size, the 64x128 block size, etc. Images may be encoded in units of macroblocks of various block sizes such as macroblocks. As shown in FIG. 6, the macroblock of the M × N block size according to an embodiment of the present invention may have a rectangular shape as well as a square shape.

도 7은 본 발명의 일 실시예에 따른 MxN 블록 크기의 매크로블록이 가질 수 있는 다양한 종류의 서브 매크로블록을 나타낸 예시도이다.7 is an exemplary diagram illustrating various types of sub macroblocks that a macroblock of an M × N block size may have according to an embodiment of the present invention.

도 7에서는 매크로블록이 32x16 블록 크기인 경우, 매크로블록이 가질 수 있는 서브 매크로블록의 블록 크기의 종류를 예시적으로 나타내었다. 이와 같은 서브 매크로블록을 이용하여 매크로블록을 예측하면 원래의 매크로블록과 더욱 유사한 예측 블록을 생성할 수 있으므로, 부호화 효율을 더욱 높일 수 있다. 이때 MxN 블록 크기의 매크로블록에서 크기를 결정하는 M과 N은 2n으로 결정될 수 있으며, JxK 서브 매크로블록의 블록 크기를 결정하는 J와 K는 M과 N을 초과하지 않는 범위 내에서 2n 단위를 갖는다.FIG. 7 exemplarily illustrates types of block sizes of sub macroblocks that a macroblock may have when the macroblock has a 32x16 block size. Prediction of macroblocks using such sub-macroblocks can generate prediction blocks that are more similar to the original macroblocks, thereby further enhancing coding efficiency. In this case, M and N, which determine the size of the macroblock of the MxN block size, may be determined as 2 n , and J and K, which determine the block size of the JxK sub-macroblock, do not exceed M and N within 2 n units. Has

한편, 변환기 및 양자화기(130)는 잔여 블록을 변환 및 양자화 타입에 따라 변환 및 양자화함으로써, 잔여 블록의 잔여 신호들을 변환 계수로 변환하고 양자화하여 양자화 변환 계수를 생성한다. 이때, 변환기 및 양자화기(130)는 변환 및 양자화에 이용할 변환 및 양자화의 블록 크기를 부호화하고자 하는 블록의 블록 타입에 따라 다르게 결정할 수 있다.On the other hand, the transformer and quantizer 130 transforms and quantizes the residual block according to the transform and quantization type, thereby converting and quantizing the residual signals of the residual block into transform coefficients to generate quantized transform coefficients. In this case, the converter and the quantizer 130 may differently determine the block size of the transform and quantization to be used for transform and quantization according to the block type of the block to be encoded.

예를 들어, 블록 타입이 인트라 블록 타입인 경우, 인트라 예측을 수행하는 블록 크기로 변환 및 양자화의 블록 크기가 결정될 수 있다. 즉, 인트라 4x4 예측이라면 4x4 블록 크기의 변환 및 양자화가 이용되고, 인트라 8x8 예측이라면 8x8 블록 크기의 변환 및 양자화가 이용되며, 인트라 16x16 예측이라면 16x16 블록 크기의 변환 및 양자화 타입가 이용되며, 인트라 16x8 예측이라면 16x8 블록 크기의 변환 및 양자화가 이용될 수 있다. 따라서, 인트라 예측을 수행하는 크기가 PxQ 블록 크기라면, PxQ 블록 크기의 변환 및 양자화 타입으로 결정될 수 있다.For example, when the block type is an intra block type, a block size of transform and quantization may be determined as a block size for performing intra prediction. That is, 4x4 block size transform and quantization is used for intra 4x4 prediction, 8x8 block size transform and quantization is used for intra 8x8 prediction, 16x16 block size transform and quantization type is used for intra 16x16 prediction, and intra 16x8 prediction is used. If 16x8 block size transform and quantization can be used. Therefore, if the size of performing intra prediction is a PxQ block size, it may be determined as a transform and quantization type of the PxQ block size.

다른 예로, 블록 타입이 인터 블록 타입인 경우, 복수 개의 변환 및 양자화의 블록 크기 중에서 부호화 비용이 최소가 되는 변환 및 양자화의 블록 크기로 결정될 수 있다. 즉, 4x4 블록 크기의 변환 및 양자화, 8x8 블록 크기의 변환 및 양자화, 16x16 블록 크기의 변환 및 양자화, 32x16 블록 크기의 변환 및 양자화, 8x16 블록 크기의 변환 및 양자화, 16x8 블록 크기의 변환 및 양자화 등 중에서 하나의 블로 크기의 변환 및 양자화를 선택하여 선택된 블록 크기의 변환 및 양자화를 이용하여 잔여 블록을 변환 및 양자화할 수 있다. 이뿐만 아니라, 블록 타입이 인터 블록 타입인 경우, 현재 블록이 서브블록을 가지는 경우(즉, 현재 블록이 매크로블록이고 서브 매크로블록을 가지는 경우), 서브블록의 크기의 변환 및 양자화를 복수 개의 블록 크기의 변환 및 양자화에 포함시켜 부호화 비용이 최소가 되는 블록 크기의 변환 및 양자화를 변환 및 양자화 타입으로 결정할 수 있다. 여기서, 부호화 비용은 율-왜곡 비용이 될 수 있으나 반드시 이에 한정되지 않고 해당 블록 크기의 변환 및 양자화에 따라 잔여 블록을 부호화하는 데 소요되는 비용이라면 어떠한 비용이어도 된다.As another example, when the block type is an inter block type, it may be determined as a block size of transform and quantization having a minimum coding cost among a plurality of block sizes of transform and quantization. That is, 4x4 block size transform and quantization, 8x8 block size transform and quantization, 16x16 block size transform and quantization, 32x16 block size transform and quantization, 8x16 block size transform and quantization, 16x8 block size transform and quantization, etc. The transform and quantization of one blow size may be selected to transform and quantize the residual block using transform and quantization of the selected block size. In addition, when the block type is an inter block type, when the current block has a subblock (that is, when the current block is a macroblock and has a sub macroblock), a plurality of blocks are used for transforming and quantizing the size of the subblock. The transformation and quantization of a block size having the smallest coding cost by being included in the transformation and quantization of the size may be determined as the transformation and quantization type. Here, the encoding cost may be a rate-distortion cost, but is not necessarily limited thereto, and may be any cost as long as it is required to encode the residual block according to the transformation and quantization of the corresponding block size.

이하에서는 변환 및 양자화 타입이 8x4 블록 크기의 변환 및 양자화로 결정된 것으로 가정하여, 본 발명의 일 실시예에 따른 변환 및 양자화 과정을 설명한다.Hereinafter, assuming that the transform and quantization type is determined by 8x4 block size transform and quantization, a transform and quantization process according to an embodiment of the present invention will be described.

8x4 블록 크기의 변환은 4x4 블록 크기의 정수 변환과 8x8 블록 크기의 정수 변환을 조합하여 설계될 수 있으며, 수학식 1과 같이 나타낼 수 있다.The 8x4 block size transform may be designed by combining an integer transform of 4x4 block size and an integer transform of 8x8 block size, and may be represented by Equation 1.

Figure pat00001
Figure pat00001

수학식 1에서 X는 8x4 블록 크기의 예측 블록에 의해 생성된 8x4 블록 크기의 잔여 블록을 나타내고, A는 4x4 블록 크기의 정수 변환을 위한 행렬을 나타내며, B는 8x8 블록 크기의 정수 변환을 위한 행렬을 나타내며, T는 해당 행렬의 행과 열이 바뀐 행렬인 전치 행렬을 나타내며, Y는 8x4 블록 크기의 잔여 블록 X에 대하여 8x4 블록 크기의 변환이 수행된 결과인 변환된 잔여 블록을 나타낸다.In Equation 1, X denotes a residual block of 8x4 block size generated by 8x4 block size prediction block, A denotes a matrix for integer conversion of 4x4 block size, and B denotes a matrix for integer conversion of 8x8 block size. T denotes a transpose matrix that is a matrix in which rows and columns of the corresponding matrix are changed, and Y denotes a transformed residual block that is a result of performing an 8x4 block size transform on a residual block X having an 8x4 block size.

위의 수학식 에서 AB T 를 엘레먼트(Element)를 나타내면, 수학식 2와 같이 나타낼 수 있다.In the above Equation, when A and B T represent elements, they can be expressed as Equation 2.

[수학식 2]&Quot; (2) "

A =

Figure pat00002
, B =
Figure pat00003
A =
Figure pat00002
, B =
Figure pat00003

수학식 2에서, 행렬 A의 x는

Figure pat00004
, y는
Figure pat00005
, z는
Figure pat00006
이고, 행렬 B의 a는
Figure pat00007
, b는
Figure pat00008
, c는
Figure pat00009
, d는
Figure pat00010
, e는
Figure pat00011
, f는
Figure pat00012
, g는
Figure pat00013
이다. 여기서, 이산 코사인 변환의 특성인 직교성을 유지하면서 정수 연산을 수행하기 위해 각 4x4 크기의 정수 변환과 8x8 크기의 정수 변환은 수학식 3과 같이 분해되고 근사화된다.In equation (2), x of matrix A is
Figure pat00004
, y is
Figure pat00005
, z is
Figure pat00006
Where a in matrix B is
Figure pat00007
, b is
Figure pat00008
, c is
Figure pat00009
, d is
Figure pat00010
, e is
Figure pat00011
, f is
Figure pat00012
, g is
Figure pat00013
to be. Here, each 4x4 integer transform and 8x8 integer transform are decomposed and approximated as in Equation 3 to perform integer operations while maintaining orthogonality, which is a characteristic of discrete cosine transform.

[수학식 3]&Quot; (3) "

A =

Figure pat00014
A =
Figure pat00014

B =

Figure pat00015
B =
Figure pat00015

수학식 3에서, 행렬 A의, x는 그대로

Figure pat00016
y는 ,w(=
Figure pat00018
Figure pat00019
로 각각 근사화 된다. 행렬 B의, a는 그대로
Figure pat00020
이고, b는
Figure pat00021
, c는
Figure pat00022
, K(=
Figure pat00023
)는
Figure pat00024
, L(=
Figure pat00025
)는
Figure pat00026
, M(=
Figure pat00027
)는
Figure pat00028
로 각각 근사화 된다. 이러한 과정을 통하여 수학식 1은 다음의 수학식 4와 같이 나타낼 수 있다.In Equation 3, in the matrix A , x is as it is
Figure pat00016
y is , w (=
Figure pat00018
Figure pat00019
Each is approximated by In the matrix B , a remains the same
Figure pat00020
And b is
Figure pat00021
, c is
Figure pat00022
, K (=
Figure pat00023
)
Figure pat00024
, L (=
Figure pat00025
)
Figure pat00026
, M (=
Figure pat00027
)
Figure pat00028
Each is approximated by Through this process, Equation 1 may be expressed as Equation 4 below.

Figure pat00029
Figure pat00029

수학식 4에서 XY는 수학식 1과 동일하고, C는 수학식 3의 행렬 A에서 오른쪽 4x4 행렬을 나타내며, D T 는 수학식 3의 행렬 B에서 왼쪽 8x8 행렬을 나타낸다. 그리고

Figure pat00030
연산은
Figure pat00031
의 결과 행렬과 행렬 E의 같은 위치의 계수들끼리 곱해주는 연산을 나타낸다. 행렬 E는 수학식 1을 수학식 4로 근사화 및 분해하는 과정에서 유도된 8x8 행렬을 나타내며, 행렬의 엘레멘트는 수학식 4과 같다.In Equation 4, X and Y are the same as Equation 1, C represents the right 4x4 matrix in matrix A of Equation 3, and D T represents the left 8x8 matrix in matrix B of Equation 3. And
Figure pat00030
The operation
Figure pat00031
The operation of multiplying the coefficients of the same position of the matrix E and matrix E. The matrix E represents an 8x8 matrix derived in the process of approximating and decomposing Equation 1 into Equation 4, and the elements of the matrix are shown in Equation 4.

[수학식 5]&Quot; (5) "

Figure pat00032
=
Figure pat00033
Figure pat00032
=
Figure pat00033

수학식 5에서, 행렬 E의 x, y, a, b, c는 수학식 3의 값과 동일하다. 한편, 수학식 5에서 행렬 C, D T , E가 갖는 계수들은 정수가 아닌 것을 알 수 있는데, 정수 연산을 위하여 각 행렬들은 수학식 6와 같이 스케일링(Scaling)된다.In Equation 5, x, y, a, b, c of the matrix E is equal to the value of Equation 3. On the other hand, in Equation 5 it can be seen that the coefficients of the matrix C , D T , E is not an integer, each matrix is scaled as shown in Equation 6 for the integer operation.

[수학식 6]&Quot; (6) "

C =

Figure pat00034
C =
Figure pat00034

D =

Figure pat00035
D =
Figure pat00035

E =

Figure pat00036
E =
Figure pat00036

수학식 6의 스케일링 과정이 완료되면, 8x4 블록 크기의 정수 변환이 설계되는데, 정수 변환을 위해 행렬 E를 양자화 과정에 포함시켜 최종적인 8x4 블록 크기의 정수 변환이 설계된다.When the scaling process of Equation 6 is completed, an 8x4 block sized integer transform is designed, and the final 8x4 block sized integer transform is designed by including the matrix E in the quantization process for integer conversion.

기본적인 양자화 과정은 수학식 7과 같이 나타낼 수 있다.The basic quantization process may be represented as shown in Equation 7.

Figure pat00037
Figure pat00037

수학식 7에서, Y ij 는 잔차 블록을 변환한 후 행렬로 표현되는 원소들을 나타내며, Qstep은 양자화 단계(Quantization Step)의 크기를 나타낸다.In Equation 7, Y ij represents the elements represented by the matrix after transforming the residual block, and Qstep represents the size of the quantization step.

수학식 7과 같이 수행되는 기본적인 양자화 동작을 실제의 8x4 블록 크기의 변환 및 양자화을 위한 양자화 과정에 적용되도록 나타내면 수학식 8과 수학식 9로 나타낼 수 있다.A basic quantization operation performed as shown in Equation 7 may be represented by Equations 8 and 9 to be applied to an actual quantization process for transform and quantization of an 8x4 block size.

Figure pat00038
Figure pat00038

Figure pat00039
Figure pat00039

수학식 8에서, W ij 는 잔여 블록의 각 잔여 신호를 변환한 후 행렬로 표현되는 원소들을 나타내며, MF는 양자화 계수(Quantization Parameter)에 따라 결정되는 증배 계수(Multiplication Factor)를 나타내며, f는 양자화 과정에서의 반올림으로 인한 오류와 데드존(Dead Zone)의 크기를 결정하는 요소로서 현재 블록이 인트라 예측으로 예측된 경우에는

Figure pat00040
이고, 인터 예측으로 예측된 경우에는
Figure pat00041
으로 고정된다. 여기서, qbits
Figure pat00042
이며, floor는 내림(Round Down) 연산을 의미하는데, qbits는 변환 후의 변환 계수가 갖는 최대값 및 최소값에 따라 변경될 수 있다.In Equation 8, W ij represents elements represented by a matrix after transforming each residual signal of the residual block, MF represents a multiplication factor determined according to a quantization parameter, and f represents quantization. This is a factor that determines the size of the dead zone and errors due to rounding in the process. When the current block is predicted by intra prediction,
Figure pat00040
If predicted by inter prediction
Figure pat00041
. Where qbits is
Figure pat00042
Floor is a round down operation. Qbits may be changed according to the maximum and minimum values of the transform coefficient after the conversion.

이때, 수학식 6에서의 행렬 EMF에 포함되며 MF는 수학식 10과 같다.In this case, the matrix E in the equation (6) is included in the MF MF is equal to the equation (10).

Figure pat00043
Figure pat00043

수학식 9에서 PF가 행렬 E를 의미하며, 변환의 형태와 근사화에 따라서 PF가 변하기 때문에 각 변환에 적합한 MF를 구하여 사용해야 한다.In Equation 9, PF denotes the matrix E , and since PF changes according to the form and approximation of the transform, MF suitable for each transform must be obtained and used.

도 8은 본 발명의 일 실시예에 따른 8x4 변환에 대한 MF를 나타내는 예시도이다.8 is an exemplary diagram illustrating MF for 8x4 transform according to an embodiment of the present invention.

수학식 6의 행렬 E의 계수 위치에 따라 MF값이 변화하기 때문에 도 8의 첫 번째 행은 수학식 6의 행렬 E에 따른 계수의 위치를 나타내고, 도 8의 첫번째 열은 Qstep을 의미한다. 여기서, 사용되는 MF값은 수학적으로 도출해낸 값이지만, 정수 변환은 영상 부호화를 위한 최적의 변환이 아니므로 MF값의 수정이 가능하다.Since the MF value changes according to the coefficient position of the matrix E of Equation 6, the first row of FIG. 8 represents the position of the coefficient according to the matrix E of Equation 6, and the first column of FIG. 8 means Qstep . Here, the MF value used is a mathematically derived value, but since the integer transform is not an optimal transform for image encoding, the MF value can be modified.

이상에서 전술한 8x4 블록 크기의 변환 및 양자화를 응용하면 4x8 블록 크기의 변환 및 양자화, 16x8 블록 크기의 변환 및 양자화 등 PxQ 블록 크기의 변환 및 양자화와 같은 다양한 변환 및 양자화 타입에 따라 변환 및 양자화를 수행할 수 있다.The above-described 8x4 block size transform and quantization can be applied according to various types of transform and quantization such as 4x8 block size transform and quantization, 16x8 block size transform and quantization, such as PxQ block size transform and quantization. Can be done.

도 9는 본 발명의 일 실시예에 따라 다양한 변환 및 양자화 타입이 적용된 경우의 필터링을 설명하기 위한 예시도이다.9 is an exemplary diagram for describing filtering when various transform and quantization types are applied according to an embodiment of the present invention.

도 9에서는 현재 블록이 32x32 블록 크기의 매크로블록인 경우의 잔여 블록을 다양한 형태의 변환 및 양자화 타입에 따라 변환 및 양자화하고 다시 역 양자화 및 역 변환한 후 예측 블록과 가산하여 복원되는 현재 블록을 예시적으로 나타내었다.FIG. 9 illustrates a current block in which a residual block when the current block is a macroblock having a size of 32x32 blocks is transformed and quantized according to various types of transform and quantization types, inversely quantized and inverse transformed, and then added with a prediction block to be recovered. As shown.

도 9에서, 실선은 현재 블록인 매크로블록 혹은 현재 블록의 서브 매크로블록의 경계를 나타낸다. 실선의 원으로 표시되는 영역의 내부에 있는 경계에 대하여 필터링을 수행하는 경우, 점선으로 표시된 블록 경계에 대해서만 필터링이 수행된다. 이때, 수행되는 필터링은 블록화 현상을 줄여주는 디블록킹 필터링이 이용될 수 있으며, 이 경우 이용되는 디블로킹 필터는 1차원 저역 통과 필터(Low Pass Filter)이다. 필터링은 수직 방향의 블록 경계에 대한 수행된 후 수평 방향의 블록 경계에 대하여 수행된다.In FIG. 9, a solid line indicates a boundary of a macroblock that is a current block or a sub macroblock of the current block. When filtering is performed on the boundary inside the area indicated by the solid circle, the filtering is performed only on the block boundary indicated by the dotted line. In this case, the filtering may be performed using deblocking filtering that reduces blocking. In this case, the deblocking filter used is a 1D low pass filter. Filtering is performed on block boundaries in the vertical direction and then on block boundaries in the horizontal direction.

통상적인 영상 부호화 방식에서는 4x4 블록 크기의 정수 변환 또는 8x8 블록 크기의 정수 변환만을 이용하여 변환 및 양자화되기 때문에, 디블로킹 필터링 및/또는 디링잉 필터링해야 하는 블록의 경계가 많아져서 필터링을 수행하는 회수가 많아진다. 하지만, 본 발명의 일 실시예에 따라 PxQ 블록 크기의 변환 및 양자화를 수행하면, 필터링을 수행하는 회수가 통상적인 영상 부호화 방식보다 줄어들기 때문에 필터링을 위한 영상 부호화 장치(100)와 영상 복호화 장치의 구현 복잡도를 줄일 수 있으며, 블록화 현상도 덜 발생하여 부호화 효율을 높일 수 있다.In a typical video encoding method, since the transform is quantized using only an integer transform having a 4x4 block size or an integer transform having an 8x8 block size, the number of times that the filtering is performed because the boundaries of blocks to be deblocked and / or deringed are increased. Will increase. However, when the PxQ block size is transformed and quantized according to an embodiment of the present invention, since the number of times to perform filtering is reduced compared to a general video encoding method, the image encoding apparatus 100 and the image decoding apparatus for filtering The implementation complexity can be reduced, and less blocking occurs, thereby improving coding efficiency.

또한, 본 발명의 일 실시예에 따라 PxQ 블록 크기의 변환 및 양자화를 수행하면, 변환 및 양자화되는 블록 크기가 커져서 필터링을 위해 참조되는 화소들의 개수가 많아질 수 있으며, 그에 따라 필터링을 수행한 결과가 더욱 정확해 져서 블록화 현상이나 링잉 현상을 더욱 줄일 수 있다.In addition, when the PxQ block size is transformed and quantized according to an embodiment of the present invention, the block size to be transformed and quantized may be increased, thereby increasing the number of pixels referred to for filtering. Can be more accurate to further reduce blocking or ringing.

도 10 본 발명의 일 실시예에 따라 블록 경계에 디블로킹 필터링하는 과정을 설명하기 위한 예시도이다.10 is an exemplary diagram for describing a process of deblocking filtering on a block boundary according to an embodiment of the present invention.

도 10에서, a, b, c, d, e, f는 블록 경계에 디블로킹 필터링을 수행하기 전의 화소들을 나타내며, b', c', d', e'는 블록 경계에 디블로킹 필터링을 수행한 후의 화소들을 나타내며, 화소들의 수직 위치는 화소의 밝기를 나타낸다. c와 d 화소의 가운데에 있는 실선은 블록 경계를 나타낸다. 도 10을 통해 알 수 있듯이, 블록 경계에 디블로킹 필터링을 수행하기 전에는 블록 경계에서 화소의 밝기 차이가 커져서(화소 c와 d 사이에서 밝기의 차이가 급격히 증가함) 블록화 현상이 발생한다.In FIG. 10, a, b, c, d, e, and f represent pixels before deblocking filtering is performed on the block boundary, and b ', c', d ', and e' perform deblocking filtering on the block boundary. After the pixels are shown, the vertical position of the pixels indicates the brightness of the pixels. The solid line in the middle of the c and d pixels represents the block boundary. As can be seen from FIG. 10, before the deblocking filtering is performed on the block boundary, a blockage phenomenon occurs because the brightness difference of the pixel increases at the block boundary (a sharp increase in the brightness difference between pixels c and d).

이러한 블록화 현상을 줄이기 위해, 블록 경계에 디블로킹 필터링을 수행하여 도 10에 도시한 바와 같이 필터링을 수행하기 전의 화소 b, c, d, e의 밝기를 주변의 화소의 밝기를 이용하여 보정하여 b', c', d', e'의 화소를 생성할 수 있다.In order to reduce this blocking phenomenon, deblocking filtering is performed at the block boundary to correct the brightness of pixels b, c, d, and e before the filtering is performed using the brightness of the surrounding pixels as shown in FIG. Pixels of ', c', d ', and e' may be generated.

이때, 디블로킹 필터링에 이용되는 1차원 저역 통과 필터로서는 강한 필터(Strong Filter)와 약한 필터(Weak Filter)가 이용될 수 있다. 강한 필터는 수학식 11과 같이 구현될 수 있으며, 약한 필터는 수학식 12와 같이 구현될 수 있다.In this case, a strong filter and a weak filter may be used as the one-dimensional low pass filter used for the deblocking filtering. The strong filter may be implemented as shown in Equation 11, and the weak filter may be implemented as shown in Equation 12.

Figure pat00044
Figure pat00044

Figure pat00045
Figure pat00045

수학식 10과 수학식 11에서, b, c, d, e, f, d'은 도 8의 화소를 나타내고 α는 반올림을 위한 상수를 나타낸다.In Equations 10 and 11, b, c, d, e, f, and d ' denote pixels in FIG. 8 and α denotes a constant for rounding.

수학식 10과 수학식 11을 통해 알 수 있듯이, 강한 필터를 이용하여 필터링하면 필터링되는 화소가 인접 화소로부터 많은 영향을 받고, 약한 필터를 이용하여 필터링하면 필터링되는 화소에 가중치를 두므로 인접 화소로부터의 영향이 줄어든다. 이러한 개념을 적용하여 강한 필터와 약한 필터에 적용되는 가중치를 변경하여 필터링할 수 있으며, 인접 화소의 개수와 필터링을 수행할 화소의 개수도 선택적으로 적용하여 필터링할 수 있다. 따라서, 본 발명의 일 실시예에 따르면, PxQ 크기의 변환 및 양자화를 수행하여 블록 경계에 디블로킹 필터링을 수행할 때 참조할 인접 화소의 개수를 더욱 많이 이용할 수 있으므로, 필터링 효과를 더욱 높일 수 있다.As can be seen from equations (10) and (11), filtering with a strong filter affects the pixels that are filtered much from neighboring pixels, and filtering with a weak filter gives weight to the pixels that are filtered. Is less affected. By applying this concept, the weights applied to the strong and weak filters may be changed and filtered. The number of adjacent pixels and the number of pixels to be filtered may be selectively applied and filtered. Therefore, according to an embodiment of the present invention, since the number of adjacent pixels to be referred to when performing deblocking filtering on the block boundary by performing PxQ size conversion and quantization can be used more, the filtering effect can be further enhanced. .

도 11은 본 발명의 일 실시예에 따라 디링잉 필터링을 수행하는 과정을 설명하기 위한 예시도이다. 11 is an exemplary diagram for describing a process of performing de-ring filtering according to an embodiment of the present invention.

디링잉 필터를 수행하기 위해서는 복원되는 영상에서 에지를 찾아야 하며, 에지를 찾기 위해 소벨 연산(Sobel Operation)과 같은 에지 검출 과정이 수행된다. 도 11에서는 에지가 검출된 블록을 나타내었다. 도 11에서 검정색으로 채워진 화소들이 영상에서 검출된 에지를 나타내고, A는 필터링이 수행될 화소를 나타내며, B와 C는 수평 방향으로 필터링될 때의 인접 화소를 나타낸다. 링잉 노이즈(Ringing Noise)를 줄이기 위해 에지가 검출되는 블록의 화소들에 대하여 디링잉 필터링이 수행된다. 이때 사용되는 필터는 수학식 13과 같이 구현될 수 있으며, 에지가 검출된 블록의 각 화소는 수직 방향으로 필터링된 후에 수평 방향으로 필터링된다.In order to perform the de-ringing filter, an edge must be found in the reconstructed image, and an edge detection process such as a Sobel operation is performed to find the edge. 11 shows a block in which an edge is detected. In FIG. 11, black filled pixels represent edges detected in an image, A represents pixels to be filtered, and B and C represent adjacent pixels when filtered in the horizontal direction. To reduce ringing noise, de-ringing filtering is performed on the pixels of the block where the edge is detected. In this case, the filter used may be implemented as shown in Equation 13, and each pixel of the block where the edge is detected is filtered in the vertical direction and then filtered in the horizontal direction.

Figure pat00046
Figure pat00046

수학식 13에서, A는 필터링이 수행될 화소를 나타내며, BC는 수평 방향으로 필터링될 때의 인접 화소 또는 수직 방향으로 필터링될 때의 인접 화소를 나타내며, A'은 필터링이 수행된 화소를 나타낸다. β, γ, δ는 각각 B 화소, A 화소, C 화소가 에지인지 여부에 따라 다르게 적용되는 가중치를 나타내고, α는 반올림 상수, λβ, γ, δ의 합을 나타낸다.In Equation 13, A denotes a pixel to be filtered, B and C denote adjacent pixels when filtered in the horizontal direction, or adjacent pixels when filtered in the vertical direction, and A ' denotes a pixel on which the filtering is performed. Indicates. β, γ, and δ each represent weights that are differently applied depending on whether the B , A , and C pixels are edges, α represents a rounding constant, and λ represents a sum of β, γ, and δ .

디링잉 필터링은 에지가 아닌 화소에 대하여 수행되며, B 또는 C가 에지인 경우, BC가 에지인 경우, BC가 에지가 아닌 경우 등으로 구분되어 화소별로 부여되는 가중치가 달라질 수 있다. 예를 들어, B 또는 C가 에지인 경우, B가 에지면 C의 가중치가 가장 커지고 C가 에지면 B의 가중치가 가장 커진다. BC가 에지인 경우, BC의 가중치는 0이 되며, BC가 에지가 아닐 경우, A의 가중치가 가장 커진다.The de-ringing filtering is performed on pixels that are not edges. When B or C is an edge, B and C are edges, and B and C are not edges, the weights assigned to the pixels may vary. . For example, if the B or C edging, B is the weight of the edge face C C increases the greater the weight of the side edges B. When B and C are edges, the weights of B and C are zero, and when B and C are not edges, the weight of A is the largest.

위의 개념을 적용하여 각 화소에 적용되는 가중치를 변경하여 디링잉 필터링을 수행할 수 있으며, 참조되는 인접 화소의 개수 또한 선택적으로 사용할 수 있다. 따라서, 본 발명의 일 실시예에 따르면, PxQ 블록 크기의 변환 및 양자화를 수행하여 에지가 있는 블록에 디링잉 필터링을 수행할 때 참조할 인접 화소의 개수를 더욱 많이 이용할 수 있으므로, 필터링 효과를 더욱 높일 수 있다.By applying the above concept, the weighting applied to each pixel may be changed to perform de-ringing filtering, and the number of adjacent pixels to be referred may be selectively used. Therefore, according to an embodiment of the present invention, since the number of adjacent pixels to be referred to when performing the de-ringing filtering on the block having an edge by performing the conversion and quantization of the PxQ block size, the filtering effect is further increased. It can increase.

도 12는 본 발명의 일 실시예에 따른 변환 및 양자화 타입에 따른 스캐닝 순서를 나타낸 예시도이다.12 is an exemplary diagram illustrating a scanning order according to a transform and quantization type according to an embodiment of the present invention.

본 발명의 일 실시예에서는 다양한 변환 및 양자화 타입에 따라 변환 및 양자화를 수행하므로 스캐너(140) 또는 부호화기(150)는 변환 및 양자화된 잔여 블록의 양자화 변환 계수들을 변환 및 양자화 타입에 따라 스캐닝하여 양자화 변환 계수열을 생성한다. 도 12에서는 변환 및 양자화된 잔여 블록이 8x4 블록 크기인 경우와 4x8 블록 크기인 경우, 양자화 변환 계수를 스캐닝하는 순서를 예시적으로 나타내었다.According to an embodiment of the present invention, since the transform and quantization are performed according to various transform and quantization types, the scanner 140 or the encoder 150 scans the quantized transform coefficients of the transformed and quantized residual block according to the transform and quantization type and quantizes them. Generate the transformation coefficients. FIG. 12 exemplarily illustrates a procedure of scanning quantized transform coefficients when the transformed and quantized residual blocks have an 8x4 block size and a 4x8 block size.

도 12에 도시한 스캐닝 순서는 본 발명의 일 실시예에 따라 사용되는 다양한 변환 및 양자화 타입에 맞게 응용되어 이용될 수 있으며, 적합한 스캐닝 순서에 따라 양자화 변환 계수들을 스캐닝하면 부호화 효율을 더욱 높일 수가 있다. 이산 코사인 변환의 경우, 통상적으로 변환 후의 변환 계수가 낮은 에너지를 가지는 주파수 부분에 모이므로, 변환 계수가 블록의 왼쪽 상단(DC 계수 쪽)에 모이는 성향을 보이는데, 정수 변환도 이산 코사인 변환을 기반으로 하기 때문에 동일한 성향을 보인다. 따라서, DC 계수의 위치를 시작점으로 하고 DC 계수와 가까운 위치의 계수부터 변환 계수의 에너지가 적어지는 방향으로 스캐닝하는 것이 효율적일 수 있다.The scanning sequence illustrated in FIG. 12 may be applied and used according to various transform and quantization types used according to an embodiment of the present invention. If the quantization transform coefficients are scanned according to a suitable scanning sequence, encoding efficiency may be further increased. . In the case of the discrete cosine transform, since the transform coefficient after the transformation is usually collected in the frequency portion having the low energy, the transform coefficient tends to gather at the upper left side of the block (to the DC coefficient side). Because it shows the same propensity. Therefore, it may be efficient to scan in the direction in which the energy of the transform coefficient decreases from the coefficient at a position close to the DC coefficient with the position of the DC coefficient as a starting point.

부호화기(150)는 도 12에 도시한 바와 같은 스캐닝 순서 또는 이와 유사한 스캐닝 순서에 따라 스캐닝되어 생성되는 양자화 변환 계수열을 다양한 방식으로 부호화하여 비트열을 생성할 수 있다. 하지만, 부호화기(150)는 기존의 문맥 기반 적응적 가변 길이 부호화(CAVLC: Context-based Adaptive Variable Length Coding, 이하 'CAVLC'라 칭함)를 응용하여 변환 및 양자화된 잔여 블록을 스캐닝하고 부호화할 수 있다.The encoder 150 may generate a bit string by encoding the quantized transform coefficient sequence generated by scanning according to the scanning sequence shown in FIG. 12 or a similar scanning sequence in various ways. However, the encoder 150 may apply existing context-based adaptive variable length coding (CAVLC) to scan and encode residual blocks that have been transformed and quantized. .

도 13 내지 도 18은 본 발명의 일 실시예에 따른 변환 및 양자화 타입에 따른 CAVLC 적용 방법을 설명하기 위한 예시도이다.13 to 18 are diagrams for describing a CAVLC application method according to a transform and quantization type according to an embodiment of the present invention.

통상적인 영상 부호화에서는, CAVLC는 4x4 블록 크기의 블록에 대해서만 수행되지만, 본 발명의 일 실시예에서는 도시한 바와 같이 4x4 블록 크기 이상의 블록에 대해서도 CAVLC가 수행될 수 있다.In typical image encoding, CAVLC is performed only for blocks having a 4x4 block size. However, in an embodiment of the present invention, CAVLC may be performed for blocks having a 4x4 block size or more as shown.

도 13은 내지 도 18에서는 각각 변환 및 양자화된 잔여 블록의 크기가 8x4, 4x8, 8x8, 16x8, 8x16, 16x16인 경우, CAVLC를 적용하기 위해 변환 및 양자화된 잔여 블록을 4x4 블록 크기의 블록으로 분해한 모습을 예시적으로 도시하였다. 도 13 내지 도 18에서, 각 화소에 나타낸 숫자 1, 2, 3, 4는 각 화소의 위치를 나타내기 위해 부여된 것으로서, 동일한 숫자를 가지는 화소들만을 모아 4x4 블록 크기의 블록으로 모아진다.13 to 18, when the transformed and quantized residual blocks have sizes of 8x4, 4x8, 8x8, 16x8, 8x16, and 16x16, respectively, the transformed and quantized residual blocks are decomposed into blocks of 4x4 block size to apply CAVLC. An example is shown. 13 to 18, numbers 1, 2, 3, and 4 shown in each pixel are given to indicate the position of each pixel, and are collected in blocks having a size of 4x4 by collecting only pixels having the same number.

일예로, 도 13에 도시한 8x4 블록 크기의 변환 및 양자화된 잔여 블록에서 격열로 1과 2의 숫자가 부여되어 있는데, 1의 숫자가 부여된 4 개의 열을 따로 모으고 2의 숫자가 부여된 4 개의 열을 따로 모아, 도시된 바와 같이, 2 개의 4x4 블록 크기의 변환 및 양자화된 잔여 블록을 얻을 수 있다. 부호화기(150)는 도시된 바와 같이 얻은 2 개의 4x4 블록 크기의 변환 및 양자화된 잔여 블록을 CAVLC를 이용하여 부호화함으로써, 비트열을 얻을 수 있다.For example, in the 8x4 block sized transformed and quantized residual block shown in FIG. 13, the numbers 1 and 2 are assigned as partitions, and 4 columns with the number 1 are collected separately and 4 with the number 2 is assigned. Columns can be collected separately, resulting in two 4x4 block sized transformed and quantized residual blocks. The encoder 150 may obtain a bit string by encoding two 4 × 4 block sizes obtained as illustrated and transforming the quantized residual blocks using CAVLC.

다른 예로, 도 15에 도시한 8x8 블록 크기의 변환 및 양자화된 잔여 블록에서 1의 숫자가 부여된 화소들, 2의 숫자가 부여된 화소들, 3의 숫자가 부여된 화소들, 4의 숫자가 부여된 화소들을 각각 따로 모아 4 개의 4x4 블록 크기의 변환 및 양자화된 잔여 블록을 얻을 수 있다. 부호화기(150)는 도시된 바와 같이 얻은 4 개의 4x4 블록 크기의 변환 및 양자화된 잔여 블록을 CAVLC를 이용하여 부호화함으로써, 비트열을 얻을 수 있다.As another example, in the 8x8 block size transformed and quantized residual block shown in FIG. 15, pixels numbered 1, pixels numbered 2, pixels numbered 3, numbers 4 Each of the given pixels may be separately collected to obtain four 4 × 4 block sized transformed and quantized residual blocks. The encoder 150 may obtain the bit string by encoding the transformed and quantized residual blocks having four 4x4 block sizes obtained using CAVLC as illustrated.

도 19는 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 순서도이다.FIG. 19 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 부호화 방법에 따르면, 영상 부호화 장치(100)는 현재 블록을 예측하여 예측 블록을 생성하고(S1910), 현재 블록과 예측 블록을 감산하여 잔여 블록을 생성하며(S1920), 현재 블록의 블록 타입에 따라 변환 및 양자화 타입을 결정하며(S1930), 결정된 변환 및 양자화 타입에 따라 잔여 블록을 변환 및 양자화하여 부호화한다(S1940). 여기서, 현재 블록은 MxN 블록 크기의 매크로블록이고, M과 N은 16보다 클 수 있다.According to an image encoding method according to an embodiment of the present invention, the image encoding apparatus 100 generates a prediction block by predicting a current block (S1910), and generates a residual block by subtracting the current block and the prediction block (S1920). A transform and quantization type are determined according to the block type of the current block (S1930), and the residual block is transformed and quantized according to the determined transform and quantization type (S1940). Herein, the current block is a macroblock having an MxN block size, and M and N may be larger than 16.

또한, 단계 S1910에서, 영상 부호화 장치(100)는 현재 블록을 복수 개의 서브블록으로 분할하고 분할된 복수 개의 서브블록을 예측한 예측 서브블록을 결합하여 예측 블록을 생성할 수 있다. 이를 위해, 영상 부호화 장치(100)는 영상의 프레임마다 블록 타입을 결정할 수 있으며, 이 경우 현재 블록은 결정된 블록 타입에 따른 매크로블록일 수 있다. 영상 부호화 장치(100)는 블록 타입을 결정하는 데 있어서, 복수 개의 블록 타입에 따라 프레임을 부호화하는 데 소요되는 부호화 비용을 이용하여 블록 타입을 결정할 수도 있지만, 프레임의 특성에 따라 블록 타입을 결정할 수도 있다. 이러한 프레임의 특성은 프레임의 가로 방향의 상관성 및 세로 방향의 상관성 중 하나 이상일 수 있다. 또한, 영상 부호화 장치(100)는 블록 타입에 대한 정보를 부호화하여 부호화 데이터에 추가로 포함시킬 수 있다.In operation S1910, the image encoding apparatus 100 may generate a prediction block by dividing the current block into a plurality of subblocks and combining the prediction subblocks predicting the divided plurality of subblocks. To this end, the image encoding apparatus 100 may determine a block type for each frame of an image. In this case, the current block may be a macroblock according to the determined block type. In determining the block type, the image encoding apparatus 100 may determine the block type by using the encoding cost required to encode the frame according to the plurality of block types, but may also determine the block type according to the characteristics of the frame. have. The characteristics of such a frame may be one or more of the horizontal and vertical correlations of the frame. In addition, the image encoding apparatus 100 may encode information about a block type and additionally include the encoded data.

또한, 단계 S1930에서, 영상 부호화 장치(100)는 블록 타입이 인트라 블록 타입인 경우, 블록 타입의 크기와 동일한 블록 크기의 변환 및 양자화를 변환 및 양자화 타입으로서 결정할 수 있으며, 블록 타입이 인터 블록 타입인 경우, 부호화 비용을 이용하여 복수 개의 블록 크기의 변환 및 양자화 중 하나의 블록 크기의 변환 및 양자화 타입를 변환 및 양자화 타입으로서 결정할 수 있다. 여기서, 복수 개의 블록 크기의 변환 및 양자화는 서브블록의 블록 크기와 동일한 변환 및 양자화를 포함할 수 있다.In operation S1930, when the block type is an intra block type, the image encoding apparatus 100 may determine transform and quantization of a block size equal to the block type size as a transform and quantization type, and the block type is an inter block type. In case of, the transform cost and the quantization type of one block size among the transform and quantization of the plurality of block sizes may be determined as the transform and quantization types by using the encoding cost. Here, the transformation and quantization of the plurality of block sizes may include the same transformation and quantization as the block size of the subblock.

또한, 단계 S1940에서, 영상 부호화 장치(100)는 변환 및 양자화된 잔여 블록의 양자화 변환 계수를 DC 계수와 가까운 위치의 양자화 변환 계수로부터 양자화 변환 계수의 에너지가 적어지는 순서로 스캐닝하여, 스캐닝된 양자화 변환 계수열을 부호화할 수 있다.In operation S1940, the image encoding apparatus 100 scans the quantized transform coefficients of the transformed and quantized residual block in order of decreasing energy of the quantized transform coefficients from the quantized transform coefficients at positions close to the DC coefficients. The transform coefficient string may be encoded.

이외에도, 영상 부호화 장치(100)는 변환 및 양자화된 잔여 블록을 역 양자화 및 역 변환하여 잔여 블록을 복원하고, 복원되는 잔여 블록과 예측 블록을 가산하여 현재 블록을 복원할 수 있으며, 복원되는 현재 블록을 변환 및 양자화 타입에 따라 필터링할 수 있다. 이때, 영상 부호화 장치(100)는 복원되는 현재 블록을 필터링하는 데 있어서, 복원되는 현재 블록의 경계에 변환 및 양자화 타입에 따라 디블로킹 필터링하고, 복원되는 현재 블록을 변환 및 양자화 타입에 따라 디링잉 필터링할 수 있다. 이때, 영상 부호화 장치(100)는 변환 및 양자화 타입에 따라 다르게 디블로킹 필터링 및/또는 디링잉 필터링할 수 있다. 다만, 디블로킹 필터링과 디링잉 필터링은 모두 수행되어야 하는 것은 아니고 두 개의 필터링 중 하나만이 선택적으로 수행되거나 모두 수행되지 않을 수도 있다.In addition, the image encoding apparatus 100 may reconstruct the residual block by inverse quantization and inverse transformation of the transformed and quantized residual block, and may reconstruct the current block by adding the reconstructed residual block and the prediction block, and reconstruct the current block. Can be filtered according to the transform and quantization type. In this case, the image encoding apparatus 100 filters the reconstructed current block, deblocking filtering the boundary of the reconstructed current block according to the transform and quantization type, and de-rings the reconstructed current block according to the transform and quantization type. You can filter. In this case, the image encoding apparatus 100 may perform deblocking filtering and / or deringing filtering differently according to a transform and quantization type. However, both the deblocking filtering and the de-ringing filtering need not be performed, and only one of the two filtering may be selectively performed or both may not be performed.

또한, 영상 부호화 장치(100)는 단계 S1930에서 결정된 변환 및 양자화 타입에 대한 정보를 부호화하여 부호화 데이터에 추가로 포함시킬 수 있다.In addition, the image encoding apparatus 100 may encode information about the transform and quantization type determined in operation S1930 and additionally include the encoded data.

이상에서 전술한 바와 같이, 본 발명의 일 실시예에 따른 영상 부호화 장치(100)와 영상 부호화 방법을 이용하면, MxN 블록 크기의 매크로블록, PxQ 블록 크기의 변환 및 양자화, 변환 및 양자화 타입에 적합한 스캐닝과 필터링을 수행할 수 있어 고해상도 영상을 더욱 효율적으로 부호화할 수 있다. 이와 같이, 영상 부호화 장치(100)에 의해 부호화 데이터로 부호화된 영상은 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망, 이동통신망 등 의 유무선 통신망 등을 통하거나 케이블, 범용 직렬 버스(USB: Universal Serial Bus) 등의 통신 인터페이스를 통해 후술할 영상 복호화 장치로 전송되어 영상 복호화 장치에서 복호화되어 영상으로 복원되고 재생될 수 있다.As described above, when the image encoding apparatus 100 and the image encoding method according to the embodiment of the present invention are used, a macroblock of MxN block size, a transform and quantization of a PxQ block size, and a transform and quantization type are suitable. Scanning and filtering can be performed to encode high resolution images more efficiently. As described above, the image encoded by the encoding data by the image encoding apparatus 100 may be connected to a wired or wireless communication network such as the Internet, a near field communication network, a wireless LAN network, a WiBro network, or a mobile communication network in real time or in real time, or may be connected to a cable or a universal serial bus. The image decoding apparatus may be transmitted to a video decoding apparatus to be described later through a communication interface such as a universal serial bus (USB), decoded by the video decoding apparatus, and restored and reproduced.

도 20은 본 발명의 일 실시예에 따른 영상 복호화 장치를 간략하게 나타낸 블록 구성도이다.20 is a block diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 복호화 장치(2000)는 복호화기(2010), 역 스캐너(2020), 역 양자화기 및 역 변환기(2030), 예측기(2040), 가산기(2050) 및 필터(2060)를 포함하여 구성될 수 있다. 여기서, 역 스캐너(2020)와 필터(2060)는 반드시 포함되어야 하는 것은 아니며 구현 방식에 따라 선택적으로 생략될 수 있으며, 역 스캐너(2020)가 생략되는 경우에는 그 기능이 복호화기(2010)에 통합되어 구현될 수 있다.The image decoding apparatus 2000 according to an embodiment of the present invention may include a decoder 2010, an inverse scanner 2020, an inverse quantizer and an inverse converter 2030, a predictor 2040, an adder 2050, and a filter 2060. It may be configured to include). In this case, the inverse scanner 2020 and the filter 2060 are not necessarily included and may be selectively omitted depending on the implementation manner. When the inverse scanner 2020 is omitted, the function is integrated in the decoder 2010. Can be implemented.

복호화기(2010)는 부호화 데이터를 복호화하여 변환 및 양자화된 잔여 블록을 복원한다. 즉, 복호화기(2010)는 부호화 데이터를 복호화하여 양자화 변환 계수열을 복원하는데, 영상 부호화 장치(100)에서 스캐너(140)의 기능이 부호화기(150)에 통합되어 구현된 경우 영상 부호화 장치(2000)에서도 역 스캐너(2020)는 생략되어 그 기능이 복호화기(2010)에 통합되어 구현되므로, 복호화기(2010)는 복원된 양자화 변환 계수열을 역 스캐닝하여 변환 및 양자화된 잔여 블록을 복원할 수 있다.The decoder 2010 decodes the encoded data to restore the transformed and quantized residual block. That is, the decoder 2010 decodes the encoded data to restore the quantization transform coefficient sequence. When the function of the scanner 140 is integrated with the encoder 150 in the image encoding apparatus 100, the image encoding apparatus 2000 may be implemented. Since the inverse scanner 2020 is omitted and its function is integrated in the decoder 2010 and implemented, the decoder 2010 may inversely scan the reconstructed quantized transform coefficient sequence to restore the transformed and quantized residual block. have.

또한, 복호화기(2010)는 부호화 데이터를 복호화하여 변환 및 양자화된 잔여 블록뿐만 아니라 복호화에 필요한 정보들을 복호화하거나 추출할 수 있다. 복호화에 필요한 정보들은 부호화 데이터 내의 부호화된 비트열을 복호화하는 데 필요한 정보들을 말하며, 예를 들어 블록 타입에 대한 정보, 예측 모드가 인트라 예측 모드인 경우에는 인트라 예측 모드에 대한 정보, 예측 모드가 인터 예측 모드인 경우에는 움직임 벡터에 대한 정보, 변환 및 양자화 타입에 대한 정보 등이 될 수 있지만, 이외의 다양한 정보들이 될 수도 있다.Also, the decoder 2010 may decode and extract encoded data to decode or extract not only residual and transformed quantized blocks, but also information necessary for decoding. The information necessary for decoding refers to information necessary for decoding the coded bit string in the encoded data. For example, information about a block type, information about an intra prediction mode when the prediction mode is an intra prediction mode, and an inter prediction mode In the case of the prediction mode, the information may be information on a motion vector, information on a transform and quantization type, or the like.

블록 타입에 대한 정보는 역 양자화기 및 역 변환기(2030)와 예측기(2040)로 전달될 수 있으며, 변환 및 양자화 타입에 대한 정보는 역 양자화기 및 역 변환기(2030)로 전달될 수 있으며, 인트라 예측 모드에 대한 정보와 움직임 벡터에 대한 정보와 같은 예측에 필요한 정보들은 예측기(2040)로 전달될 수 있다.Information about the block type may be passed to the inverse quantizer and inverse transformer 2030 and the predictor 2040, and information about the transform and quantization type may be passed to the inverse quantizer and inverse transformer 2030. Information necessary for prediction, such as information about a prediction mode and information about a motion vector, may be transmitted to the predictor 2040.

역 스캐너(2020)는 복호화기(2010)에서 양자화 변환 계수열을 복원하여 전달하면 양자화 변환 계수열을 역 스캐닝하여 변환 및 양자화된 잔여 블록을 복원한다. 또한, 전술한 바와 같이, 영상 부호화 장치(100)에서 스캐너(140)의 기능이 부호화기(150)에 통합되어 구현된 경우 영상 부호화 장치(2000)에서도 역 스캐너(2020)는 생략되어 그 기능이 복호화기(2010)에 통합될 수 있다. 또한, 복호화기(2010) 또는 역 스캐너(2020)는 복호화기(2010)에서 부호화 데이터를 복호화하여 복원되는 변환 및 양자화 타입에 대한 정보에 의해 식별되는 변환 및 양자화 타입에 따라 변환 및 양자화된 잔여 블록을 역 스캐닝한다. 여기서, 역 스캐너(2020)가 변환 및 양자화 타입에 따라 역 스캐닝하는 방법은 도 1 및 도 12를 통해 전술한 스캐너(1040)가 변환 및 양자화된 잔여 블록의 양자화 변환 계수들을 스캐닝하는 방법을 역으로 수행하는 것과 동일 또는 유사하므로, 역 스캐닝하는 방법에 대해서는 상세한 설명을 생략한다.The inverse scanner 2020 restores and transfers the quantized transform coefficient sequence by the decoder 2010 to restore the transformed and quantized residual blocks by inversely scanning the quantized transform coefficient sequence. In addition, as described above, when the function of the scanner 140 is integrated with the encoder 150 in the image encoding apparatus 100, the inverse scanner 2020 is omitted in the image encoding apparatus 2000 so that the function is decoded. Can be incorporated in 2010. In addition, the decoder 2010 or the inverse scanner 2020 may transform and quantize the residual block according to the transform and quantization type identified by the information on the transform and quantization type, which is recovered by decoding the encoded data in the decoder 2010. Reverse scan. Here, the method of inverse scanning according to the transform and quantization type by the inverse scanner 2020 reverses the method in which the scanner 1040 described above with reference to FIGS. 1 and 12 scans the quantized transform coefficients of the transformed and quantized residual block. Since it is the same as or similar to that performed, a detailed description of the method of reverse scanning is omitted.

역 양자화기 및 역 변환기(2030)는 복원되는 변환 및 양자화된 잔여 블록을 역 양자화 및 역 변환하여 잔여 블록을 복원한다. 이때, 역 양자화기 및 역 변환기(2030)는 복호화기(2010)로부터 전달되는 변환 및 양자화 타입에 대한 정보에 의해 식별되는 변환 및 양자화 타입에 따라 변환 및 양자화된 잔여 블록을 역 양자화 및 역 변환한다. 여기서, 역 양자화기 및 역 변환기(2030)가 변환 및 양자화된 잔여 블록을 변환 및 양자화 타입에 따라 역 양자화 및 역 변환하는 방법은 영상 부호화 장치(100)의 변환기 및 양자화기(1030)에서 변환 및 양자화 타입에 따라 변환 및 양자화하는 과정을 역으로 수행하는 것과 동일 또는 유사하므로, 역 양자화 및 역 변환하는 방법에 대해서는 상세한 설명을 생략한다.Inverse quantizer and inverse transformer 2030 inverse quantizes and inverse transforms the reconstructed transformed and quantized residual block to recover the residual block. In this case, the inverse quantizer and inverse transformer 2030 inversely quantizes and inverse transforms the residual blocks that are transformed and quantized according to the transform and quantization type identified by the information about the transform and quantization type transferred from the decoder 2010. . Here, the method of inverse quantization and inverse transformation by the inverse quantizer and inverse transformer 2030 according to the transform and quantization type of the transformed and quantized residual block may be performed by the transformer and quantizer 1030 of the image encoding apparatus 100. Since the process of transforming and quantizing according to the quantization type is the same as or similar to performing inverse, detailed description of the method of inverse quantization and inverse transformation is omitted.

예측기(2040)는 현재 블록을 예측하여 예측 블록을 생성한다. 여기서, 예측기(2040)는 복호화기(2010)로부터 전달되는 블록 타입에 대한 정보와 예측에 필요한 정보를 이용하여 현재 블록을 예측한다. 즉, 예측기(2040)는 블록 타입에 대한 정보에 의해 식별되는 블록 타입에 따라 현재 블록의 크기와 형태를 결정하고, 예측에 필요한 정보에 의해 식별되는 인트라 예측 모드 또는 움직임 벡터를 이용하여 현재 블록을 예측하여 예측 블록을 생성한다. 이때, 예측기(2040)는 영상 부호화 장치(100)의 예측기(110)와 동일 또는 유사한 방법으로, 현재 블록을 서브블록으로 분할하고 분할된 서브블록별로 예측하여 생성되는 예측 서브블록을 결합하여 예측 블록을 생성할 수 있다.The predictor 2040 generates a prediction block by predicting the current block. Here, the predictor 2040 predicts the current block by using information on the block type transmitted from the decoder 2010 and information necessary for prediction. That is, the predictor 2040 determines the size and shape of the current block according to the block type identified by the information on the block type, and uses the intra prediction mode or the motion vector identified by the information required for prediction to determine the current block. Predictive to generate predictive blocks. In this case, the predictor 2040 is the same or similar to the predictor 110 of the image encoding apparatus 100. The predictor 2040 divides the current block into subblocks and combines predicted subblocks generated by predicting the divided subblocks to predict the predicted block. Can be generated.

가산기(2050)는 역 양자화기 및 역 변환기(2030)에 의해 복원되는 잔여 블록과 예측기(2040)에 의해 생성되는 예측 블록을 가산하여 현재 블록을 복원한다.The adder 2050 reconstructs the current block by adding the residual block reconstructed by the inverse quantizer and the inverse transformer 2030 and the predictive block generated by the predictor 2040.

필터(2060)는 가산기(2050)에 의해 복원되는 현재 블록을 필터링하고, 복원되어 필터링된 현재 블록은 픽처 단위로 누적되어 참조 픽처로서 메모리(미도시) 등에 저장되어 예측기(2040)에서 다음 블록 또는 다음 픽처를 예측할 때 활용된다. 여기서, 필터(2060)는 복원되는 현재 블록을 필터링할 때, 복호화기(2010)로부터 전달되는 변환 및 양자화 타입에 대한 정보에 의해 식별되는 변환 및 양자화 타입에 따라 필터링을 수행한다. 이때, 필터(2060)는 변환 및 양자화 타입에 따라 다르게 현재 블록의 경계에 디블로킹 필터링을 수행하거나 현재 블록에 에지가 검출되면 현재 블록을 변환 및 양자화 타입에 따라 다르게 디링잉 필터링하여 복원되는 영상의 블록 경계에서 발생하는 블록화 현상을 줄이거나 블록 내의 에지 주변의 링잉 현상을 줄일 수 있다. 필터(2060)가 디블로킹 필터링하고 디링잉 필터링을 수행하는 방법은 영상 부호화 장치(100)의 필터(180)가 디블로킹 필터링하고 디링잉 필터링하는 과정과 동일 또는 유사하므로, 필터링하는 방법에 대해서는 상세한 설명을 생략한다.The filter 2060 filters the current block reconstructed by the adder 2050, and the reconstructed filtered current block is accumulated in units of pictures and stored in a memory (not shown) as a reference picture to be stored in the next block or in the predictor 2040. It is used to predict the next picture. Here, when filtering the current block to be reconstructed, the filter 2060 performs filtering according to the transform and quantization type identified by the information on the transform and quantization type transferred from the decoder 2010. In this case, the filter 2060 performs deblocking filtering on the boundary of the current block differently according to the transform and quantization type, or when an edge is detected in the current block, the filter 2060 performs de-ringing filtering on the current block differently according to the transform and quantization type. Blocking at the block boundary can be reduced or ringing around the edges in the block can be reduced. Since the filter 2060 performs the deblocking filtering and the de-ringing filtering, the filter 180 of the image encoding apparatus 100 is the same as or similar to the deblocking filtering and the de-ringing filtering. Omit the description.

도 21은 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 순서도이다.21 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 복호화 방법에 따르면, 영상 복호화 장치(2000)는 부호화 데이터를 복호화하여 변환 및 양자화된 잔여 블록을 복원하고(S2110), 변환 및 양자화된 잔여 블록을 변환 및 양자화 타입에 따라 역 양자화 및 역 변환하여 잔여 블록을 복원하며(S2120), 현재 블록을 예측하여 예측 블록을 생성하며(S2130), 복원되는 잔여 블록과 예측 블록을 가산하여 현재 블록을 복원한다(S2140).According to an image decoding method according to an embodiment of the present invention, the image decoding apparatus 2000 decodes encoded data to reconstruct transformed and quantized residual blocks (S2110), and transforms and transforms the transformed and quantized residual blocks. In operation S2120, the residual block is reconstructed by inverse quantization and inverse transform, and a prediction block is generated by predicting the current block (S2130), and the current block is reconstructed by adding the reconstructed residual block and the prediction block (S2140).

영상 복호화 장치(2000)는 부호화 데이터를 복호화하여 변환 및 양자화 타입에 대한 정보를 추가로 복원할 수 있으며, 이 경우 단계 S2120에서 영상 복호화 장치(2000)는 복원되는 변환 및 양자화 타입에 대한 정보에 의해 식별되는 변환 및 양자화 타입에 따라 변환 및 양자화된 잔여 블록을 역 양자화 및 역 변환한다.The image decoding apparatus 2000 may further reconstruct the information on the transform and quantization types by decoding the encoded data. In this case, the image decoding apparatus 2000 may reconstruct the information on the transform and quantization types in step S2120. Inverse quantize and inverse transform the transformed and quantized residual blocks according to the identified transform and quantization type.

또한, 영상 복호화 장치(2000)는 단계 S2140에서 복원되는 현재 블록을 변환 및 양자화 타입에 따라 필터링할 수 있는데, 복원되는 현재 블록의 경계에 변환 및 양자화 타입에 따라 디블로킹 필터링하고, 복원되는 현재 블록을 변환 및 양자화 타입에 따라 디링잉 필터링한다. 여기서, 디블로킹 필터링과 디링잉 필터링은 모두 수행될 수도 있지만 선택적으로 하나만 수행될 수도 있고 모두 수행되지 않을 수도 있다. 영상 복호화 장치(2000)가 디블로킹 필터링을 수행하는 경우에는 변환 및 양자화 타입에 따라 다르게 디블로킹 필터링할 수 있으며, 디링잉 필터링을 수행하는 경우에는 변환 및 양자화 타입에 따라 다르게 디링잉 필터링할 수 있다. 한편, 현재 블록은 MxN 크기의 매크로블록이고, M과 N은 16보다 클 수 있다.In addition, the image decoding apparatus 2000 may filter the current block reconstructed according to the transform and quantization type in operation S2140. De-ring filtering according to the transform and quantization type. Here, both deblocking filtering and deringing filtering may be performed, but only one may be performed or not all may be performed. When the image decoding apparatus 2000 performs deblocking filtering, the deblocking filtering may be performed differently according to the transform and quantization type. When the de-ringing filtering is performed, the image decoding apparatus 2000 may perform deringing filtering differently according to the transform and quantization type. . Meanwhile, the current block is a macroblock of M × N size, and M and N may be larger than 16.

또한, 영상 복호화 장치(2000)는 단계 S2130에서 예측 블록을 생성하는 데 있어서, 현재 블록을 복수 개의 서브블록으로 분할하고 분할된 복수 개의 서브블록을 예측한 예측 서브블록을 결합하여 예측 블록을 생성할 수 있다.In operation S2130, the image decoding apparatus 2000 may generate the prediction block by dividing the current block into a plurality of subblocks and combining the prediction subblocks predicting the divided plurality of subblocks. Can be.

또한, 영상 복호화 장치(2000)는 부호화 데이터를 복호화하여 영상의 프레임마다 블록 타입에 대한 정보를 추가로 복원할 수 있으며, 이 경우 현재 블록은 복원되는 블록 타입에 대한 정보에 의해 식별되는 블록 타입에 따른 매크로블록일 수 있다.In addition, the image decoding apparatus 2000 may further reconstruct the information on the block type for each frame of the image by decoding the encoded data. In this case, the current block is assigned to the block type identified by the information on the reconstructed block type. It can be a macroblock according to.

이상에서 전술한 바와 같이, 본 발명의 일 실시예에 따르면, 확장된 MxN 블록 크기의 매크로블록과 그에 상응하는 PxQ 블록 크기의 변환 및 양자화, PxQ 블록 크기의 스캐닝, 필터링을 사용하여 고해상도 영상에서 나타나는 시간적/공간적으로 인접한 화소들의 높은 상관성을 적절하게 이용하여 영상을 부호화할 수 있으므로, 부호화 효율을 향상시킬 수 있다. 또한, 확장된 블록 크기의 매크로블록과 변환 및 양자화를 이용하면 블록 왜곡을 감소시킬 수 있어, 부호화 효율을 높일 수 있을 뿐만 아니라 부호화/복호화시 수행될 수 있는 변환 및 양자화 블록의 경계에 적용되는 디블록킹 필터링의 수행 회사를 줄일 수 있어 영상 부호화 장치(100) 및 영상 복호화 장치(2000)의 구현 복잡도를 낮출 수 있다.As described above, according to an embodiment of the present invention, the macroblock of the extended MxN block size and the corresponding PxQ block size are transformed and quantized, the PxQ block size is scanned, and appears in a high resolution image using filtering. Since an image can be encoded by appropriately using high correlation of temporally / spatially adjacent pixels, encoding efficiency can be improved. In addition, the use of extended block size macroblocks and transform and quantization can reduce block distortion, thereby increasing coding efficiency and reducing the distortion applied to the boundaries of transform and quantization blocks that can be performed during encoding / decoding. By reducing the number of companies performing blocking filtering, implementation complexity of the image encoding apparatus 100 and the image decoding apparatus 2000 may be reduced.

이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합하거나 결합하여 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성 요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 저장매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 저장매체로서는 자기 기록매체, 광 기록매체, 캐리어 웨이브 매체 등이 포함될 수 있다.While the present invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiments. That is, within the scope of the present invention, all of the components may be selectively coupled to one or more of them. In addition, although all of the components may be implemented as one independent hardware, some or all of the components may be selectively combined to perform a part or all of the functions in one or a plurality of hardware. As shown in FIG. Codes and code segments constituting the computer program may be easily inferred by those skilled in the art. Such a computer program can be stored in a computer-readable storage medium, readable and executed by a computer, thereby realizing an embodiment of the present invention. As the storage medium of the computer program, a magnetic recording medium, an optical recording medium, a carrier wave medium, or the like may be included.

또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재할 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Furthermore, the terms "comprises", "comprising", or "having" described above mean that a component can be implanted unless otherwise specifically stated, But should be construed as including other elements. All terms, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. Terms used generally, such as terms defined in a dictionary, should be interpreted to coincide with the contextual meaning of the related art, and shall not be interpreted in an ideal or excessively formal sense unless explicitly defined in the present invention.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The foregoing description is merely illustrative of the technical idea of the present invention, and various changes and modifications may be made by those skilled in the art without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are intended to illustrate rather than limit the scope of the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The scope of protection of the present invention should be interpreted by the following claims, and all technical ideas within the scope equivalent thereto should be construed as being included in the scope of the present invention.

이상에서 설명한 바와 같이 본 발명은 고해상도 동영상을 부호화 및 복호화하는 영상 압축 처리 분야에 적용되어, 영상에서 나타나는 시간적/공간적으로 인접한 화소들의 높은 상관성을 이용한 부호화를 수행할 수 있어 부호화 효율을 높일 수 있을 뿐만 아니라, 블록 왜곡을 감소시켜 압축 효율을 향상시킬 수 있으며, 필터링의 수행 회수를 줄일 수 있어 영상의 부호화 및 복호화를 위한 장치의 구현 복잡도를 낮출 수 있는 효과를 발생하는 매우 유용한 발명이다.As described above, the present invention is applied to a field of image compression processing for encoding and decoding a high resolution video, thereby enabling encoding using high correlation between temporally and spatially adjacent pixels appearing in the image, thereby increasing encoding efficiency. In addition, the compression efficiency can be improved by reducing the block distortion, and the number of times of performing filtering can be reduced, thereby generating an effect of reducing the complexity of implementing an apparatus for encoding and decoding an image.

Claims (19)

영상을 복호화하는 방법에 있어서,
부호화된 비트열에 포함된 블록 정보로부터 현재 블록의 크기 (M×N) 및 예측 모드를 확인하는 단계;
상기 예측 모드에 따라 상기 현재 블록의 예측블록을 복원하는 단계;
상기 부호화된 비트열로부터 상기 현재 블록의 변환 서브블록 분할 정보를 복원하고, 변환 서브블록별로 지정된 크기(P×Q, 여기서 P, Q는 각각 상기 M, N을 초과하지 않는 범위에서 지정됨) 단위로 역변환을 수행하여 잔여블록을 복원하는 단계;
상기 예측 블록 및 상기 잔여 블록을 결합하여 상기 현재 블록을 복원하는 단계; 및
상기 현재 블록이 포함된 복원 영상에서 블록 경계에 대한 디블록킹 필터링을 수행하는 단계
를 포함하는 것을 특징으로 하는 영상 복호화 방법.
In the method of decoding an image,
Identifying a size (M × N) and a prediction mode of the current block from block information included in the encoded bit stream;
Restoring a prediction block of the current block according to the prediction mode;
Reconstructing transform subblock partition information of the current block from the encoded bit stream, and in units of sizes (P × Q, where P and Q are each specified within a range not exceeding M and N) for each transform subblock. Restoring the residual block by performing an inverse transform;
Reconstructing the current block by combining the prediction block and the residual block; And
Performing deblocking filtering on a block boundary in the reconstructed image including the current block
And decoding the decoded image.
제1항에 있어서,
상기 디블록킹 필터링은 서로 다른 필터링 강도를 갖는 2개의 필터링 방법이 선택적으로 수행되며, 선택된 필터링 강도에 따라 필터링 대상이 되는 화소의 개수가 상이한 것을 특징으로 하는 영상 복호화 방법.
The method of claim 1,
In the deblocking filtering, two filtering methods having different filtering intensities are selectively performed, and the number of pixels to be filtered is different according to the selected filtering intensities.
제1항에 있어서,
상기 디블록킹 필터링은 상기 블록 경계 중에서 수직 방향의 경계에 대하여 먼저 수행되고 이어서 수평 방향의 경계에 대해서 수행되는 것을 특징으로 하는 영상 복호화 방법.
The method of claim 1,
The deblocking filtering is performed on a boundary in a vertical direction among the block boundaries, and then on a boundary in a horizontal direction.
제1항에 있어서,
상기 디블록킹 필터링된 복원 영상에서 서로 인접하는 3개 이상의 화소를 이용하여 에지를 검출하고, 상기 3개 이상의 화소 중 적어도 하나의 화소값을 조정하는 에지 필터링 단계를 추가로 포함하는 영상 복호화 방법.
The method of claim 1,
And detecting an edge using three or more pixels adjacent to each other in the deblocking filtered reconstructed image, and adjusting an at least one pixel value among the three or more pixels.
제4항에 있어서,
상기 에지 필터링 단계는, 상기 3개 이상의 화소 중 중앙에 위치한 화소의 화소값을 조정하는 것을 특징으로 하는영상 복호화 방법.
5. The method of claim 4,
In the edge filtering step, the pixel value of the pixel located at the center of the three or more pixels is adjusted.
제4항에 있어서,
상기 3개 이상의 화소가 배열되는 방향은 수평 방향과 수직 방향을 포함하는 것을 특징으로 하는 영상 복호화 방법.
5. The method of claim 4,
The direction in which the three or more pixels are arranged includes a horizontal direction and a vertical direction.
블록 기반 부호화 영상을 복호화하는 장치에 있어서,
부호화된 비트열에 포함된 블록 정보로부터 현재 블록의 크기(M×N) 및 예측 모드를 확인하고, 상기 부호화된 비트열로부터 상기 현재 블록의 변환 서브블록 분할 정보를 복원하는 복호화기;
상기 예측 모드에 따라 상기 현재 블록의 예측블록을 복원하는 예측기;
상기 부호화된 비트열로부터 상기 현재 블록의 변환 서브블록 분할 정보를 복원하고, 변환 서브블록별로 지정된 크기(P×Q, 여기서 P, Q는 각각 상기 M, N을 초과하지 않는 범위에서 지정됨) 단위로 역변환을 수행하여 잔여블록을 복원하는 역 변환기;
상기 예측 블록 및 상기 잔여 블록을 결합하여 상기 현재 블록을 복원하는 가산기; 및
상기 현재 블록이 포함된 복원 영상에서 블록 경계에 대한 디블록킹 필터링을 수행하는 제1필터링부
를 포함하는 것을 특징으로 하는 영상 복호화 장치.
An apparatus for decoding a block-based coded image,
A decoder for identifying a size (M × N) and a prediction mode of a current block from block information included in an encoded bit string, and reconstructing transform subblock partition information of the current block from the encoded bit string;
A predictor for reconstructing the prediction block of the current block according to the prediction mode;
Reconstructing transform subblock partition information of the current block from the encoded bit stream, and in units of sizes (P × Q, where P and Q are each specified within a range not exceeding M and N) for each transform subblock. An inverse transformer for restoring a residual block by performing an inverse transform;
An adder for combining the prediction block and the residual block to reconstruct the current block; And
A first filtering unit that performs deblocking filtering on a block boundary in the reconstructed image including the current block.
And an image decoding unit for decoding the image.
제7항에 있어서,
상기 디블록킹 필터링은 서로 다른 필터링 강도를 갖는 2개의 필터링 방법이 선택적으로 수행되며, 선택된 필터링 강도에 따라 필터링 대상이 되는 화소의 개수가 상이한 것을 특징으로 하는 영상 복호화 장치.
The method of claim 7, wherein
The deblocking filtering is performed by selectively performing two filtering methods having different filtering intensities, and the number of pixels to be filtered is different according to the selected filtering intensities.
제7항에 있어서,
상기 디블록킹 필터링은 상기 블록 경계 중에서 수직 방향의 경계에 대하여 먼저 수행되고 이어서 수평 방향의 경계에 대해서 수행되는 것을 특징으로 하는 영상 복호화 장치.
The method of claim 7, wherein
The deblocking filtering is performed on a boundary in a vertical direction among the block boundaries, and then on a boundary in a horizontal direction.
제7항에 있어서,
상기 디블록킹 필터링된 복원 영상에서 서로 인접하는 3개 이상의 화소를 이용하여 에지를 검출하고, 상기 3개 이상의 화소 중 적어도 하나의 화소값을 조정하는 제2필터링부를 포함하는 것을 특징으로 하는 영상 복호화 장치.
The method of claim 7, wherein
And a second filtering unit configured to detect an edge by using three or more pixels adjacent to each other in the deblocking filtered reconstructed image, and to adjust at least one pixel value among the three or more pixels. .
제10항에 있어서,
상기 제2필터링부는, 상기 3개 이상의 화소 중 중앙에 위치한 화소의 화소값을 조정하는 것을 특징으로 하는 영상 복호화 장치.
11. The method of claim 10,
And the second filtering unit adjusts a pixel value of a pixel located at the center of the three or more pixels.
제10항에 있어서, 상기 제2필터링부는,
수평 방향으로 서로 인접한 상기 3개 이상의 화소를 이용하여 에지를 검출하는 모드와,
수직 방향으로 서로 인접한 상기 3개 이상의 화소를 이용하여 에지를 검출하는 모드를 포함하는 것을 특징으로 하는 영상 복호화 장치.
The method of claim 10, wherein the second filtering unit,
A mode for detecting an edge using the three or more pixels adjacent to each other in a horizontal direction;
And a mode for detecting an edge using the three or more pixels adjacent to each other in the vertical direction.
제10항에 있어서,
상기 제2 필터링부는 설정에 따라 상기 에지 필터링을 수행할 것인지 여부를 결정하는 것을 특징으로 하는 영상 복호화 장치.
11. The method of claim 10,
And the second filtering unit determines whether to perform the edge filtering according to a setting.
영상을 부호화하는 장치에 있어서,
M×N 크기의 현재 블록을 예측하여 예측 블록을 생성하는 예측기;
상기 현재 블록과 상기 예측 블록을 감산하여 잔여 블록을 생성하는 감산기;
상기 현재 블록의 변환 서브블록별로 지정된 크기(P×Q, 여기서 P, Q는 각각 상기 M, N을 초과하지 않는 범위에서 지정됨) 단위로 상기 잔여 블록을 변환하고, 그 변환된 잔여 블록을 양자화하는 변환기 및 양자화기;
상기 현재 블록의 크기를 식별하기 위한 정보, 예측 모드, 상기 현재 블록의 변환 서브블록 분할 정보와, 상기 양자화된 잔여 블록을 부호화하는 부호화기;
상기 양자화된 잔여 블록을 역양자화하고, 이어서 상기 변환 서브블록별로 지정된 크기 단위로 역변환하여 잔여 블록을 복원하는 역양자화기 및 역변환기; 및
상기 복원된 잔여 블록을 포함하는 영상에서 블록 경계에 대한 디블록킹 필터링을 수행하는 제1필터링부
를 포함하는 영상 부호화 장치.
An apparatus for encoding an image, the apparatus comprising:
A predictor for predicting a current block having an M × N size to generate a predicted block;
A subtractor for generating a residual block by subtracting the current block and the prediction block;
Converting the residual block in units of a size (P × Q, where P and Q are specified in a range not exceeding M and N, respectively) for each transform subblock of the current block, and quantizing the transformed residual block Transducers and quantizers;
An encoder for encoding information for identifying the size of the current block, a prediction mode, transform subblock partition information of the current block, and the quantized residual block;
An inverse quantizer and an inverse transformer for inverse quantizing the quantized residual block, and then inversely transforming the quantized residual block by a predetermined size unit for each transform subblock; And
A first filtering unit that performs deblocking filtering on a block boundary in the image including the reconstructed residual block.
Image encoding apparatus comprising a.
제14항에 있어서,
상기 디블록킹 필터링은 서로 다른 필터링 강도를 갖는 2개의 필터링 방법이 선택적으로 수행되며, 선택된 필터링 강도에 따라 필터링 대상이 되는 화소의 개수가 상이한 것을 특징으로 하는 영상 부호화 장치.
15. The method of claim 14,
The deblocking filtering is performed by selectively performing two filtering methods having different filtering intensities, and the number of pixels to be filtered is different according to the selected filtering intensities.
제14항에 있어서,
상기 디블록킹 필터링은 상기 변환 서브블록의 경계 중에서 수직 방향의 경계에 대하여 먼저 수행되고 이어서 수평 방향의 경계에 대해서 수행되는 것을 특징으로 하는 영상 부호화 장치.
15. The method of claim 14,
The deblocking filtering is performed on a boundary in a vertical direction among the boundaries of the transform subblock, and then on a boundary in a horizontal direction.
제14항에 있어서,
상기 디블록킹 필터링된 복원 영상에서 서로 인접하는 3개 이상의 화소를 이용하여 에지를 검출하고, 상기 3개 이상의 화소 중 적어도 하나의 화소값을 조정하는 제2필터링부를 포함하는 것을 특징으로 하는 영상 부호화 장치.
15. The method of claim 14,
And a second filtering unit which detects an edge by using three or more pixels adjacent to each other in the deblocking filtered reconstructed image, and adjusts at least one pixel value among the three or more pixels. .
제17항에 있어서,
상기 제2필터링부는, 상기 3개 이상의 화소 중 중앙에 위치한 화소의 화소값을 조정하는 것을 특징으로 하는 영상 부호화 장치.
18. The method of claim 17,
And the second filtering unit adjusts a pixel value of a pixel located at the center of the three or more pixels.
제17항에 있어서, 상기 제2필터링부는,
수평 방향으로 서로 인접한 상기 3개 이상의 화소를 이용하여 에지를 검출하는 모드와,
수직 방향으로 서로 인접한 상기 3개 이상의 화소를 이용하여 에지를 검출하는 모드를 포함하는 것을 특징으로 하는 영상 부호화 장치.


The method of claim 17, wherein the second filtering unit,
A mode for detecting an edge using the three or more pixels adjacent to each other in a horizontal direction;
And a mode for detecting an edge by using the three or more pixels adjacent to each other in a vertical direction.


KR1020140000438A 2014-01-02 2014-01-02 High Definition Video Encoding/Decoding Method and Apparatus KR101575634B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140000438A KR101575634B1 (en) 2014-01-02 2014-01-02 High Definition Video Encoding/Decoding Method and Apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140000438A KR101575634B1 (en) 2014-01-02 2014-01-02 High Definition Video Encoding/Decoding Method and Apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020130029980A Division KR101369174B1 (en) 2013-03-20 2013-03-20 High Definition Video Encoding/Decoding Method and Apparatus

Publications (2)

Publication Number Publication Date
KR20140019012A true KR20140019012A (en) 2014-02-13
KR101575634B1 KR101575634B1 (en) 2015-12-09

Family

ID=50266733

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140000438A KR101575634B1 (en) 2014-01-02 2014-01-02 High Definition Video Encoding/Decoding Method and Apparatus

Country Status (1)

Country Link
KR (1) KR101575634B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113573054A (en) * 2015-01-13 2021-10-29 英迪股份有限公司 Video encoding and decoding apparatus, method and computer-readable recording medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3504256B1 (en) * 2002-12-10 2004-03-08 株式会社エヌ・ティ・ティ・ドコモ Video encoding method, video decoding method, video encoding device, and video decoding device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113573054A (en) * 2015-01-13 2021-10-29 英迪股份有限公司 Video encoding and decoding apparatus, method and computer-readable recording medium
CN113573054B (en) * 2015-01-13 2024-03-01 杜比实验室特许公司 Video encoding/decoding apparatus, method, and computer-readable recording medium

Also Published As

Publication number Publication date
KR101575634B1 (en) 2015-12-09

Similar Documents

Publication Publication Date Title
KR101302660B1 (en) High Definition Video Encoding/Decoding Method and Apparatus
KR101888333B1 (en) Image Encoding/Decoding Method and Apparatus Using Deblocking Filtering
KR102164752B1 (en) Intra prediction apparatus
KR101432775B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101947657B1 (en) Method and apparatus for encoding intra prediction information
KR101663764B1 (en) Apparatus and Method for Encoding and Decoding Using Intra Prediction
KR101673028B1 (en) Video Coding and Decoding Method and Apparatus
KR20150095232A (en) Method and Apparatus for Filtering Image and Encoding/Decoding of Video Data Using Thereof
EP1992171A1 (en) Method of and apparatus for video intraprediction encoding/decoding
KR101483497B1 (en) Video Encoding/Decoding Apparatus and Method of Considering Impulse Signal
KR101369174B1 (en) High Definition Video Encoding/Decoding Method and Apparatus
KR101713250B1 (en) Apparatus and Method for Encoding and Decoding Using Intra Prediction
KR101575634B1 (en) High Definition Video Encoding/Decoding Method and Apparatus
KR101544379B1 (en) High Definition Video Encoding/Decoding Method and Apparatus
KR101537767B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101575638B1 (en) High Definition Video Encoding/Decoding Method and Apparatus
KR101483495B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR20120010097A (en) Deblocking filtering method and apparatus, method and apparatus for encoding and decoding using deblocking filtering
KR101534014B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101464949B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101464944B1 (en) Video Encoding/Decoding Method and Apparatus Using Arbitrary Pixel in Subblock
KR101681307B1 (en) Method and Apparatus for Color Space Prediction Using Multiple Frequency Domain Weighted Prediction Filter and Method and Apparatus for Encoding/Decoding of Video Data Thereof

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20181203

Year of fee payment: 4