KR101626449B1 - Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same - Google Patents

Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same Download PDF

Info

Publication number
KR101626449B1
KR101626449B1 KR1020150034527A KR20150034527A KR101626449B1 KR 101626449 B1 KR101626449 B1 KR 101626449B1 KR 1020150034527 A KR1020150034527 A KR 1020150034527A KR 20150034527 A KR20150034527 A KR 20150034527A KR 101626449 B1 KR101626449 B1 KR 101626449B1
Authority
KR
South Korea
Prior art keywords
unit
pixel
encoding
depth
coding
Prior art date
Application number
KR1020150034527A
Other languages
Korean (ko)
Other versions
KR20150035942A (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 KR1020150034527A priority Critical patent/KR101626449B1/en
Publication of KR20150035942A publication Critical patent/KR20150035942A/en
Application granted granted Critical
Publication of KR101626449B1 publication Critical patent/KR101626449B1/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/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/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/182Methods 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 a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using 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/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

입력 영상 시퀀스를 부호화하고, 부호화된 영상 데이터를 복호화하여 복호화된 영상 데이터에 대해 루프 필터링을 수행하여 복원 영상을 생성하고, 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여, 각각의 복원 픽셀 및 대응하는 원본 픽셀 간의 오차에 대한 보상값 및 보상될 복원 픽셀을 포함하는 픽셀 그룹을 결정하고, 부호화된 보상값 및 부호화된 입력 영상의 비트스트림을 전송하는 픽셀값 보상을 위한 비디오 부호화 방법이 개시된다.A reconstructed image is generated by performing loop filtering on the decoded image data by decoding the encoded image data and generating a reconstructed image by performing loop filtering on the reconstructed pixels of a predetermined group among the reconstructed images, Disclosed is a video encoding method for determining a group of pixels including a compensation value for an error between original pixels and a restored pixel to be compensated, and compensating a pixel value for transmitting a coded compensation value and a bit stream of the encoded input image.

Description

픽셀 그룹별 픽셀값 보상을 위한 비디오 부호화 방법과 그 장치, 및 픽셀 그룹별 픽셀값 보상을 위한 비디오 복호화 방법과 그 장치{Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same}TECHNICAL FIELD The present invention relates to a video encoding method and apparatus for compensating pixel values for each pixel group, and a video decoding method and apparatus for compensating pixel values for each pixel group. decoding for the same}

본 발명은 비디오의 부호화 및 복호화에 관한 것이다.The present invention relates to encoding and decoding of video.

고해상도 또는 고화질 비디오 컨텐트를 재생, 저장할 수 있는 하드웨어의 개발 및 보급에 따라, 고해상도 또는 고화질 비디오 컨텐트를 효과적으로 부호화하거나 복호화하는 비디오 코덱의 필요성이 증대하고 있다. 기존의 비디오 코덱에 따르면, 비디오는 소정 크기의 매크로블록에 기반하여 제한된 부호화 방식에 따라 부호화되고 있다.Background of the Invention [0002] As the development and dissemination of hardware capable of playing back and storing high-resolution or high-definition video content increases the need for video codecs to effectively encode or decode high-definition or high-definition video content. According to the existing video codec, video is encoded according to a limited encoding method based on a macroblock of a predetermined size.

비디오 부복호화에 의해 영상의 화질이 왜곡될 수 있으며, 복원 영상의 화질을 개선하기 위해, 복호화단에 복원 영상에 대해 후처리 모듈이 추가되는 경우가 있다. The image quality of the image may be distorted by the video decoding. In order to improve the quality of the restored image, a post-processing module may be added to the restored image at the decoding end.

본 발명은, 소정 픽셀 그룹의 픽셀값을 보상하기 위한 비디오 부호화 방법 및 그 장치, 그리고 비디오 복호화 방법 및 그 장치에 관한 것이다.The present invention relates to a video encoding method and apparatus, and a video decoding method and apparatus for compensating a pixel value of a predetermined pixel group.

본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 방법은, 입력 영상 시퀀스를 부호화하는 단계; 부호화된 영상 데이터를 복호화하고 상기 복호화된 영상 데이터에 대해 루프 필터링을 수행하여 복원 영상을 생성하는 단계; 상기 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여, 각각의 복원 픽셀 및 대응하는 원본 픽셀 간의 오차에 대한 보상값 및 상기 보상값을 이용하여 보상될 복원 픽셀을 포함하는 픽셀 그룹을 결정하는 단계; 및 상기 보상값을 부호화하여 상기 부호화된 보상값 및 상기 부호화된 입력 영상의 비트스트림을 전송하는 단계를 포함한다.According to another aspect of the present invention, there is provided a video encoding method for compensating a pixel value, comprising: encoding an input video sequence; Decoding the encoded image data and performing loop filtering on the decoded image data to generate a reconstructed image; Determining a pixel group including a compensation value for an error between each restored pixel and a corresponding original pixel and a restored pixel to be compensated for using the compensation value for restored pixels of a predetermined group among the restored images; And encoding the compensation value and transmitting the encoded compensation value and the bit stream of the encoded input image.

일 실시예에 따른 상기 보상값 및 픽셀 그룹 결정 단계는, 상기 복원 영상 중 이웃하는 복원 픽셀들의 픽셀값을 비교하여, 복원 픽셀별로 최대값 또는 최소값에 근사한 정도를 나타내는 극값 레벨을 결정하는 단계; 및 상기 복원 픽셀별 극값 레벨에 기초하여, 상기 이웃하는 복원 픽셀들 중 보상될 복원 픽셀을 포함하는 픽셀 그룹을 결정하는 단계를 포함할 수 있다. 일 실시예에 따른 상기 극값 레벨에 기초한 픽셀 그룹 결정 단계는, 상기 복원 픽셀별 극값 레벨에 기초하여, 상기 이웃하는 복원 픽셀들을 동일한 극값 레벨을 갖는 복원 픽셀들을 포함하는 픽셀 그룹들로 분류하고, 적어도 하나의 극값 레벨의 픽셀 그룹을 상기 보상될 픽셀 그룹으로 결정하고, 상기 보상값 및 픽셀 그룹 결정 단계는, 상기 보상될 복원 픽셀들로 결정된 적어도 하나의 극값 레벨별로, 해당 픽셀 그룹을 위한 보상값을 결정하는 단계를 더 포함할 수 있다.The compensation value and pixel group determination step may include comparing pixel values of neighboring restored pixels in the restored image and determining an extreme value level indicating a degree of approximation to a maximum value or a minimum value on a restored pixel basis; And determining a pixel group including a restored pixel to be compensated among the neighboring restored pixels based on the restored per-pixel level value. The pixel group determination step based on the extreme value level according to an exemplary embodiment may classify the neighboring restored pixels into pixel groups including restored pixels having the same extreme level based on the extreme value level for each restored pixel, The compensating value and the pixel group determining step determine a compensating value for the corresponding pixel group by at least one extremum level determined by the compensating pixels to be compensated And a step of deciding whether or not to perform a search.

일 실시예에 따른 상기 보상값 및 픽셀 그룹 결정 단계는, 픽셀값의 총 구간이 복수 개로 분할된 대역들에 기초하여, 상기 복원 영상의 복원 픽셀들을, 동일한 대역의 복원 픽셀들을 포함하는 대역별 픽셀 그룹들로 분류하는 단계; 및 상기 대역별 픽셀 그룹마다 보상값을 결정하는 단계를 포함할 수 있다. 일 실시예에 따른 상기 대역별 픽셀 그룹 분류 단계는, 상기 픽셀값의 총 구간이 2의 제곱수의 개수로 분할된 대역들에 기초하여, 상기 복원 픽셀들을 대역별 픽셀 그룹으로 분류할 수 있다. 일 실시예에 있어서, 상기 2의 제곱수의 지수는 상기 복원 픽셀의 비트 뎁스 중 최상위 비트의 개수에 기초하여 결정될 수 있으며, 상기 픽셀값의 총 구간은 확장된 비트 뎁스의 범위일 수 있다. The compensation value and the pixel group determination step may include a step of determining a compensation value and a pixel group based on bands in which a total interval of pixel values is divided into a plurality of bands, Grouping them into groups; And determining a compensation value for each band-by-band pixel group. According to an embodiment, the band-by-band pixel group classification step may classify the restored pixels into band-by-band pixel groups based on bands whose total interval of the pixel values is divided by the number of squares of 2. In one embodiment, the exponent of the power of 2 may be determined based on the number of most significant bits of the bit depth of the reconstructed pixel, and the total duration of the pixel value may be a range of extended bit depths.

일 실시예에 따른 상기 보상값 및 픽셀 그룹 결정 단계는,상기 복원 영상의 복원 픽셀들을, 동일한 라인 상에 위치한 복원 픽셀들을 포함하는 라인별 픽셀 그룹들로 분류하는 단계; 및 상기 라인별 픽셀 그룹마다 보상값을 결정하는 단계를 포함할 수 있다. 일 실시예에 따른 상기 라인별 픽셀 그룹 분류 단계는, 상기 복원 영상의 복원 픽셀들 중, 수평 방향, 수직 방향 및 소정 객체의 경계 방향의 라인을 구성하는 복원 픽셀들을 검출하는 단계를 포함할 수 있다. The compensation value and pixel group determination step may include classifying the restored pixels of the restored image into line-by-line pixel groups including restored pixels located on the same line; And determining a compensation value for each line-by-line pixel group. The line-by-line pixel group classification step according to an exemplary embodiment may include a step of detecting restored pixels constituting a line in a horizontal direction, a vertical direction, and a boundary direction of a predetermined object among restored pixels of the restored image .

일 실시예에 따른 상기 보상값 및 보상될 복원 픽셀 결정 단계는, 상기 소정 복원 픽셀들에 대한 오차의 평균값을 이용하여 상기 보상값을 결정할 수 있다. 일 실시예에 따른 상기 보상값 및 보상될 복원 픽셀 결정 단계는, 상기 보상될 복원 픽셀들 전부를 위한 보상값을 결정하거나, 상기 보상될 복원 픽셀들의 소정 그룹별로 보상값을 개별적으로 결정할 수 있다. The compensation value and the restored pixel to be compensated may be determined using an average value of the errors of the predetermined restored pixels according to an exemplary embodiment. The compensation value and the reconstructed pixel to be compensated may be determined according to an embodiment of the present invention. The compensation value may be determined for all of the reconstructed pixels to be compensated or separately for each predetermined group of compensated reconstructed pixels.

일 실시예에 따른 상기 복원 영상 생성 단계는, 연속적인 복수 개의 1차원 필터를 이용하는 적응적 루프 필터링을 이용할 수 있다.The reconstructed image generation step according to an exemplary embodiment may use adaptive loop filtering using a plurality of continuous one-dimensional filters.

일 실시예에 따른 상기 보상값 및 보상될 복원 픽셀 결정 단계는, 상기 입력 비디오의 영상 시퀀스, 슬라이스, 프레임 및 부호화 단위 중 적어도 하나의 데이터 단위별로, 상기 보상값 및 상기 보상될 복원 픽셀을 결정할 수 있다.The compensation value and the reconstructed pixel to be compensated may be determined based on at least one of a video sequence, a slice, a frame, and a coding unit of the input video according to an exemplary embodiment of the present invention. have.

일 실시예에 따른 상기 비트스트림 전송 단계는, 상기 부호화된 보상값을 슬라이스 헤더에 삽입하여 전송할 수 있다.The bitstream transmission step may insert the encoded compensation value into a slice header and transmit the inserted compensation value.

일 실시예에 따른 상기 입력 영상 시퀀스의 부호화 단계는, 상기 입력 영상 시퀀스 중 픽처를 소정 최대 크기의 부호화 단위로 분할하는 단계; 각각의 최대 부호화 단위에 대해, 심도가 깊어짐에 따라 상기 최대 부호화 단위가 계층적으로 분할되어 축소된 영역별로, 적어도 하나의 심도별 부호화 단위마다 부호화를 수행하여, 상기 픽처의 원본 영상과의 최소 부호화 오차를 발생시키는 적어도 하나의 부호화 심도에 관한 정보를 포함하는 상기 부호화 심도의 부호화 단위에 대한 부호화 모드를 결정하는 단계; 및 상기 결정된 부호화 심도 및 부호화 모드에 따른 부호화 결과인 부호화된 영상 데이터를 출력하는 단계를 포함할 수 있다.
The encoding of the input image sequence may include: dividing a picture of the input image sequence into an encoding unit of a predetermined maximum size; The encoding unit performs encoding for each of at least one depth-by-depth encoding unit for each of the maximum encoding units, the maximum encoding unit being hierarchically divided as the depth is deepened, Determining an encoding mode for the encoding unit of the encoding depth including information on at least one encoding depth for generating an error; And outputting encoded image data that is a result of encoding according to the determined encoding depth and encoding mode.

*본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 방법은, 부호화된 영상에 대한 비트스트림을 수신하고 파싱하여, 상기 비트스트림으로부터 부호화된 영상 데이터 및 보상값을 추출하는 단계; 상기 부호화된 영상 데이터를 복호화하고 상기 복호화된 영상 데이터에 대해 루프 필터링을 수행하여 복원 영상을 생성하는 단계; 상기 복원 영상의 복원 픽셀들 중, 상기 보상값을 이용하여 보상할 복원 픽셀을 포함하는 픽셀 그룹을 결정하는 단계; 및 상기 결정된 픽셀 그룹의 복원 픽셀에 대해, 상기 보상값을 이용하여 상기 복원 픽셀 및 대응하는 원본 픽셀 간의 오차를 보상하는 단계를 포함한다.A video decoding method for pixel value compensation according to an embodiment of the present invention includes: receiving and parsing a bitstream of a coded image, extracting coded image data and a compensation value from the bitstream; Decoding the encoded image data and performing loop filtering on the decoded image data to generate a reconstructed image; Determining a pixel group including a restored pixel to be compensated for using the compensation value among restored pixels of the restored image; And compensating for an error between the restored pixel and the corresponding original pixel using the compensation value for the restored pixel of the determined pixel group.

일 실시예에 따른 상기 픽셀 그룹 결정 단계는, 상기 복원 영상 중 이웃하는 복원 픽셀들의 픽셀값을 비교하여, 복원 픽셀별로 극값 레벨을 결정하는 단계; 및 상기 복원 픽셀별 극값 레벨에 기초하여, 상기 이웃하는 복원 픽셀들 중 보상할 복원 픽셀을 결정하는 단계를 포함할 수 있다. 일 실시예에 따른 상기 복원 픽셀별 극값 레벨에 기초한 픽셀 그룹 결정 단계는, 상기 복원 픽셀별 극값 레벨에 기초하여, 상기 이웃하는 복원 픽셀들을 동일한 극값 레벨을 갖는 복원 픽셀들을 포함하는 픽셀 그룹들로 분류하는 단계; 및 적어도 하나의 소정 극값 레벨의 픽셀 그룹을 상기 픽셀값을 보상할 픽셀 그룹으로 결정하는 단계를 더 포함할 수 있다. 일 실시예에 따른 상기 픽셀값 보상 단계는, 상기 극값 레벨별 픽셀 그룹마다 픽셀값을 보상하기 위한, 상기 극값 레벨별 보상값을 이용하여, 상기 극값 레벨별 픽셀 그룹의 복원 픽셀들의 픽셀값을 보상할 수 있다.
The determining of the pixel group according to an exemplary embodiment may include comparing pixel values of neighboring restored pixels in the restored image to determine a maximum value level for each restored pixel; And determining a restored pixel to be compensated among the neighboring restored pixels based on the restored maximum value level. The pixel group determination step based on the extreme value level for each restoration pixel according to an exemplary embodiment classifies the neighboring restored pixels into pixel groups including restored pixels having the same extreme level based on the extrema level for each restored pixel ; And determining at least one pixel group of a predetermined maximum level as a pixel group to compensate for the pixel value. The pixel value compensating step may compensate the pixel value of the restored pixels of the pixel group for each extreme value level by using the compensation value for each extreme value level for compensating the pixel value for each pixel group for each extreme value level. can do.

*일 실시예에 따른 상기 픽셀 그룹 결정 단계는, 상기 복원 영상의 복원 픽셀들을 대역별 픽셀 그룹들로 분류하는 단계를 포함할 수 있다. 일 실시예에 따른 상기 픽셀값 보상 단계는, 상기 극값 레벨별 픽셀 그룹마다 픽셀값을 보상하기 위한, 상기 극값 레벨별 보상값을 이용하여, 상기 극값 레벨별 픽셀 그룹의 복원 픽셀들의 픽셀값을 보상할 수 있다. The pixel group determination step according to an exemplary embodiment may include a step of classifying the restored pixels of the restored image into pixel groups per band. The pixel value compensating step may compensate the pixel value of the restored pixels of the pixel group for each extreme value level by using the compensation value for each extreme value level for compensating the pixel value for each pixel group for each extreme value level. can do.

일 실시예에 따른 상기 픽셀 그룹 결정 단계는, 상기 복원 영상의 복원 픽셀들을, 동일한 라인 상에 위치한 복원 픽셀들을 포함하는 라인별 픽셀 그룹들로 분류하는 단계를 포함할 수 있다. 일 실시예에 따른 상기 픽셀값 보상 단계는, 상기 라인별 픽셀 그룹의 복원 픽셀들을 위한 라인 픽셀 그룹별 보상값을 이용하여, 상기 라인별 픽셀 그룹의 복원 픽셀의 픽셀값을 보상할 수 있다. 일 실시예에 따른 상기 라인별 픽셀 그룹 분류 단계는, 상기 복원 영상의 복원 픽셀들 중, 수평 방향, 수직 방향 및 소정 객체의 경계 방향의 라인을 구성하는 복원 픽셀들을 검출하는 단계를 포함할 수 있다. The pixel group determination step may include classifying the restored pixels of the restored image into line-by-line pixel groups including restored pixels located on the same line. The step of compensating the pixel value according to an embodiment may compensate the pixel value of the restored pixel of the per-line pixel group by using the compensated value per line pixel group for the restored pixels of the per-line pixel group. The line-by-line pixel group classification step according to an exemplary embodiment may include a step of detecting restored pixels constituting a line in a horizontal direction, a vertical direction, and a boundary direction of a predetermined object among restored pixels of the restored image .

일 실시예에 따른 상기 보상값은, 부호화 단계에서 상기 복원 픽셀들 및 대응하는 원본 픽셀들 간의 오차의 평균값을 이용하여 결정되어 전송된 것일 수 있다. 일 실시예에 따른 상기 보상될 복원 픽셀 보상 단계는, 상기 보상값을 이용하여 상기 보상될 복원 픽셀들 전부를 보상할 수 있다. 일 실시예에 따른 상기 보상될 복원 픽셀 보상 단계는, 상기 보상될 복원 픽셀들의 소정 그룹별로 개별적으로 결정된 보상값을 이용하여, 상기 복원 픽셀들의 픽셀값을 보상할 수 있다. The compensation value may be determined by using an average value of the errors between the restored pixels and the corresponding original pixels in the encoding step. The compensated reconstructed pixel compensation step according to an exemplary embodiment may compensate all of the reconstructed pixels to be compensated using the compensation value. The compensated reconstructed pixel compensating step according to an embodiment may compensate the pixel values of the reconstructed pixels by using compensation values individually determined for a predetermined group of reconstructed pixels to be compensated.

일 실시예에 따른 상기 복원 영상 생성 단계는, 상기 루프 필터링은, 연속적인 복수 개의 1차원 필터를 이용하는 적응적 루프 필터링을 포함할 수 있다. In the reconstructed image generation step according to an embodiment, the loop filtering may include adaptive loop filtering using a plurality of continuous one-dimensional filters.

일 실시예에 따른 상기 추출 단계는, 상기 수신된 비트스트림의 부호화 단계 중, 입력 영상 시퀀스 중 픽처를 소정 최대 크기의 부호화 단위로 분할하고, 각각의 최대 부호화 단위에 대해, 심도가 깊어짐에 따라 상기 최대 부호화 단위가 계층적으로 분할되어 축소된 영역별로, 적어도 하나의 심도별 부호화 단위마다 부호화를 수행하여, 상기 픽처의 원본 영상과의 최소 부호화 오차를 발생시키는 적어도 하나의 부호화 심도에 관한 정보를 포함하는 상기 부호화 심도의 부호화 단위에 대한 부호화 모드에 관한 정보를 상기 비트스트림으로부터 더 추출하고, 일 실시예에 따른 상기 복원 영상 생성 단계는, 상기 부호화 모드에 관한 정보에 기초하여, 상기 부호화 심도 및 부호화 모드에 기초하여 상기 부호화된 영상 데이터를 복호화하고 상기 루프 필터링을 수행할 수 있다. According to an embodiment of the present invention, in the encoding step of the received bitstream, a picture of an input video sequence is divided into coding units of a predetermined maximum size, and for each maximum coding unit, And at least one coding depth for coding at least one coding unit for each depth by dividing the maximum coding unit into hierarchically divided areas and generating a minimum coding error with the original image of the picture Wherein the reconstructed image generating step further extracts information on a coding mode for the coding unit of the coding depth from the bitstream, Mode and decoding the coded image data based on the loop filtering Can be performed.

본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치는, 입력 영상 시퀀스를 부호화하는 부호화부; 부호화된 영상 데이터를 복호화하고 상기 복호화된 영상 데이터에 대해 루프 필터링을 수행하여 복원 영상을 생성하는 복원 영상 생성부; 상기 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여, 각각의 복원 픽셀 및 대응하는 원본 픽셀 간의 오차에 대한 보상값 및 상기 보상값을 이용하여 보상될 복원 픽셀을 포함하는 픽셀 그룹을 결정하는 보상값 및 픽셀 그룹 결정부; 및 상기 보상값을 부호화하여 상기 부호화된 보상값 및 상기 부호화된 입력 영상의 비트스트림을 전송하는 전송부를 포함한다.According to an aspect of the present invention, there is provided a video encoding apparatus for compensating a pixel value, including: an encoding unit encoding an input video sequence; A reconstructed image generation unit for decoding the encoded image data and performing loop filtering on the decoded image data to generate a reconstructed image; A compensation value for determining a pixel group including a compensation value for an error between each restored pixel and a corresponding original pixel and a restored pixel to be compensated for using the compensation value, A pixel group determination unit; And a transmitter for encoding the compensation value and transmitting the encoded compensation value and the bitstream of the encoded input image.

본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치는, 부호화된 영상에 대한 비트스트림을 수신하고 파싱하여, 상기 비트스트림으로부터 부호화된 영상 데이터 및 보상값을 추출하는 추출부; 상기 부호화된 영상 데이터를 복호화하고 상기 복호화된 영상 데이터에 대해 루프 필터링을 수행하여 복원 영상을 생성하는 복원 영상 생성부; 상기 복원 영상 중 복원 픽셀 중, 상기 보상값을 이용하여 보상할 복원 픽셀을 포함하는 픽셀 그룹을 결정하는 픽셀 그룹 결정부; 및 상기 결정된 픽셀 그룹의 복원 픽셀에 대해, 상기 보상값을 이용하여 상기 복원 픽셀 및 대응하는 원본 픽셀 간의 오차를 보상하는 복원 픽셀 보상부를 포함한다. An apparatus for decoding a video value for compensating a pixel value according to an exemplary embodiment of the present invention includes an extractor for receiving and parsing a bitstream of an encoded image and extracting encoded image data and a compensation value from the bitstream; A reconstructed image generation unit for reconstructing the reconstructed image by decoding the encoded image data and performing loop filtering on the decoded image data; A pixel group determination unit for determining a pixel group including a restored pixel to be compensated by using the compensation value among restored pixels in the restored image; And a reconstruction pixel compensator for compensating an error between the reconstructed pixel and the corresponding original pixel using the compensation value, with respect to the reconstructed pixel of the determined pixel group.

본 발명은, 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 방법을 구현하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체를 포함한다. 또한 본 발명은, 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 방법을 구현하기 위한 프로그램이 기록된 컴퓨터로 판독 가능한 기록 매체를 포함한다.The present invention includes a computer-readable recording medium on which a program for implementing a video encoding method for compensating a pixel value according to an embodiment is recorded. The present invention also includes a computer-readable recording medium on which a program for implementing a video encoding method for compensating a pixel value according to an embodiment is recorded.

도 1 은 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치의 블록도를 도시한다.
도 2 는 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치의 블록도를 도시한다.
도 3 은 일 실시예에 따라 복원 픽셀의 극값 레벨을 결정하기 위해 비교 대상이 되는 이웃하는 복원 픽셀들을 도시한다.
도 4 는 일 실시예에 따른 적응적 루프 필터링의 흐름도를 도시한다.
도 5 는 다른 실시예에 따른 적응적 루프 필터링의 흐름도를 도시한다.
도 6 은 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 방법의 흐름도를 도시한다.
도 7 는 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 방법의 흐름도를 도시한다.
도 8 은 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 부호화 장치의 블록도를 도시한다.
도 9 는 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 복호화 장치의 블록도를 도시한다.
도 10 은 본 발명의 일 실시예에 따른 부호화 단위의 개념을 도시한다.
도 11 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부의 블록도를 도시한다.
도 12 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부의 블록도를 도시한다.
도 13 는 본 발명의 일 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.
도 14 은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위의 관계를 도시한다.
도 15 은 본 발명의 일 실시예에 따라, 심도별 부호화 정보들을 도시한다.
도 16 는 본 발명의 일 실시예에 따른 심도별 부호화 단위를 도시한다.
도 17, 18 및 19는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 주파수 변환 단위의 관계를 도시한다.
도 20 은 본 발명의 일 실시예에 따른 부호화 단위별 부호화 정보를 도시한다.
도 21 는 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 부호화 방법의 흐름도를 도시한다.
도 22 은 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 복호화 방법의 흐름도를 도시한다.
1 shows a block diagram of a video encoding apparatus for pixel value compensation according to an embodiment of the present invention.
2 shows a block diagram of a video decoding apparatus for pixel value compensation according to an embodiment of the present invention.
FIG. 3 illustrates neighboring reconstructed pixels to be compared to determine the extreme level of the reconstructed pixel, according to one embodiment.
4 illustrates a flow diagram of adaptive loop filtering in accordance with one embodiment.
5 shows a flow diagram of adaptive loop filtering according to another embodiment.
FIG. 6 shows a flowchart of a video encoding method for pixel value compensation according to an embodiment of the present invention.
FIG. 7 shows a flowchart of a video decoding method for pixel value compensation according to an embodiment of the present invention.
8 is a block diagram of a video encoding apparatus for pixel value compensation after loop filtering based on hierarchical data units for each region according to an embodiment of the present invention.
9 is a block diagram of a video decoding apparatus for compensating pixel values after loop filtering based on hierarchical data units for each region according to an embodiment of the present invention.
FIG. 10 illustrates a concept of an encoding unit according to an embodiment of the present invention.
11 is a block diagram of an image encoding unit based on an encoding unit according to an embodiment of the present invention.
12 is a block diagram of an image decoding unit based on an encoding unit according to an embodiment of the present invention.
FIG. 13 shows a coding unit and a prediction unit according to an embodiment of the present invention.
FIG. 14 shows a relationship between an encoding unit and a conversion unit according to an embodiment of the present invention.
FIG. 15 illustrates depth-specific encoding information, in accordance with an embodiment of the present invention.
FIG. 16 shows a depth encoding unit according to an embodiment of the present invention.
FIGS. 17, 18 and 19 illustrate the relationship between an encoding unit, a prediction unit, and a frequency conversion unit according to an embodiment of the present invention.
FIG. 20 shows encoding information for each encoding unit according to an embodiment of the present invention.
FIG. 21 shows a flowchart of a video encoding method for pixel value compensation after loop filtering based on hierarchical data units for each region according to an embodiment of the present invention.
FIG. 22 shows a flowchart of a video decoding method for pixel value compensation after loop filtering based on hierarchical data units for each region according to an embodiment of the present invention.

이하, 도 1 내지 도 22를 참조하여, 소정 픽셀 그룹의 픽셀값을 보상하기 위한 비디오 부호화 방법 및 그 장치, 그리고 비디오 복호화 방법 및 그 장치의 다양한 실시예들이 상술된다. 구체적으로 도 1 내지 7을 참조하여, 본 발명의 일 실시예에 따른 루프 필터링 후 픽셀값 보상을 위한 비디오 부호화 및 복호화에 관한 다양한 실시예들이 개시되고, 도 8 내지 22를 참조하여, 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값을 보상하기 위한 비디오 부호화 및 복호화에 관한 다양한 실시예들이 개시된다.
Hereinafter, with reference to Figs. 1 to 22, various embodiments of a video encoding method and apparatus, and a video decoding method and apparatus for compensating a pixel value of a predetermined pixel group are described in detail. Referring specifically to Figures 1 to 7, various embodiments of video encoding and decoding for pixel value compensation after loop filtering according to an embodiment of the present invention are disclosed and with reference to Figures 8 to 22, Various embodiments of video encoding and decoding for compensating pixel values after loop filtering based on domain-specific hierarchical data units according to an embodiment are disclosed.

이하 도 1 내지 7을 참조하여, 본 발명의 일 실시예에 따른 루프 필터링 후 픽셀값 보상을 위한 비디오 부호화 및 복호화가 상술된다. 1 to 7, video encoding and decoding for pixel value compensation after loop filtering according to an embodiment of the present invention will be described in detail.

도 1 은 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치의 블록도를 도시한다.1 shows a block diagram of a video encoding apparatus for pixel value compensation according to an embodiment of the present invention.

일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10)는, 부호화부(12), 복원 영상 생성부(14), 보상값 및 픽셀 그룹 결정부(16) 및 전송부(18)를 포함한다. The video encoding apparatus 10 for compensating pixel values according to an embodiment includes a coding unit 12, a reconstructed image generating unit 14, a compensation value and pixel group determining unit 16, and a transmitting unit 18 do.

일 실시예에 따른 부호화부(12)는, 입력 영상 시퀀스 중 픽처 단위의 영상을 부호화한다. 일 실시예에 따른 부호화부(12)는, 입력 영상에 대한 움직임 추정 및 인터 예측, 인트라 예측, 주파수 변환 및 양자화 등을 거쳐 부호화된 영상 데이터를 생성할 수 있다.The encoding unit 12 according to the embodiment encodes an image in a picture unit in an input video sequence. The encoding unit 12 according to an exemplary embodiment may generate encoded image data through motion estimation, inter prediction, intraprediction, frequency conversion, and quantization on an input image.

일 실시예에 따른 부호화부(12)는 MPEG 1, 2, 4, H.26x 등의 다양한 비디오 부호화 방식에 따를 수 있다. 예를 들어, 일 실시예에 따른 부호화부(12)는, 도 8 내지 22를 참조하여 후술될, 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반한 비디오 부호화 방식에 따를 수도 있다.The encoding unit 12 according to one embodiment may comply with various video encoding schemes such as MPEG 1, 2, 4, and H.26x. For example, the encoding unit 12 according to an embodiment may comply with a video encoding scheme based on a hierarchical data unit for each region according to an embodiment of the present invention, which will be described later with reference to FIGS. 8 to 22.

일 실시예에 따른 복원 영상 생성부(14)는, 부호화부(12)에 의해 부호화된 영상 데이터를 입력받아, 부호화된 영상 데이터를 복호화하고 복호화된 영상 데이터에 루프 필터링을 수행하여 복원 영상을 생성한다.The reconstructed image generating unit 14 according to an embodiment receives the image data encoded by the encoding unit 12, decodes the encoded image data, performs loop filtering on the decoded image data, and generates a reconstructed image do.

일 실시예에 따른 복원 영상 생성부(14)는, 부호화된 영상 데이터에 대한 역양자화 및 주파수 역변환, 인터 예측 및 움직임 보상, 인트라 예측 등을 거쳐 복호화된 영상 데이터를 생성할 수 있다. The reconstructed image generating unit 14 according to an exemplary embodiment may generate decoded image data through inverse quantization, inverse frequency transform, inter prediction, motion compensation, and intra prediction on the encoded image data.

일 실시예에 따른 복원 영상 생성부(14)에서 수행되는 부호화된 영상 데이터의 복호화는, 일 실시예에 따른 부호화부(12)에서 따르는 비디오 부호화 방식에 대한 역과정으로서 수행될 수 있다. 예를 들어, 일 실시예에 따른 부호화부(12) 및 복원 영상 생성부(14)가 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반한 비디오 부호화 방식에 따르는 경우에, 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10)의 가능한 실시예가 도 8 내지 22를 통해 후술된다.The decoding of the encoded image data performed by the reconstructed image generating unit 14 according to an embodiment may be performed as an inverse process to the video coding scheme followed by the encoding unit 12 according to the embodiment. For example, in the case where the encoding unit 12 and the reconstructed image generating unit 14 according to the embodiment comply with a video encoding method based on a hierarchical data unit for each region according to an embodiment of the present invention, A possible embodiment of a video encoding apparatus 10 for compensating a pixel value according to the present invention will be described later with reference to FIGS.

일 실시예에 따른 복원 영상 생성부(14)는, 복호화된 영상 데이터에 대해 인루프 필터링을 수행할 수 있다. 일 실시예에 따른 인루프 필터링은 디블로킹 필터링 및 적응적 루프 필터링을 선택적으로 포함할 수 있다. 일 실시예에 따른 적응적 루프 필터링은 연속적인 복수 개의 1차원 필터들을 이용하여 수행될 수 있다. 도 4 및 5를 참조하여, 여러 가지 실시예에 따른 적응적 루프 필터링들이 구체적으로 후술된다. The reconstructed image generating unit 14 according to an embodiment may perform in-loop filtering on the decoded image data. In-loop filtering according to one embodiment may optionally include deblocking filtering and adaptive loop filtering. The adaptive loop filtering according to an embodiment may be performed using a plurality of continuous one-dimensional filters. Referring to Figures 4 and 5, adaptive loop filtering according to various embodiments are described in detail below.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 복원 영상 생성부(14)에 의해 출력된 복원 영상 및 입력 영상을 입력받아, 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여 각각의 복원 픽셀 및 대응하는 입력 영상의 원본 픽셀 간의 오차에 대한 보상값을 결정하고, 보상값을 이용하여 보상될 복원 픽셀을 포함하는 픽셀 그룹을 결정한다.The compensation value and pixel group determination unit 16 according to an exemplary embodiment receives the restored image and the input image output by the restored image generation unit 14, Determines a compensation value for an error between the original pixel of the restored pixel and the corresponding input image, and determines a group of pixels including the restored pixel to be compensated using the compensation value.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 복원 영상의 복원 픽셀들 중 이웃하는 복원 픽셀들 간의 픽셀값을 비교하여, 최대값 및 최소값에 근사한 정도를 나타내는 극값 레벨을 결정할 수 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 이웃하는 복원 픽셀들의 각각의 극값 레벨에 기초하여, 이웃하는 복원 픽셀들을 동일한 극값 레벨을 갖는 복원 픽셀들을 포함하는 픽셀 그룹들로 분류할 수 있다. The compensation value and pixel group determination unit 16 according to the embodiment compares the pixel values between neighboring restored pixels among the restored pixels of the restored image to determine the extreme value level indicating the degree of approximation to the maximum value and the minimum value have. The compensation value and pixel group determination unit 16 according to the embodiment classifies the neighboring restored pixels into pixel groups including restored pixels having the same extreme level based on the extreme level of each of the neighboring restored pixels can do.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 분류된 픽셀 그룹들 중 적어도 하나의 극값 레벨의 픽셀 그룹을 픽셀값 보상 대상인 픽셀 그룹으로 결정할 수 있다. 예를 들어 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 최대값 및 최소값의 극값 레벨의 픽셀 그룹들만을 픽셀값을 보상하도록 결정하거나, 소정 범위의 극값 레벨들의 픽셀 그룹들에 대해 픽셀값을 보상하도록 결정할 수도 있다. 이웃하는 복원 픽셀들의 극값 레벨에 기초한 보상 대상 결정 방법은 도 3을 참조하여 구체적으로 후술된다.The compensation value and pixel group determination unit 16 according to the embodiment may determine at least one pixel group of the maximum level among the classified pixel groups as a pixel group to be a pixel value compensation target. For example, the compensation value and pixel group determination unit 16 according to an exemplary embodiment may determine that only the pixel groups of the maximum value and the minimum value of the minimum level are compensated for the pixel values, May be determined to compensate for the pixel value. A method of determining a compensation target based on an extremum level of neighboring restored pixels will be described later in detail with reference to FIG.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 픽셀값에 따른 대역별 픽셀 그룹에 대해 픽셀값 보상을 수행하도록 결정할 수도 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 복원 픽셀들의 그룹 지정을 위해 복원 픽셀의 픽셀값의 총 범위를 복수 개로 분할된 대역들로 분할할 수 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 복원 픽셀들을 픽셀값에 기초하여 동일한 대역의 복원 픽셀들을 포함하는 대역별 픽셀 그룹들로 분류할 수 있다. 이 경우, 모든 대역별 픽셀 그룹의 복원 픽셀들이 픽셀값 보상 대상으로 결정될 수 있으며, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는 대역별 픽셀 그룹마다 보상값을 별도로 결정할 수 있다. The compensation value and pixel group determination unit 16 according to the embodiment may determine to perform pixel value compensation on a group of pixels for each band according to the pixel value. The compensation value and pixel group determination unit 16 according to the embodiment may divide the total range of the pixel values of the restored pixel into a plurality of divided bands for group designation of restored pixels. The compensation value and pixel group determination unit 16 according to an exemplary embodiment may classify the reconstructed pixels into band-specific pixel groups including reconstructed pixels of the same band based on pixel values. In this case, the restored pixels of all the band-by-band pixel groups may be determined as the pixel value compensation target, and the compensation value and pixel group determining unit 16 according to the embodiment may separately determine the compensation value for each band-

고속 연산을 위해, 픽셀값의 총 범위는 2의 제곱수의 개수의 대역들로 분할되는 것이 바람직하다. 또한 더욱 빠른 연산을 위해, 복원 픽셀들의 비트열의 비트 뎁스 중 최상위 비트의 개수가 p인 경우, 픽셀값의 총 범위는 2의 p승의 개수의 대역들로 분할될 수도 있다. 또한 복원 픽셀의 픽셀값의 총 범위는 복원 픽셀의 확장된 비트 뎁스의 범위일 수도 있다.For fast operation, the total range of pixel values is preferably divided into bands of the number of powers of two. Also, for faster computation, if the number of most significant bits of the bit depth of the bit stream of restored pixels is p, then the total range of pixel values may be divided into bands of number of p power of 2. The total range of pixel values of the restored pixel may also be the range of the extended bit depth of the restored pixel.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 복원 영상을 분석하여, 소정 방향의 라인들을 검출하고, 복원 픽셀들을 동일한 라인 상에 위치하는 복원 픽셀들을 포함하는 라인별 픽셀 그룹들로 분류할 수 있다. 수평 방향, 수직 방향 및 소정 객체의 경계 방향의 라인 등의 여러 방향의 라인들이 검출되면, 각각의 라인을 구성하는 픽셀들이 하나의 픽셀 그룹으로 분류될 수 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 라인별 픽셀 그룹마다 개별적으로 보상값을 결정할 수 있다. The compensation value and pixel group determination unit 16 according to the exemplary embodiment analyzes the restored image and detects lines in a predetermined direction and outputs the restored pixels to the pixel groups for each line including restored pixels located on the same line . When lines in various directions such as a horizontal direction, a vertical direction, and a line in the boundary direction of an object are detected, the pixels constituting each line can be classified into one pixel group. The compensation value and pixel group determination unit 16 according to the embodiment can individually determine the compensation value for each pixel group per line.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 보상될 복원 픽셀들마다, 대응하는 원본 픽셀과의 오차들의 평균값을 보상값으로 결정할 수 있다. 복원 픽셀과 원본 픽셀 간의 오차는, 복원 픽셀과 원본 픽셀 간의 차이값, 차이의 절대값, 차이의 제곱값 등을 포함할 수 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 현재 보상 대상인 복원 픽셀들 전체에 대해 동일하게 적용될 하나의 보상값을 결정하거나, 특성별로 분류된 픽셀 그룹마다 개별적으로 보상값을 결정할 수도 있다.The compensation value and pixel group determination unit 16 according to the embodiment may determine an average value of the errors with the corresponding original pixel as a compensation value for each restored pixel to be compensated. The error between the restored pixel and the original pixel may include the difference value between the restored pixel and the original pixel, the absolute value of the difference, the squared value of the difference, and the like. The compensation value and pixel group determination unit 16 according to an exemplary embodiment may determine one compensation value to be applied to all of the restored pixels to be compensated at present or individually determine a compensation value for each pixel group classified according to the characteristic It is possible.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 입력 비디오의 영상 시퀀스, 슬라이스, 프레임 및 부호화 단위 중 적어도 하나의 데이터 단위별로, 보상될 복원 픽셀을 결정하고, 해당 보상값을 결정할 수 있다.The compensation value and pixel group determination unit 16 according to an exemplary embodiment determines a restored pixel to be compensated for each data unit of at least one of a video sequence, a slice, a frame, and a coding unit of the input video, .

일 실시예에 따른 전송부(18)는, 보상값 및 픽셀 그룹 결정부(16)에 의해 결정된 보상값을 입력받아 부호화한다. 또한 일 실시예에 따른 전송부(18)는, 부호화부(12)에 의해 부호화된 영상 데이터를 입력받아, 부호화된 보상값 및 부호화된 영상 데이터를 포함하는 비트스트림을 생성하여 출력한다. 부호화부(12)에 의해 부호화된 영상 데이터는 엔트로피 부호화를 통해 비트스트림 형태로 변환된 후, 전송용 비트스트림에 삽입될 수 있다.The transmission unit 18 according to an exemplary embodiment receives the compensation value and the compensation value determined by the pixel group determination unit 16, and encodes the compensation value. The transmitting unit 18 according to an embodiment receives the image data encoded by the encoding unit 12 and generates and outputs a bit stream including the encoded compensation value and the encoded image data. The image data encoded by the encoding unit 12 may be converted into a bit stream format through entropy encoding and then inserted into a bit stream for transmission.

일 실시예에 따른 전송부(18)는, 보상값 및 픽셀 그룹 결정부(16)로부터 픽셀 그룹 결정 방식에 대한 부가 정보를 입력받아, 이를 부호화하여 비트스트림에 삽입할 수도 있다. 예를 들어, 보상될 픽셀 그룹의 결정 방식이 전술한 극값 레벨, 픽셀값 대역, 방향성 라인 등일 수 있으므로, 전송되는 보상값이 어느 방식에 따라 채택된 보상값이며, 어느 픽셀 그룹을 위한 보상값인지 등을 나타내는 정보가 전송될 수도 있다. The transmitting unit 18 according to an embodiment may receive the compensation value and the additional information on the pixel group determination method from the pixel group determination unit 16 and may encode the additional information and insert the additional information into the bitstream. For example, since the determination method of the pixel group to be compensated may be the above-described extremum level, the pixel value band, the directional line, and the like, the compensation value to be transmitted is a compensation value adopted according to which method, Or the like may be transmitted.

또한 일 실시예에 따른 전송부(18)는, 복원 영상 생성부(14)에서 적응적 루프 필터링이 수행된 경우, 적응적 루프 필터링을 위한 루프 필터의 계수에 관한 정보를 입력받아 부호화하여 비트스트림에 삽입할 수도 있다. In addition, when adaptive loop filtering is performed in the reconstructed image generating unit 14, the transmitter 18 according to an embodiment receives information about coefficients of the loop filter for adaptive loop filtering, As shown in FIG.

일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(80)는, 복호화단에서 복원 영상 및 원본 영상 간의 오차를 경감시키기 위해 수행될 수 있는 후처리 프로세싱을 지원할 수 있도록, 부호화 과정에서 획득할 수 있는 오차 보상값에 관한 정보를 복호화단에게 제공할 수 있다. 또한, 픽셀 그룹별로 보상값이 결정되므로 개별 픽셀 위치에 관한 정보 없이, 픽셀 그룹별 보상값에 대한 정보만 부호화되어 전송됨으로써 전송 비트량이 절감될 수 있다. The video encoding apparatus 80 for compensating for pixel values according to an exemplary embodiment may acquire a video encoding signal so that it can support post-processing processing that can be performed to reduce errors between the reconstructed video and the original video at the decoding terminal. It is possible to provide the decoding unit with information on an error compensation value. Also, since the compensation value is determined for each pixel group, only the information about the compensation value for each pixel group is encoded and transmitted without information on the individual pixel positions, thereby reducing the transmission bit amount.

도 2 는 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치의 블록도를 도시한다.2 shows a block diagram of a video decoding apparatus for pixel value compensation according to an embodiment of the present invention.

일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는, 추출부(22), 복원 영상 생성부(24), 픽셀 그룹 결정부(26) 및 복원 픽셀 보상부(28)를 포함한다.The video decoding apparatus 20 for compensating a pixel value according to an embodiment includes an extraction unit 22, a reconstructed image generation unit 24, a pixel group determination unit 26, and a reconstructed pixel compensation unit 28 .

일 실시예에 따른 추출부(22)는, 부호화된 영상에 대한 비트스트림을 수신하고 파싱하여, 비트스트림으로부터 부호화된 영상 데이터 및 보상값 관련 정보를 추출한다. 보상값 관련 정보는 보상값 정보를 포함할 수 있다. 또한, 보상값 관련 정보가 보상값을 이용하여 보상될 복원 픽셀의 결정 방식에 관한 정보를 더 포함하는 경우에는, 일 실시예에 따른 추출부(22)에 의해 비트스트림으로부터 보상값과 보상될 픽셀 그룹 결정 방식에 관한 정보가 추출될 수도 있다. 일 실시예에 따른 추출부(22)는, 입력 비디오의 영상 시퀀스, 슬라이스, 프레임 및 부호화 단위 중 적어도 하나의 데이터 단위별로, 보상값 또는 보상값 관련 정보를 추출할 수 있다. The extracting unit 22 according to an embodiment receives and parses a bitstream of an encoded image and extracts encoded image data and compensation value related information from the bitstream. The compensation value related information may include compensation value information. When the compensation value related information further includes information on the determination method of the reconstruction pixel to be compensated using the compensation value, the extraction unit 22 extracts, from the bit stream, Information on the group determination method may be extracted. The extracting unit 22 according to an embodiment may extract compensation value or compensation value related information for each data unit of at least one of a video sequence, a slice, a frame, and a coding unit of the input video.

또한, 일 실시예에 따른 추출부(22)는, 부호화된 영상 데이터를 복호화하는데 필요한, 부호화 방식 및 부호화 모드 등의 부호화 정보를 추출할 수도 있다. 일 실시예에 따른 추출부(22)는, 비트스트림에 적응적 루프 필터링을 위한 필터 계수에 관한 정보가 삽입되어 있는 경우, 비트스트림으로부터 필터 계수에 대한 정보를 추출할 수도 있다.In addition, the extracting unit 22 according to an embodiment may extract encoding information such as a coding method and an encoding mode necessary for decoding the encoded image data. The extracting unit 22 according to an embodiment may extract information on a filter coefficient from a bitstream when information on a filter coefficient for adaptive loop filtering is embedded in the bitstream.

일 실시예에 따른 복원 영상 생성부(24)는, 추출부(22)에 의해 추출된 부호화된 영상 데이터, 부호화 정보, 루프 필터 계수에 관한 정보 등을 입력받아, 부호화된 영상 데이터를 복호화하고 루프 필터링을 수행하여 복원 영상을 생성한다.The reconstructed image generating unit 24 according to an embodiment receives the encoded image data extracted by the extracting unit 22, encoding information, information on loop filter coefficients, and the like, decodes the encoded image data, Filtering is performed to generate a reconstructed image.

부호화된 영상 데이터의 복호화는, 부호화된 영상 데이터가 따른 비디오 부호화 방식에 대한 역과정으로서 수행될 수 있다. 예를 들어, 부호화된 영상 데이터가 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반한 비디오 부호화 방식에 따라 부호화되어 전송된 경우에, 일 실시예에 따른 복원 영상 생성부(24)는 영역별 계층적 데이터 단위에 기반한 비디오 부복호화 방식에 따라 복호화할 수 있다. The decoding of the encoded image data can be performed as an inverse process to the video encoding method according to the encoded image data. For example, when the encoded image data is encoded and transmitted according to a video encoding method based on a hierarchical data unit for each region according to an embodiment of the present invention, the reconstructed image generating unit 24 according to an embodiment And can be decoded according to a video decoding method based on a hierarchical data unit for each area.

일 실시예에 따른 복원 영상 생성부(24)는, 복호화된 영상 데이터에 대해 디블로킹 필터링 또는 적응적 루프 필터링 등의 인루프 필터링을 선택적으로 수행할 수 있다. 일 실시예에 따른 적응적 루프 필터링은 연속적인 복수 개의 1차원 필터들을 이용하여 수행될 수 있다. The reconstructed image generating unit 24 may selectively perform in-loop filtering such as deblocking filtering or adaptive loop filtering on the decoded image data. The adaptive loop filtering according to an embodiment may be performed using a plurality of continuous one-dimensional filters.

일 실시예에 따른 픽셀 그룹 결정부(26)는, 복원 영상 생성부(24)에 의해 생성된 복원 영상 및 추출부(22)에 의해 추출된 보상값 관련 정보를 입력받아, 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여 보상값을 이용하여 보상될 복원 픽셀을 포함하는 픽셀 그룹을 결정할 수 있다. 일 실시예에 따른 복원 픽셀 보상부(28)는, 추출부(12)에 의해 추출된 보상값 및 픽셀 그룹 결정부(26)에 의해 결정된 복원 픽셀들에 관한 정보를 입력받아, 보상값을 이용하여 복원 픽셀의 픽셀값을 보상하고, 픽셀값이 보상된 복원 영상을 출력한다.The pixel group determining unit 26 according to an exemplary embodiment receives the restored image generated by the restored image generating unit 24 and the compensation value related information extracted by the extracting unit 22, A pixel group including a restored pixel to be compensated for using the compensation value for restored pixels of the pixel group. The reconstructed pixel compensator 28 according to an exemplary embodiment receives the compensation value extracted by the extractor 12 and the information about the reconstructed pixels determined by the pixel group determiner 26, Compensates the pixel value of the restored pixel, and outputs the restored image with the pixel value compensated.

일 실시예에 따른 추출부(22)에 의해 픽세값 보상 대상인 픽셀 그룹 결정 방식에 관한 정보가 추출된 경우, 일 실시예에 따른 픽셀 그룹 결정부(26)는 픽셀 그룹 결정 방식에 기초하여 픽셀값 보상 대상인 픽셀 그룹을 결정할 수 있다. 예를 들어, 일 실시예에 따른 픽셀 그룹 결정부(26)는 픽셀 그룹 결정 방식에 기초하여, 복원 픽셀들을 극값 레벨, 픽셀값 대역 또는 방향성 라인의 구성 여부에 따라 분류할지 여부를 결정하고, 픽셀값 보상 대상인 픽셀 그룹을 결정할 수도 있다. When the extraction unit 22 extracts information on the pixel group determination method to be compensated by the extraction unit 22 according to the embodiment, the pixel group determination unit 26 according to the embodiment calculates the pixel value The pixel group to be compensated can be determined. For example, the pixel group determination unit 26 according to one embodiment determines whether to classify the restored pixels according to whether the restored pixels are configured at the extreme level, the pixel value band, or the directional line, Value compensation target pixel group.

일 실시예에 따른 픽셀 그룹 결정부(26)는, 복원 영상 중 이웃하는 복원 픽셀들의 픽셀값을 비교하여, 복원 픽셀별로 극값 레벨을 결정할 수 있다. 일 실시예에 따른 픽셀 그룹 결정부(26)는, 이웃하는 복원 픽셀들을 극값 레벨에 기초하여 분류하고, 적어도 하나의 소정 극값 레벨의 복원 픽셀들을 포함하는 픽셀 그룹을, 보상값을 이용하여 픽셀값을 보상할 복원 픽셀들을 포함하는 픽셀 그룹으로 결정할 수 있다. 일 실시예에 따른 복원 픽셀 보상부(28)는, 픽셀값 보상 대상으로 결정된 픽셀 그룹의 복원 픽셀들에 대해, 보상값을 이용하여 픽셀값을 보상할 수 있다. The pixel group determination unit 26 according to an exemplary embodiment may compare the pixel values of neighboring restored pixels in the restored image to determine the extreme value level for each restored pixel. The pixel group determination unit 26 according to the embodiment classifies the neighboring restored pixels based on the extremum level and groups the group of pixels including the restored pixels of at least one predetermined maximum level into a pixel value As a group of pixels including reconstructed pixels to be compensated for. The reconstructed pixel compensator 28 according to the embodiment can compensate the pixel value using the compensation value for reconstructed pixels of the pixel group determined as the pixel value compensated object.

또한 일 실시예에 따른 픽셀 그룹 결정부(26)는, 픽셀값의 총 구간이 복수 개로 분할된 대역들에 기초하여, 복원 영상의 복원 픽셀들을 대역별 픽셀 그룹들로 분류할 수 있다. 일 실시예에 따른 복원 픽셀 보상부(28)는, 대역별 픽셀 그룹의 복원 픽셀들을 위한 대역별 보상값을 이용하여, 대역별 픽셀 그룹의 복원 픽셀들의 픽셀값을 보상할 수 있다. In addition, the pixel group determination unit 26 according to the exemplary embodiment may classify the restored pixels of the restored image into pixel groups of each band based on bands in which the total interval of pixel values is divided into a plurality of bands. The reconstructed pixel compensator 28 may compensate the pixel values of the reconstructed pixels of the per-band pixel group using the per-band compensation values for the reconstructed pixels of the per-band pixel group.

일 실시예에 따라, 픽셀값의 총 구간은 2의 제곱수의 개수의 대역들로 분할될 수 있다. 이 경우 2의 제곱수의 지수는, 복원 픽셀의 비트 뎁스 중 최상위 비트의 개수에 기초하여 결정될 수 있다. 또한, 복원 픽셀의 픽셀값의 총 구간은 복원 픽셀의 확장된 비트 뎁스의 범위일 수 있다. According to one embodiment, the total duration of the pixel values may be divided into bands of the number of powers of two. In this case, the exponent of the power of 2 can be determined based on the number of most significant bits of the bit depth of the reconstructed pixel. Also, the total duration of the pixel values of the reconstructed pixel may be the range of the extended bit depth of the reconstructed pixel.

일 실시예에 따른 일 실시예에 따른 픽셀 그룹 결정부(26)는, 복원 영상의 복원 픽셀들을, 방향성 라인별 픽셀 그룹들로 분류할 수 있다. 일 실시예에 따른 복원 픽셀 보상부(28)는, 라인 픽셀 그룹별 보상값을 이용하여, 라인별 픽셀 그룹의 복원 픽셀의 픽셀값을 보상할 수 있다. 일 실시예에 따른 일 실시예에 따른 픽셀 그룹 결정부(26)는, 복원 영상의 복원 픽셀들 중, 수평 방향, 수직 방향 및 소정 객체의 경계 방향의 라인을 구성하는 복원 픽셀들을 검출할 수 있다. The pixel group determination unit 26 according to an exemplary embodiment may classify the restored pixels of the restored image into pixel groups per directional line. The reconstructed pixel compensator 28 according to the embodiment can compensate the pixel value of the reconstructed pixel of the pixel group per line by using the compensated value per line pixel group. The pixel group determination unit 26 according to an exemplary embodiment may detect restored pixels constituting a line in a horizontal direction, a vertical direction, and a boundary direction of a predetermined object among the restored pixels of the restored image .

일 실시예에 따른 보상값은, 부호화 단계에서 상기 복원 픽셀들 및 대응하는 원본 픽셀들 간의 오차의 평균값을 이용하여 결정되어 전송된 것일 수 있다. 일 실시예에 따른 복원 픽셀 보상부(28)는, 수신된 하나의 보상값을 이용하여 픽셀값 보상 대상인 복원 픽셀들 전부를 보상할 수 있다. 또한, 일 실시예에 따른 추출부(22)에 의해 추출된 보상값이 픽셀 그룹별로 설정되어 있는 경우, 일 실시예에 따른 복원 픽셀 보상부(28)는, 픽셀값 보상 대상인 픽셀 그룹별로 개별적으로 결정된 보상값을 이용하여, 복원 픽셀들의 픽셀값을 보상할 수 있다.The compensation value according to an exemplary embodiment may be determined by using an average value of errors between the restored pixels and the corresponding original pixels in the encoding step and transmitted. The reconstructed pixel compensator 28 may compensate all of the reconstructed pixels to be compensated for using the received compensation value. When the compensation value extracted by the extracting unit 22 according to the embodiment is set for each pixel group, the reconstructed pixel compensating unit 28 according to an embodiment performs compensation for each pixel group, Using the determined compensation value, the pixel value of the restored pixels can be compensated.

일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10) 및 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는, 부호화된 영상이 복호화 및 복원된 경우 복원 영상이 원본 영상 간에 발생하는 시스템적 오차를 보상할 수 있다. The video encoding apparatus 10 for compensating for pixel values according to an embodiment and the video decoding apparatus 20 for compensating for pixel values according to an embodiment may be configured such that when a coded image is decoded and restored, The systematic error that occurs can be compensated.

복원 영상 및 원본 영상 간의 시스템적 오차의 일례로, 소정 그룹의 복원 픽셀들 및 그에 해당하는 원본 픽셀들에 대해 픽셀값의 오차의 평균값이 0이 아닌 경우가 발생한다. 따라서 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10) 및 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는, 복원 픽셀 및 원본 픽셀 간의 오차를 보상하고자 한다. As an example of the systematic error between the restored image and the original image, there occurs a case where the average value of the error of the pixel value is not 0 for the restored pixels of the predetermined group and the corresponding original pixels. Accordingly, the video encoding apparatus 10 for compensating for pixel values and the video decoding apparatus 20 for compensating for pixel values according to an embodiment of the present invention are intended to compensate for the error between the restored pixel and the original pixel .

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 아래 수학식 1에 따라, 보상값을 결정할 수 있다. The compensation value and pixel group determination unit 16 according to the embodiment can determine the compensation value according to Equation (1) below.

Figure 112015024366720-pat00001
Figure 112015024366720-pat00001

m 이 1, 2, ..., M-1, M의 정수이고, 위치

Figure 112015024366720-pat00002
의 픽셀들을 포함하는 픽셀 그룹
Figure 112015024366720-pat00003
에 대해, 원본 픽셀의 픽셀값
Figure 112015024366720-pat00004
, 복원 픽셀의 픽셀값
Figure 112015024366720-pat00005
간의 오차의 평균값
Figure 112015024366720-pat00006
이 픽셀 그룹
Figure 112015024366720-pat00007
에 대한 보상값으로 이용될 수 있다. m is an integer of 1, 2, ..., M-1, M,
Figure 112015024366720-pat00002
Lt; RTI ID = 0.0 >
Figure 112015024366720-pat00003
The pixel value of the original pixel
Figure 112015024366720-pat00004
, The pixel value of the restored pixel
Figure 112015024366720-pat00005
Mean value of error
Figure 112015024366720-pat00006
This pixel group
Figure 112015024366720-pat00007
Can be used as a compensation value.

일 실시예에 따른 복원 픽셀 보상부(28)는, 아래 수학식 2에 따라, 픽셀 그룹의 복원 픽셀들의 픽셀값을 보상할 수 있다. The reconstructed pixel compensator 28 according to the embodiment can compensate the pixel values of the reconstructed pixels of the pixel group according to Equation (2) below.

Figure 112015024366720-pat00008
Figure 112015024366720-pat00008

일 실시예에 따른 복원 픽셀 보상부(28)는, 복원 픽셀의 픽셀값

Figure 112015024366720-pat00009
를 보상값
Figure 112015024366720-pat00010
을 이용하여 보상함으로써, 픽셀 그룹
Figure 112015024366720-pat00011
에 대해 픽셀값이 보상된 결과 픽셀값
Figure 112015024366720-pat00012
을 픽셀별로 출력할 수 있다. The reconstructed pixel compensator 28 according to one embodiment reconstructs the reconstructed pixel value
Figure 112015024366720-pat00009
The compensation value
Figure 112015024366720-pat00010
The pixel group < RTI ID = 0.0 >
Figure 112015024366720-pat00011
The resulting pixel value < RTI ID = 0.0 >
Figure 112015024366720-pat00012
Can be outputted for each pixel.

일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10) 및 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는, 픽셀값 보상 대상인 픽셀 그룹을 결정하기 위해, 소정 기준에 따라 복원 픽셀들을 분류할 수 있다. The video encoding apparatus 10 for compensating for pixel values according to an embodiment and the video decoding apparatus 20 for compensating for pixel values according to an embodiment are arranged in accordance with a predetermined criterion It is possible to classify the restored pixels.

픽셀 그룹 결정의 제 1 실시예로서, 극값 레벨에 따라 픽셀 그룹들이 분류될 수 있다. 국부 극값(local extreme)으로는 국부 최소값(local minimum) 및 국부 최대값(local maximum)이 있다. 아래 수학식 3 및 4에 따라, 2차 함수 f(x,y)에 대하여, 소정 범위 ε 내에서 이웃하는 좌표 (x,y)의 국부 최소값 f(xmin, ymin) 및 국부 최대값 f(xmax, ymax)이 수학적으로 각각 정의된다. As a first embodiment of pixel group determination, pixel groups can be classified according to the extremum level. The local extreme has a local minimum and a local maximum. The local minimum value f ( xmin , ymin ) and the local maximum value f (x, y) of the neighboring coordinates (x, y) within the predetermined range epsilon are calculated for the quadratic function f (x max , y max ) are mathematically defined, respectively.

Figure 112015024366720-pat00013
Figure 112015024366720-pat00013

Figure 112015024366720-pat00014
Figure 112015024366720-pat00014

아래 수학식 5 및 6에 따라, 이산 신호 픽셀 (x,y)에 대하여, 국부 최소값 f(xmin, ymin) 및 국부 최대값 f(xmax, ymax)이 정의될 수 있다. A local minimum value f ( xmin , ymin ) and a local maximum value f ( xmax , ymax ) can be defined for the discrete signal pixel (x, y) according to the following equations (5) and (6).

Figure 112015024366720-pat00015
Figure 112015024366720-pat00015

Figure 112015024366720-pat00016
Figure 112015024366720-pat00016

일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10) 및 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는, 수학식 5 및 6에 따라, 소정 이웃하는 복원 픽셀들 중 극값에 해당하는 픽셀들을 결정할 수 있다. The video encoding apparatus 10 for compensating a pixel value according to an embodiment and the video decoding apparatus 20 for compensating a pixel value according to an embodiment may be arranged such that, in accordance with Equations 5 and 6, Pixels corresponding to the extreme values can be determined.

일반적인 비디오 부복호화 시스템에 의해 평탄화 현상이 발생할 수 있다. 이에 따라, 복원 영상 중 국부 최소값은 원본 영상의 픽셀값에 비해 더 커지고, 복원 영상 및 원본 영상 간에 국부 최소값에 대한 오차는 양의 값이다. 또한, 복원 영상 중 국부 최대값은 원본 영상의 픽셀값에 비해 더 작아지고, 복원 영상 및 원본 영상 간에 국부 최대값에 대한 오차는 음의 값이다. A flattening phenomenon may occur by a general video decoding system. Accordingly, the local minimum value of the restored image is larger than the pixel value of the original image, and the error between the restored image and the original image is positive with respect to the local minimum value. Also, the local maximum value of the restored image is smaller than the pixel value of the original image, and the error between the local maximum value and the restored image is negative.

이에 따라, 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10) 및 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는, 소정 픽셀 그룹에 대한 복원 영상 및 원본 영상 간에 국부 최소값 및 최대값에 대한 평균 오차를 각각 결정하여, 해당 픽셀 그룹의 복원 픽셀들의 픽셀값을 보상해줄 수 있다. 이하 도 3을 참조하여, 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10)의 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)의 픽셀 그룹 결정부(26)가, 소정 픽셀 그룹의 복원 픽셀의 극값 레벨을 결정하는 방식이 상술된다.Accordingly, the video encoding apparatus 10 for compensating for pixel values according to an embodiment and the video decoding apparatus 20 for compensating for pixel values according to an embodiment are capable of correcting An average error between the minimum value and the maximum value may be respectively determined to compensate the pixel values of the restored pixels of the corresponding pixel group. 3, the compensation value of the video coding apparatus 10 for pixel value compensation according to an embodiment and the compensation value of the pixel group deciding unit 16 and the video decoding apparatus 20 ) Determines the extreme level of the restored pixel of the predetermined pixel group is described in detail.

도 3 은 일 실시예에 따라 복원 픽셀의 극값 레벨을 결정하기 위해 비교 대상이 되는 이웃하는 복원 픽셀들을 도시한다.FIG. 3 illustrates neighboring reconstructed pixels to be compared to determine the extreme level of the reconstructed pixel, according to one embodiment.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 현재 복원 픽셀(30)을 중심으로 상하좌우에 이웃하는 복원 픽셀들(32, 34, 35, 37)과 비교하여 현재 복원 픽셀(30)의 극값 레벨을 결정할 수 있다. 현재 복원 픽셀(30)의 극값 레벨을 나타내는 파라미터 'ExtremeType', 현재 복원 픽셀(30)의 픽셀값 Rec[x][y], 이웃하는 복원 픽셀들(32, 34, 35, 37)의 픽셀값 Rec[x][y-1], Rec[x-1][y], Rec[x+1][y], Rec[x][y+1]인 경우, 극값 레벨 결정 과정은 아래와 같다. The compensation value and pixel group determination unit 16 and the pixel group determination unit 26 according to an exemplary embodiment of the present invention may be configured such that the reconstructed pixels 32, 34, 35, 37) to determine the extreme level of the current reconstructed pixel 30. [ The pixel value Rec [x] [y] of the current reconstructed pixel 30, the pixel value of the neighboring reconstructed pixels 32, 34, 35, and 37, In the case of Rec [x] [y-1], Rec [x-1] [y], Rec [x + 1] [y] and Rec [x] [y + 1]

ExtremeType = 0;ExtremeType = 0;

if(Rec[x][y] > Rec[x-1][y]) ExtremeType++;if (Rec [x] [y]> Rec [x-1] [y]) ExtremeType ++;

if(Rec[x][y] < Rec[x-1][y]) ExtremeType--;if (Rec [x] [y] <Rec [x-1] [y]) ExtremeType--;

if(Rec[x][y] > Rec[x+1][y]) ExtremeType++;if (Rec [x] [y]> Rec [x + 1] [y]) ExtremeType ++;

if(Rec[x][y] < Rec[x+1][y]) ExtremeType--;if (Rec [x] [y] <Rec [x + 1] [y]) ExtremeType--;

if(Rec[x][y] > Rec[x][y-1]) ExtremeType++;if (Rec [x] [y]> Rec [x] [y-1]) ExtremeType ++;

if(Rec[x][y] < Rec[x][y-1]) ExtremeType--;if (Rec [x] [y] <Rec [x] [y-1]) ExtremeType--;

if(Rec[x][y] > Rec[x][y+1]) ExtremeType++;if (Rec [x] [y]> Rec [x] [y + 1]) ExtremeType ++;

if(Rec[x][y] < Rec[x][y+1]) ExtremeType--;if (Rec [x] [y] <Rec [x] [y + 1]) ExtremeType--;

즉, 현재 복원 픽셀(30)의 소정 범위의 이웃하는 복원 픽셀들(32, 34, 35, 37)과 픽셀값을 비교하여 극값 레벨 'ExtremeType'이 결정된다. 현재 복원 픽셀(30)의 극값 레벨 ExtremeType이 최대 극값 레벨인 4라면 현재 복원 픽셀(30)은 국부 최대 픽셀로 결정되고, 현재 복원 픽셀(30)의 극값 레벨 ExtremeType이 최소 극값 레벨인 -4라면 현재 복원 픽셀(30)은 국부 최소 픽셀로 결정될 수 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 국부 최대 픽셀 및 국부 최소 픽셀로 결정된 복원 픽셀을 보상될 픽셀로 결정할 수 있다. That is, the pixel value is compared with neighboring restored pixels 32, 34, 35, 37 of a predetermined range of the restored pixel 30 to determine the extreme value 'ExtremeType'. If the extreme level ExtremeType of the current restoration pixel 30 is the maximum extreme value level 4, the current restoration pixel 30 is determined as the local maximum pixel, and if the extreme level ExtremeType of the current restoration pixel 30 is the minimum extreme level -4, The reconstruction pixel 30 may be determined to be a local minimum pixel. The compensation value and pixel group determination unit 16 according to the embodiment and the pixel group determination unit 26 according to an embodiment can determine a restored pixel determined as a local maximum pixel and a local minimum pixel as a pixel to be compensated.

이러한 방식으로 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 현재 데이터 단위의 복원 픽셀들에 대한 극값 레벨을 결정하여, 극값 레벨이 4인 복원 픽셀들을 포함하는 픽셀 그룹 및 극값 레벨인 -4인 픽셀 그룹을 픽셀값이 보상될 픽셀 그룹을 결정할 수 있다. 또한, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 픽셀 그룹별로 복원 픽셀들 및 각각의 원본 픽셀 간의 픽셀값 오차의 평균값을 결정하고, 오차에 기초하여 보상값을 결정할 수 있다. 일 실시예에 따른 픽셀 그룹 결정부(26) 및 복원 픽셀 보상부(28)는, 수신된 보상값 정보로부터 추출된 보상값을 이용하여 픽셀 그룹마다 복원 픽셀들의 픽셀값을 보상할 수 있다. In this manner, the compensation value and pixel group determination unit 16 according to the embodiment and the pixel group determination unit 26 according to the embodiment determine the extremum level for the restored pixels of the current data unit, A pixel group including the four restored pixels and a pixel group including the extreme level of -4 can be determined. In addition, the compensation value and pixel group determination unit 16 according to an exemplary embodiment may determine an average value of pixel value errors between the restored pixels and each original pixel on a pixel group basis, and determine a compensation value based on the error . The pixel group determining unit 26 and the reconstructed pixel compensating unit 28 according to the embodiment can compensate the pixel values of the reconstructed pixels for each pixel group using the compensation value extracted from the received compensation value information.

또한, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 국부 최대 픽셀 및 국부 최소 픽셀에 이웃하는 복원 픽셀들을 포함하는 픽셀 그룹을 픽셀값 보상 대상으로 결정할 수도 있다. 이를 위해 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 최대 극값 레벨 및 최소 극값 레벨을 포함하여 소정 범위의 극값 레벨들에 대해 보상값을 결정할 수 있다. 예를 들어, 앞서 예시한 최대 극값 레벨이 4이므로 극값 레벨이 3인 복원 픽셀들은 국부 최대 픽셀에 이웃함을 나타낼 수 있다. In addition, the compensation value and pixel group determination unit 16 and the pixel group determination unit 26 according to the embodiment according to the embodiment may be configured to determine the pixel group including the restoration pixels neighboring the local maximum pixel and the local minimum pixel, The pixel value compensation target may be determined. To this end, the compensation value and pixel group determination unit 16 and the pixel group determination unit 26 according to an exemplary embodiment of the present invention may be configured to determine a compensation value and pixel group determination unit 26 for a predetermined range of extremum levels including a maximum extremum level and a minimum extremum level The compensation value can be determined. For example, since the maximum peak level illustrated above is 4, restored pixels having an extremum level of 3 may indicate neighboring a local maximum pixel.

따라서, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 극값 레벨이 소정 양의 값보다 큰 경우, 해당 극값 레벨의 복원 픽셀들을 포함하는 픽셀 그룹들은 최대 극값 레벨의 이웃하는 픽셀 그룹으로 결정하고, 극값 레벨이 소정 음의 값보다 작은 경우, 해당 극값 레벨의 복원 픽셀들은 최소 극값 레벨의 이웃하는 픽셀 그룹으로 결정할 수 있다. 예를 들어, 극값 레벨이 1보다 크거나 -1보다 작은 경우, 즉 극값 레벨이 -4, -3, -2, 2, 3, 4인 경우, 극값 레벨별 보상값이 결정될 수 있다.Therefore, the compensation value and pixel group determination unit 16 and the pixel group determination unit 26 according to the embodiment of the present invention are capable of determining the restoration pixels of the corresponding extremum level when the extremum level is greater than a predetermined positive value The pixel groups including the pixel groups are determined as a group of neighboring pixels of the maximum extreme level, and when the extreme level is smaller than a predetermined negative value, the restoration pixels of the extreme level may be determined as a group of neighboring pixels of the minimum extreme level. For example, when the extremum level is greater than 1 or less than -1, that is, when the extremum levels are -4, -3, -2, 3, 4, the compensation value for each extremum level can be determined.

또한, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는, 최대 극값 레벨의 이웃하는 픽셀 그룹마다, 픽셀 그룹별로 복원 픽셀 및 원본 픽셀 간의 오차의 평균값을 산출하여, 해당 픽셀 그룹별 보상값을 결정할 수 있다. 또한, 일 실시예에 따른 픽셀 그룹 결정부(26) 및 복원 픽셀 보상부(28)는, 수신된 보상값 정보로부터 추출된 픽셀 그룹별 보상값을 이용하여, 픽셀 그룹마다 복원 픽셀들의 픽셀값을 보상할 수 있다. In addition, the compensation value and pixel group determination unit 16 according to an exemplary embodiment calculates an average value of the error between the restored pixel and the original pixel for each pixel group for each neighboring pixel group of the maximum extreme level, Value can be determined. The pixel group determining unit 26 and the reconstructed pixel compensating unit 28 according to the exemplary embodiment may use the compensated values for each pixel group extracted from the received compensation value information to calculate the pixel values of the reconstructed pixels for each pixel group You can compensate.

앞서 현재 복원 픽셀(30)을 중심으로 상하좌우로 이웃하는 4개의 복원 픽셀들(32, 34, 35, 37)을 이용하여 극값 레벨이 결정되었지만, 보다 세부적인 극값 레벨의 분류를 위해, 현재 복원 픽셀(30)을 둘러싼 8개의 복원 픽셀들(31, 32, 33, 34, 35, 36, 37, 38)을 이웃하는 복원 픽셀로서 이용하여 현재 복원 픽셀(30)의 극값 레벨이 결정될 수도 있다. The extreme level is determined using four reconstructed pixels 32, 34, 35, and 37 neighboring up, down, left, and right with respect to the current reconstructed pixel 30. However, The extreme level of the current reconstruction pixel 30 may be determined using the eight reconstructed pixels 31, 32, 33, 34, 35, 36, 37, 38 surrounding the pixel 30 as neighboring reconstructed pixels.

픽셀 그룹 결정의 제 2 실시예로서, 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10) 및 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는 픽셀값을 소정 개수 이상의 대역으로 분류할 수 있다. As a second embodiment of pixel group determination, a video encoding apparatus 10 for compensating for pixel values according to an embodiment and a video decoding apparatus 20 for compensating for pixel values according to an embodiment, Band.

예를 들어, 복원 픽셀의 비트 뎁스가 N인 경우, 복원 픽셀의 픽셀값 Rec[x][y]의 총 범위는 ≤ Rec[x][y] ≤ 2N-1이다. 즉, 복원 픽셀의 픽셀값 Rec[x][y]의 최대값 Max는 2N-1이며, 복원 픽셀의 구간은 [0, Max]이다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 복원 픽셀의 구간을 L 개의 대역으로 분할할 수 있다. 즉, 복원 픽셀의 대역은, [0, (Max + 1)/L -1], [Max/L, 2*(Max + 1)/L -1], [2*Max/L, 3*(Max + 1)/L -1], ... , [(L-1)*Max/L, L*(Max + 1)/L -1]로 분할될 수 있다.For example, when the bit depth of the restored pixel is N, the total range of the pixel value Rec [x] [y] of the restored pixel is ≤ Rec [x] [y] ≤ 2 N -1. That is, the maximum value Max of the pixel value Rec [x] [y] of the restored pixel is 2 N -1, and the interval of the restored pixel is [0, Max]. The compensation value and pixel group determination unit 16 and the pixel group determination unit 26 according to an exemplary embodiment may divide the segment of the restored pixel into L bands. That is, the bands of the restored pixels are [0, (Max + 1) / L -1], [Max / L, 2 * (Max + 1) / L -1], ..., [(L-1) * Max / L, L * (Max + 1) / L -1].

복원 픽셀의 구간은 [0, Max]의 분할 대역의 개수 L은 신속한 연산을 위해 2의 제곱수이며 16 이상으로 결정되는 것이 바람직하다. 또한 신속한 연산을 위해, 분할 대역의 개수 L은, 복원 픽셀 값의 최상위 비트의 개수 p가 2의 지수가 되는 수 이내에서 결정되는 것이 바람직하다. 예를 들어, 복원 픽셀의 최상위 비트가 4비트(p = 4)이고, 복원 픽셀의 확장된 비트 뎁스가 12비트인 경우, 분할 대역의 개수 L은 L = 2p = 16으로 결정될 수 있다. 따라서, 이 경우, 확장된 비트 뎁스의 복원 픽셀의 대역은 아래 표 1과 같이 분할될 수 있다. The number of divided bands [0, Max] of the restored pixel is preferably determined to be a square of 2 and more than 16 for fast calculation. Also, for quick calculation, it is preferable that the number L of divided bands is determined within a number in which the number p of the most significant bits of the reconstructed pixel value is an exponent of 2. For example, when the most significant bit of the restored pixel is 4 bits (p = 4) and the extended bit depth of the restored pixel is 12 bits, the number L of divided bands may be determined as L = 2 p = 16. Therefore, in this case, the bandwidth of the reconstructed pixel of the extended bit depth can be divided as shown in Table 1 below.

대역 번호Band number 00 1One 22 ...... 1616 복원 픽셀의 픽셀값 대역The pixel value band of the reconstructed pixel. [0, 255][0, 255] [256, 511][256, 511] [512, 767][512, 767] ...... [3840, 4095][3840, 4095] 픽셀값의 16진수 표현법Hexadecimal representation of pixel values [0x0000, 0x00FF][0x0000, 0x00FF] [0x0100, 0x01FF][0x0100, 0x01FF] [0x0200, 0x02FF][0x0200, 0x02FF] ...... [0x0F00, 0x0FFF][0x0F00, 0x0FFF]

복원 픽셀의 최상위 비트의 개수에 기초하여 픽셀값 대역이 분할되는 경우 비트 연산에 유리하므로, 복호화단인 일 실시예에 따른 픽셀 그룹 결정부(26)의 픽셀 대역 결정을 위한 연산이 매우 효율적으로 수행될 수 있다.Since the pixel value band is divided based on the number of the most significant bits of the restored pixel, the calculation for the pixel band determination of the pixel group determination unit 26 according to the embodiment, which is a decoding end, is performed very efficiently .

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 동일한 대역에 포함되는 복원 픽셀들을 대역별 픽셀 그룹으로 결정할 수 있다. The compensation value and pixel group determination unit 16 and the pixel group determination unit 26 according to an exemplary embodiment may determine the restored pixels included in the same band as a group of pixels for each band.

대역별 픽셀 그룹에 포함된 복원 픽셀들에 대한 원본 픽셀과의 픽셀값 오차의 평균은 0이 아니다. 따라서, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는 대역별로 픽셀값 오차의 평균을 이용하여 보상값을 결정할 수 있다. 또한, 일 실시예에 따른 픽셀 그룹 결정부(26) 및 복원 픽셀 보상부(28)는, 수신된 보상값 정보로부터 추출된 대역별 보상값을 이용하여, 대역별 픽셀 그룹마다 복원 픽셀들의 픽셀값을 보상할 수 있다. The average of the pixel value error with the original pixel for the restored pixels included in the band-by-band pixel group is not zero. Accordingly, the compensation value and the pixel group determination unit 16 according to the embodiment can determine the compensation value using the average of the pixel value errors for each band. The pixel group determining unit 26 and the reconstructed pixel compensating unit 28 according to an exemplary embodiment use the band-specific compensation values extracted from the received compensation value information to calculate the pixel values Can be compensated.

픽셀 그룹 결정의 제 3 실시예로서, 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10) 및 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는, 복원 픽셀들 중 소정 라인을 구성하는 복원 픽셀들을 포함하는 픽셀 그룹을 분류할 수 있다. As a third embodiment of pixel group determination, a video encoding apparatus 10 for compensating for pixel values according to an embodiment and a video decoding apparatus 20 for compensating for pixel values according to an embodiment, It is possible to classify the pixel group including the restored pixels constituting the line.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 복원 영상의 영상 특성을 분석하여, 수직 방향의 라인, 수평 방향의 라인 및 소정 경계선을 구성하는 라인 등의 소정 방향의 라인을 검출할 수 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 동일한 라인을 구성하는 복원 픽셀들을 라인별 픽셀 그룹으로 결정할 수 있다. The compensation value and pixel group determination unit 16 according to the embodiment and the pixel group determination unit 26 according to an embodiment analyze the image characteristic of the restored image to detect the vertical line, It is possible to detect a line in a predetermined direction such as a line constituting a boundary line. The compensation value and pixel group determination unit 16 according to the embodiment and the pixel group determination unit 26 according to the embodiment can determine the restored pixels constituting the same line as a pixel group per line.

라인별 픽셀 그룹에 포함된 복원 픽셀들에 대한 원본 픽셀과의 픽셀값 오차의 평균도 0이 아니다. 따라서, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는 라인마다 픽셀값 오차의 평균을 이용하여 보상값을 결정할 수 있다. 또한, 일 실시예에 따른 픽셀 그룹 결정부(26) 및 복원 픽셀 보상부(28)는, 수신된 보상값 정보로부터 추출된 라인별 보상값을 이용하여, 라인별 픽셀 그룹마다 복원 픽셀들의 픽셀값을 보상할 수 있다. The average of the pixel value errors with the original pixels for the restored pixels included in the line-by-line pixel group is also not zero. Accordingly, the compensation value and pixel group determination unit 16 according to the embodiment can determine the compensation value using an average of the pixel value errors per line. The pixel group determining unit 26 and the reconstructed pixel compensating unit 28 according to an exemplary embodiment may use the compensation value for each line extracted from the received compensation value information to calculate a pixel value Can be compensated.

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16) 및 일 실시예에 따른 픽셀 그룹 결정부(26)는, 비디오의 영상 시퀀스, 프레임 또는 블록 등의 데이터 단위별로, 극값 레벨별 보상값을 결정할 수 있다. 일 실시예에 따른 전송부(18)는, 보상값을 포함하는 보상값 관련 정보를, 오버헤드 정보로서 부호화하여 전송할 수 있다. 극값 레벨별 보상값을 결정하는 데이터 단위가 작으면 작을수록 보상값의 정확도는 향상되지만, 보상값을 포함하는 보상값 관련 정보를 부호화하여 전송하기 위한 부가 정보가 증가될 수 있으므로, 오버헤드가 증가할 수 있다. The compensation value and pixel group determination unit 16 and the pixel group determination unit 26 according to the embodiment of the present invention calculate the compensation value for each extremum level for each data unit such as video sequence, You can decide. The transmitting unit 18 according to an embodiment can transmit the compensation value related information including the compensation value as overhead information and transmit it. The smaller the data unit for determining the compensation value for each extremum level, the better the accuracy of the compensation value. However, since the additional information for coding and transmitting the compensation value-related information including the compensation value can be increased, can do.

또한 일 실시예에 따른 추출부(22)는, 오버헤드 정보 또는 슬라이스 헤더 정보로부터 보상값 관련 정보를 추출하여, 보상값을 이용하여 복원 픽셀의 픽셀값을 보상할 수 있다.
In addition, the extracting unit 22 may extract the compensation value related information from the overhead information or the slice header information, and compensate the pixel value of the restored pixel by using the compensation value.

일 실시예에 따른 복원 영상 생성부(14) 및 일 실시예에 따른 복원 영상 생성부(24)는, 공간 영역으로 복호화된 영상 데이터에 대해 선택적으로 적응적 루프 필터링을 수행할 수 있다. 일 실시예에 따른 복원 영상 생성부(14) 및 일 실시예에 따른 복원 영상 생성부(24)는 적응적 루프 필터링에 따라, 수평 방향의 1차원 필터링 및 수직 방향의 1차원 필터링을 연속적으로 수행하고 현재 픽처를 복원할 수 있다. The reconstructed image generating unit 14 and the reconstructed image generating unit 24 according to an embodiment may selectively perform adaptive loop filtering on the image data decoded into the spatial domain. The reconstructed image generating unit 14 and the reconstructed image generating unit 24 according to an embodiment continuously perform one-dimensional filtering in the horizontal direction and one-dimensional filtering in the vertical direction according to the adaptive loop filtering And the current picture can be restored.

일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 장치(10)의 전송부(18)는 적응적 루프 필터링에 이용되는 필터 계수를 부호화하여 출력할 수 있다. 또한, 일 실시예에 따른 적응적 루프 필터링을 위해, 각각의 1차원 필터의 종류, 개수, 크기, 양자화 비트, 계수, 필터링 방향, 필터링 수행 여부 및 러닝 필터링 수행 여부 등이 설정될 수 있으므로, 루프 필터링의 1차원 필터 세트에 대한 정보가 부호화되어 전송될 수도 있다.The transmitter 18 of the video encoding apparatus 10 for pixel value compensation according to an exemplary embodiment may encode and output a filter coefficient used for adaptive loop filtering. In addition, for adaptive loop filtering according to an embodiment, the type, number, size, quantization bit, coefficient, filtering direction, whether to perform filtering, and whether to perform running filtering can be set for each one- Information about a one-dimensional filter set of filtering may be encoded and transmitted.

일 실시예에 따른 복원 영상 생성부(24)는, 추출부(22)로부터 추출된 필터 계수의 잔차 정보를 이용하여, 각각의 1차원 필터의 필터 계수를 유도할 수 있다. The reconstructed image generating unit 24 may derive the filter coefficients of each one-dimensional filter using the residual information of the filter coefficients extracted from the extracting unit 22. [

예를 들어, 각각의 1차원 필터마다, 현재 필터 계수 및 이전 필터 계수 간의 차이값을 이전 필터 계수에 더함으로써 현재 필터 계수가 유도될 수 있다. 유도된 각각의 1차원 필터의 필터 계수를 이용하여, 디블로킹된 데이터에 대해 연속적인 1차원 필터링이 수행될 수 있다. 디블로킹은 복호화된 데이터의 블록 효과를 감소시키고, 루프 필터링은 복원 영상 및 원본 영상 간의 오차를 최소화시킨다.For example, for each one-dimensional filter, the current filter coefficient may be derived by adding the difference between the current filter coefficient and the previous filter coefficient to the previous filter coefficient. Using the filter coefficients of each derived one-dimensional filter, continuous one-dimensional filtering can be performed on the deblocked data. Deblocking reduces the block effect of the decoded data, and loop filtering minimizes the error between the reconstructed image and the original image.

발명의 구체적인 이해를 위해, 수평 방향 및 수직 방향의 연속적인 1차원 필터링에 의한 루프 필터링을 이하 수학식을 참조하여 상술한다. For a specific understanding of the invention, loop filtering by continuous one-dimensional filtering in the horizontal and vertical directions will be described below with reference to the mathematical expression.

현재 필터 계수는 수학식 7에 따라 유도될 수 있다.The current filter coefficient may be derived according to equation (7).

Figure 112015024366720-pat00017
Figure 112015024366720-pat00017

여기서 i는 1차원 필터의 인덱스를 나타내며, j는 각 1차원 필터의 필터 계수의 인덱스를 나타낸다. c[i][j] 는 현재 필터 계수, adaptive_loop_filter_prev[i][j]는 이전 필터 계수, adaptive_loop_filter[i][j]는 필터 계수 정보로서 전송된 필터 계수의 잔차 성분을 나타낸다. Where i represents the index of the one-dimensional filter and j represents the index of the filter coefficient of each one-dimensional filter. c [i] [j] denotes the current filter coefficient, adaptive_loop_filter_prev [i] [j] denotes the previous filter coefficient, and adaptive_loop_filter [i] [j] denotes the residual component of the filter coefficient transmitted as the filter coefficient information.

즉, 현재 필터 계수는 이전 필터 계수 및 잔차 성분의 합으로 유도될 수 있다. 현재 필터 계수를 유도한 후 다음 필터 계수를 유도하기 위해, 현재 필터 계수 c[i][j]가 adaptive_loop_filter_prev[i][j]으로 갱신된다.That is, the current filter coefficient may be derived as the sum of the previous filter coefficient and the residual component. The current filter coefficient c [i] [j] is updated to adaptive_loop_filter_prev [i] [j] to derive the next filter coefficient after deriving the current filter coefficient.

연속적인 1차원 필터링에 의한 루프 필터링은 수학식 2 및 3에 따라 수행될 수 있다. 수학식 8 및 9에서 i는 현재 픽처의 너비 방향의 인덱스, j는 현재 픽처의 높이 방향의 인덱스를 나타낸다.Loop filtering by continuous one-dimensional filtering can be performed according to equations (2) and (3). In Equations (8) and (9), i represents the width direction index of the current picture, and j represents the height direction index of the current picture.

Figure 112015024366720-pat00018
Figure 112015024366720-pat00018

pi ,j는 현재 픽처의 디블로킹된 데이터를 나타내며, qi ,j는 디블로킹된 데이터에 대해 수평 방향의 1차원 필터링된 데이터를 나타낸다. 대칭형 필터의 필터 계수 c를 이용하여, 9개의 디블로킹된 데이터에 대해 5개의 필터 계수를 이용하여 대칭적으로 필터링된다. p i , j represents the deblocked data of the current picture, and q i , j represents the one-dimensional filtered data in the horizontal direction with respect to the deblocked data. Using the filter coefficient c of the symmetric filter, it is symmetrically filtered using five filter coefficients for the nine deblocked data.

Figure 112015024366720-pat00019
Figure 112015024366720-pat00019

fi ,j 는 qi ,j에 대해 수직 방향의 1차원 필터링한 데이터를 나타낸다. 필터 계수 c는 러닝 필터링 방식을 따르므로, 수평 방향의 1차원 필터링된 데이터에 대해 연속적으로 수직 방향의 1차원 필터링이 수행된다. f i , j represents one-dimensional filtered data in the vertical direction with respect to q i , j . Since the filter coefficient c follows the running filtering method, vertical one-dimensional filtering is continuously performed on the one-dimensional filtered data in the horizontal direction.

대칭형 필터의 경우, 2차원 필터에 비해 1차원 필터가 소량의 계수만으로도 모든 필터의 계수가 설정될 수 있다는 장점이 있다. 따라서, 2차원 필터에 비해 복수의 1차원 필터 세트가 전송 비트스트림에 삽입되어야 할 필터 특성과 관련된 비트가 상대적으로 적게 필요하다. In the case of a symmetric filter, the advantage is that the coefficients of all filters can be set even if only a small number of coefficients are required for a one-dimensional filter compared to a two-dimensional filter. Thus, there is a relatively small number of bits associated with the filter characteristics that a plurality of one-dimensional filter sets should be inserted into the transmitted bitstream than a two-dimensional filter.

또한, 필터링 동안 임시 데이터를 저장하기 위한 메모리의 용량도 2차원 필터에 비해 1차원 필터가 적다. 2차원 필터에 의한 필터링의 연산량은 1차원 필터링에 비해 현저히 크다. 러닝 필터링의 경우 2차원에서는 불가능한 다수 필터링에 의한 병행 처리가 불가능하지만, 1차원 필터에 의해서는 병행 처리가 가능하다.Also, the capacity of the memory for storing the temporary data during the filtering is smaller than that of the two-dimensional filter. The amount of computation of filtering by the two-dimensional filter is considerably larger than that of the one-dimensional filtering. In the case of running filtering, it is impossible to perform concurrent processing by multiple filtering which is impossible in two dimensions, but it is possible to perform concurrent processing by a one-dimensional filter.

하지만, 일 실시예에 따른 루프 필터링은 수평 방향 및 수직 방향의 연속적인 1차원 필터링에 한정되는 것은 아니다. 일 실시예에 따른 루프 필터링은, 임의의 개수의 1차원 필터의 연속적인 필터링으로 구현될 수 있으며, 각각의 1차원 필터링은 임의의 방향으로 수행될 수 있다.However, loop filtering according to an embodiment is not limited to continuous one-dimensional filtering in the horizontal direction and the vertical direction. The loop filtering according to one embodiment can be implemented with continuous filtering of any number of one-dimensional filters, and each one-dimensional filtering can be performed in any direction.

일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 장치(20)는 필터 계수 정보 이외에 루프 필터링의 1차원 필터 세트에 대한 정보를 수신받아, 각각의 1차원 필터의 종류, 개수, 크기, 양자화 비트, 계수, 필터링 방향, 필터링 수행 여부 및 러닝 필터링 수행 여부 등을 확인할 수 있다. 이에 따라, 일 실시예에 따른 복원 영상 생성부(24)는 다양한 1차원 필터의 조합에 의한 루프 필터링을 수행할 수 있다.In addition to the filter coefficient information, the video decoding apparatus 20 for pixel value compensation according to an exemplary embodiment receives information on a one-dimensional filter set of loop filtering, and determines the type, number, size, quantization bit, Coefficient, direction of filtering, whether to perform filtering, and whether to perform running filtering. Accordingly, the reconstructed image generating unit 24 according to an exemplary embodiment can perform loop filtering by combining various one-dimensional filters.

이하 도 4 및 5를 참조하여, 일 실시예에 따른 복원 영상 생성부(14) 및 일 실시예에 따른 복원 영상 생성부(24)의 적응적 루프 필터링을 상술한다.4 and 5, the adaptive loop filtering of the reconstructed image generating unit 14 and the reconstructed image generating unit 24 according to an embodiment will be described in detail.

도 4 는 일 실시예에 따른 적응적 루프 필터링의 흐름도를 도시한다.4 illustrates a flow diagram of adaptive loop filtering in accordance with one embodiment.

복수의 1차원 필터들이 연속적으로 필터링됨으로써 루프 필터링이 수행될 수 있다. 단계 41에서, 복호화된 영상 데이터가 입력될 수 있다. 복호화된 후 디블로킹 필터링이 수행된 영상 데이터가 입력될 수도 있다. 단계 42에서 제 1 필터, 제 2 필터 내지 제 N 필터의 모든 필터의 사용 여부가 결정되고, 모두 사용하지 않기로 결정되면 저장 또는 재생 단계(단계 46)로 곧바로 진행한다. 단계 42에서 모든 필터에 의한 필터링을 수행하기로 결정하기로 결정되면, 필터링 순서에 따라, 단계 43에서 제 1 필터를 이용한 제 1 필터링 방향의 1차원 필터링, 단계 44에서 제 2 필터를 이용한 제 2 필터링 방향의 1차원 필터링, 단계 45에서 제 N 필터를 이용한 제 N 필터링 방향의 1차원 필터링까지 순서대로 수행될 수 있다.Loop filtering can be performed by successively filtering a plurality of one-dimensional filters. In step 41, the decoded image data can be input. Image data on which deblocking filtering has been performed may be input. In step 42, it is determined whether or not all the filters of the first filter, the second filter, and the Nth filter are used. If it is determined that all the filters are not used, the process proceeds directly to the storing or reproducing step (step 46). If it is determined in step 42 that it is determined to perform filtering by all the filters, the one-dimensional filtering of the first filtering direction using the first filter in step 43, the second filtering using the second filter in step 44, The one-dimensional filtering of the filtering direction, and the one-dimensional filtering of the Nth filtering direction using the Nth filter in step 45, in that order.

단계 46에서는, 복호화된 영상 데이터, 디블로킹된 영상 데이터 또는 연속적으로 1차원 필터링된 데이터가 버퍼에 저장되거나 재생 장치에서 재생된다.In step 46, the decoded image data, deblocked image data, or successively one-dimensional filtered data is stored in a buffer or reproduced in a reproducing apparatus.

일 실시예의 1차원 필터의 필터링 방향은 영상 특성의 분석을 통해 국부 영상의 특성에 적응적으로 결정될 수 있다. 예를 들어, 영상의 에지를 보존하기 위해 국부 영상의 에지 방향에 적응적으로 필터링 방향이 결정될 수 있다.The filtering direction of the one-dimensional filter of one embodiment can be adaptively determined to the characteristics of the local image through analysis of the image characteristic. For example, the filtering direction may be adaptively determined in the edge direction of the local image to preserve the edge of the image.

도 5 는 다른 실시예에 따른 적응적 루프 필터링의 흐름도를 도시한다.5 shows a flow diagram of adaptive loop filtering according to another embodiment.

단계 51 에서 복호화된 영상 데이터 또는 디블로킹된 영상 데이터가 입력되면, 단계 52에서는 복호화된 영상 데이터의 각각의 픽셀마다 에지가 검출된다. 단계 53에서는 검출된 에지 방향에 따라 1차원 필터링이 수행되고, 단계 54에서 필터링된 데이터는 저장되거나 재생 장치에서 재생된다.When the decoded image data or deblocked image data is input in step 51, an edge is detected for each pixel of the decoded image data in step 52. [ In step 53, one-dimensional filtering is performed according to the detected edge direction, and the filtered data in step 54 is stored or reproduced on the reproducing apparatus.

비디오 부호화 과정에서 에지 방향에 따라 결정된 필터링 방향을 포함한 1차 필터 세트에 관한 정보는 부호화되어 복호화단에 제공된다. 비디오 복호화 과정에서는 수신된 데이터로부터 루프 필터에 관한 정보를 판독하여, 소정 1차원 필터의 에지 방향 등의 필터링 방향에 따른 1차원 필터링이 수행될 수 있다.Information regarding the first-order filter set including the filtering direction determined according to the edge direction in the video encoding process is encoded and provided to the decoding end. In the video decoding process, information about the loop filter is read from the received data, and one-dimensional filtering according to a filtering direction such as an edge direction of a predetermined one-dimensional filter can be performed.

루프 필터링에 의한 후처리는 복잡한 손실 압축에 의해 발생하는 원본 영상 및 복원 영상 간의 왜곡을 감소시킬 수 있다. 또한, 루프 필터링된 영상을 참조 영상으로 이용함으로써, 예측 또는 움직임 보상의 결과 영상의 화질이 향상될 수 있다. The post-processing by loop filtering can reduce the distortion between the original image and the reconstructed image caused by complicated loss compression. Further, by using the loop-filtered image as a reference image, the image quality of a resultant image of prediction or motion compensation can be improved.

이에 따라, 일 실시예에 따른 복원 영상 생성부(14) 및 일 실시예에 따른 복원 영상 생성부(24)는, 선택적으로 적응적 루프 필터링을 수행함으로써 다양한 특징의 1차원 필터의 조합을 통해 영상의 특징, 시스템 환경 또는 사용자 요구 등을 고려한 루프 필터링을 수행할 수 있다. 일 실시예에 따른 적응적 루프 필터링에 의해, 2차원 필터 대신 연속적인 1차원 필터가 이용되므로 2차원 필터에 비해 메모리, 연산량, 전송 비트 등의 다양한 방면에서 유리할 수 있다. 또한, 일 실시예에 따른 복원 영상 생성부(14) 및 일 실시예에 따른 복원 영상 생성부(24)가 적응적 루프 필터링을 수행하는 경우, 일 실시예에 따른 전송부(18) 및 일 실시예에 따른 추출부(22)는 부호화된 필터 계수의 잔차 성분이 부호화된 정보를 송수신하므로, 적응적 루프 필터링을 위해 필요한 정보량의 부담이 경감될 수 있다.
Accordingly, the reconstructed image generating unit 14 and the reconstructed image generating unit 24 according to an embodiment selectively perform adaptive loop filtering to generate a reconstructed image using a combination of one- The loop filter can be performed in consideration of the characteristics of the system, the system environment, or the user demand. By adaptive loop filtering according to an embodiment, a continuous one-dimensional filter is used instead of a two-dimensional filter, so that it can be advantageous in various aspects such as memory, calculation amount, and transmission bit compared with a two-dimensional filter. In addition, when the reconstructed image generating unit 14 and the reconstructed image generating unit 24 according to an embodiment perform adaptive loop filtering, the transmitting unit 18 and the one- The extraction unit 22 according to the example transmits and receives the encoded information of the residual components of the coded filter coefficients, so that the burden of the information amount required for the adaptive loop filtering can be reduced.

도 6 은 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 방법의 흐름도를 도시한다.FIG. 6 shows a flowchart of a video encoding method for pixel value compensation according to an embodiment of the present invention.

단계 62에서, 입력 영상 시퀀스가 부호화된다. 단계 64에서, 부호화된 영상 데이터가 복호화되고, 복호화된 영상 데이터에 대해 루프 필터링이 수행되어 복원 영상이 생성된다. 일 실시예에 따라, 복호화된 영상 데이터 또는 디블로킹된 영상 데이터에 대해 한 번 이상의 1차원 필터링을 연속적으로 수행하는 적응적 루프 필터링이 수행됨으로써 복원 영상이 생성될 수 있다.In step 62, the input video sequence is coded. In step 64, the encoded image data is decoded and loop-filtered on the decoded image data to generate a reconstructed image. According to one embodiment, a reconstructed image may be generated by performing adaptive loop filtering that performs one or more one-dimensional filtering operations on the decoded image data or deblocked image data one after another.

단계 66에서, 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여, 각각의 복원 픽셀 및 원본 픽셀 간의 오차에 대한 보상값 및 보상 대상인 픽셀을 포함하는 픽셀 그룹이 결정된다. 픽셀값 보상 대상인 복원 픽셀들을 포함하는 픽셀 그룹은, 픽셀값의 극값 레벨, 픽셀값 대역 또는 라인의 구성 여부에 따라 결정될 수 있다. 픽셀 그룹별 보상값은, 해당 복원 픽셀들 및 각각의 대응되는 원본 픽셀들 간의 오차의 평균값에 기초하여 결정될 수 있다.In step 66, for the restored pixels of the predetermined group among the restored images, a group of pixels including the compensation value for the error between each restored pixel and the original pixel and the pixel to be compensated is determined. The pixel group including the restored pixels to be compensated for the pixel value may be determined according to the extreme level of the pixel value, the pixel value band, or whether the line is composed. The compensation value for each pixel group can be determined based on an average value of the errors between the corresponding restored pixels and respective corresponding original pixels.

단계 68에서, 보상값이 부호화되어, 부호화된 보상값과 부호화된 입력 영상의 비트스트림이 전송된다. 보다 세분화된 픽셀 그룹에 대해 보상값이 결정되는 경우, 보다 정확한 픽셀값 보상이 가능하지만, 오버헤드가 증가될 수 있다.In step 68, the compensation value is encoded, and the bit stream of the encoded compensation value and the encoded input image is transmitted. If a compensation value is determined for a more refined pixel group, more accurate pixel value compensation is possible, but overhead can be increased.

도 7 는 본 발명의 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 방법의 흐름도를 도시한다.FIG. 7 shows a flowchart of a video decoding method for pixel value compensation according to an embodiment of the present invention.

단계 72에서, 부호화된 영상에 대한 비트스트림이 수신되어 파싱되고, 비트스트림으로부터 부호화된 영상 데이터 및 보상값이 추출된다.In step 72, a bitstream for the encoded image is received and parsed, and the encoded image data and the compensation value are extracted from the bitstream.

단계 74에서, 부호화된 영상 데이터가 복호화되고, 복호화된 영상 데이터에 대해 루프 필터링이 수행되어 복원 영상이 생성된다. 복호화된 영상 데이터 또는 디블로킹된 영상 데이터에 대해 일 실시예에 따라 한 번 이상의 1차원 필터링이 연속적으로 수행되는 적응적 루프 필터링이 수행됨으로써 복원 영상이 생성될 수 있다.In step 74, the encoded image data is decoded and loop-filtered on the decoded image data to generate a reconstructed image. The reconstructed image can be generated by performing adaptive loop filtering on the decoded image data or deblocked image data, in which one or more one-dimensional filtering operations are continuously performed according to an embodiment.

단계 76에서, 복원 영상의 복원 픽셀들 중, 보상값을 이용하여 보상할 복원 픽셀을 포함하는 픽셀 그룹이 결정된다. 추출된 보상값 관련 정보에 기초하여, 픽셀 그룹 결정 방식에 따라, 복원 픽셀의 픽셀값의 극값 레벨, 픽셀값 대역 또는 라인의 구성 여부에 따라, 보상값을 이용하여 픽셀값이 보상될 복원 픽셀들을 포함하는 픽셀 그룹이 결정될 수 있다. 단계 78에서, 결정된 픽셀 그룹의 복원 픽셀에 대해, 보상값을 이용하여 복원 픽셀 및 원본 픽셀 간의 오차가 보상되어, 오차가 보상된 복원 영상이 출력될 수 있다. In step 76, among the restored pixels of the restored image, a group of pixels including the restored pixel to be compensated using the compensation value is determined. Based on the extracted compensation value related information, in accordance with the pixel group determination method, according to the extreme value level of the pixel value of the restored pixel, the pixel value band, or the configuration of the line, The group of pixels including the pixel can be determined. In step 78, for the restored pixel of the determined pixel group, the error between the restored pixel and the original pixel is compensated by using the compensation value, and a restored image in which the error is compensated can be outputted.

일 실시예에 따른 일 실시예에 따른 픽셀값 보상을 위한 비디오 부호화 방법 또는 일 실시예에 따른 픽셀값 보상을 위한 비디오 복호화 방법에 따르면, 복원 영상의 시스템적 오차가 보상됨으로써 복원 영상의 화질이 개선될 수 있으며, 픽셀 그룹별 보상값 정보만이 부호화되어 송수신되고, 픽셀값 보상 대상인 픽셀의 위치에 대한 정보까지 송수신될 필요가 없으므로, 복원 영상의 화질 개선을 위한 부가 정보의 전송 비트량이 절감될 수 있다.
According to the video encoding method for pixel value compensation according to an embodiment of the present invention or the video decoding method for compensating pixel values according to an embodiment, the systematic error of the reconstructed image is compensated, Only compensation value information for each pixel group is encoded and transmitted and received and information on the position of a pixel to be compensated for pixel value need not be transmitted and received so that the transmission bit amount of the additional information for improving the picture quality of the restored image can be reduced have.

이하 도 8 내지 22를 참조하여, 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값을 보상하기 위한 비디오 부호화 및 복호화가 상술된다.8 to 22, video encoding and decoding for compensating pixel values after loop filtering based on the hierarchical data units for each region according to an embodiment of the present invention will be described in detail.

도 8 은 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 부호화 장치의 블록도를 도시한다.8 is a block diagram of a video encoding apparatus for pixel value compensation after loop filtering based on hierarchical data units for each region according to an embodiment of the present invention.

일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 부호화 장치(80)는, 부호화부(81), 복원 영상 생성부(84), 보상값 및 픽셀 그룹 결정부(87) 및 전송부(88)를 포함한다. 일 실시예에 따른 부호화부(81)는 최대 부호화 단위 분할부(82) 및 부호화 심도 및 부호화 모드 결정부(83)를 포함하고, 일 실시예에 따른 복원 영상 생성부(84)는, 복호화부(85) 및 루프 필터링 수행부(86)를 포함한다.The video coding apparatus 80 for performing pixel filtering after loop filtering based on the hierarchical data units according to an embodiment includes a coding unit 81, a reconstructed image generating unit 84, A portion 87 and a transfer portion 88. [ The encoding unit 81 according to an embodiment includes a maximum encoding unit division unit 82 and a coding depth and encoding mode determination unit 83. The reconstructed image generation unit 84 according to an embodiment includes a decoding unit (85) and a loop filtering performing unit (86).

일 실시예에 따른 부호화부(81)는, 입력 영상 시퀀스를 부호화한다. 일 실시예에 따른 부호화부(81)는, 영역별 계층적 데이터 단위에 기반하여 입력 영상 시퀀스의 부호화를 수행할 수 있다. 이를 위해 일 실시예에 따른 최대 부호화 단위 분할부(82)는 영상의 현재 픽처를 위한 최대 크기의 부호화 단위인 최대 부호화 단위에 기반하여 현재 픽처를 구획할 수 있다. 현재 픽처가 최대 부호화 단위보다 크다면, 현재 픽처의 영상 데이터는 적어도 하나의 최대 부호화 단위로 분할될 수 있다. 영상 데이터는 적어도 하나의 최대 부호화 단위별로 부호화 심도 및 부호화 모드 결정부(83)로 출력될 수 있다.The encoding unit 81 according to an embodiment encodes an input video sequence. The encoding unit 81 according to an exemplary embodiment may encode an input image sequence based on a hierarchical data unit for each region. For this, the maximum encoding unit division unit 82 according to an embodiment can divide the current picture based on the maximum encoding unit, which is a maximum-size encoding unit for the current picture of the image. If the current picture is larger than the maximum encoding unit, the image data of the current picture may be divided into at least one maximum encoding unit. The image data may be output to the coding depth and coding mode determination unit 83 for each of at least one maximum coding unit.

일 실시예에 따른 부호화 단위는 최대 크기 및 심도로 특징지어질 수 있다. 심도란 부호화 단위가 계층적으로 분할되는 단계를 나타내며, 심도가 깊어질수록 심도별 부호화 단위는 최대 부호화 단위로부터 최소 부호화 단위까지 분할될 수 있다. 최대 부호화 단위의 심도가 최상위 심도이며 최소 부호화 단위가 최하위 부호화 단위로 정의될 수 있다. 최대 부호화 단위는 심도가 깊어짐에 따라 심도별 부호화 단위의 크기는 감소하므로, 상위 심도의 부호화 단위는 복수 개의 하위 심도의 부호화 단위를 포함할 수 있다.An encoding unit according to an embodiment may be characterized by a maximum size and a depth. Depth indicates a stage in which coding units are hierarchically divided. As the depth increases, the depth coding units can be divided from the maximum coding unit to the minimum coding unit. The depth of the maximum encoding unit is the highest depth and the minimum encoding unit can be defined as the least significant encoding unit. As the depth of the maximum encoding unit increases, the size of the depth-dependent encoding unit decreases, so that the encoding unit of the higher depth may include a plurality of lower-depth encoding units.

전술한 바와 같이 부호화 단위의 최대 크기에 따라, 현재 픽처의 영상 데이터를 최대 부호화 단위로 분할하며, 각각의 최대 부호화 단위는 심도별로 분할되는 부호화 단위들을 포함할 수 있다. 일 실시예에 따른 최대 부호화 단위는 심도별로 분할되므로, 최대 부호화 단위에 포함된 공간 영역(spatial domain)의 영상 데이터가 심도에 따라 계층적으로 분류될 수 있다. As described above, according to the maximum size of an encoding unit, the image data of the current picture is divided into a maximum encoding unit, and each maximum encoding unit may include encoding units divided by depth. Since the maximum encoding unit according to an embodiment is divided by depth, image data of a spatial domain included in the maximum encoding unit can be hierarchically classified according to depth.

최대 부호화 단위의 높이 및 너비를 계층적으로 분할할 수 있는 총 횟수를 제한하는 최대 심도 및 부호화 단위의 최대 크기가 미리 설정되어 있을 수 있다.The maximum depth for limiting the total number of times the height and width of the maximum encoding unit can be hierarchically divided and the maximum size of the encoding unit may be preset.

부호화 심도 및 부호화 모드 결정부(83)는, 심도마다 최대 부호화 단위의 영역이 분할된 적어도 하나의 분할 영역을 부호화하여, 적어도 하나의 분할 영역 별로 최종 부호화 결과가 출력될 심도를 결정한다. 즉 부호화 심도 및 부호화 모드 결정부(83)는, 현재 픽처의 최대 부호화 단위마다 심도별 부호화 단위로 영상 데이터를 부호화하여 가장 작은 부호화 오차가 발생하는 심도를 선택하여 부호화 심도로 결정한다. 결정된 부호화 심도 및 최대 부호화 단위별 영상 데이터는 전송부(88)로 출력된다.The coding depth and coding mode determining unit 83 codes at least one divided area in which the area of the maximum coding unit is divided for each depth, and determines the depth at which the final coding result is output for each of at least one of the divided areas. That is, the coding depth and coding mode determining unit 83 selects the depth at which the smallest coding error occurs, and determines the coding depth as the coding depth by coding the image data in units of depth coding for each maximum coding unit of the current picture. The determined encoding depth and the image data per encoding unit are output to the transmitter 88.

최대 부호화 단위 내의 영상 데이터는 최대 심도 이하의 적어도 하나의 심도에 따라 심도별 부호화 단위에 기반하여 부호화되고, 각각의 심도별 부호화 단위에 기반한 부호화 결과가 비교된다. 심도별 부호화 단위의 부호화 오차의 비교 결과 부호화 오차가 가장 작은 심도가 선택될 수 있다. 각각의 최대화 부호화 단위마다 적어도 하나의 부호화 심도가 결정될 수 있다. The image data in the maximum encoding unit is encoded based on the depth encoding unit according to at least one depth below the maximum depth, and the encoding results based on the respective depth encoding units are compared. As a result of the comparison of the encoding error of the depth-dependent encoding unit, the depth with the smallest encoding error can be selected. At least one coding depth may be determined for each maximum coding unit.

최대 부호화 단위의 크기는 심도가 깊어짐에 따라 부호화 단위가 계층적으로 분할되어 분할되며 부호화 단위의 개수는 증가한다. 또한, 하나의 최대 부호화 단위에 포함되는 동일한 심도의 부호화 단위들이라 하더라도, 각각의 데이터에 대한 부호화 오차를 측정하고 하위 심도로의 분할 여부가 결정된다. 따라서, 하나의 최대 부호화 단위에 포함되는 데이터라 하더라도 위치에 따라 심도별 부호화 오차가 다르므로 위치에 따라 부호화 심도가 달리 결정될 수 있다. 따라서, 하나의 최대 부호화 단위에 대해 부호화 심도가 하나 이상 설정될 수 있으며, 최대 부호화 단위의 데이터는 하나 이상의 부호화 심도의 부호화 단위에 따라 구획될 수 있다.As the depth of the maximum encoding unit increases, the encoding unit is hierarchically divided and divided, and the number of encoding units increases. In addition, even if encoding units of the same depth included in one maximum encoding unit, the encoding error of each data is measured and it is determined whether or not the encoding unit is divided into lower depths. Therefore, even if the data included in one maximum coding unit has a different coding error according to the position, the coding depth can be determined depending on the position. Accordingly, one or more coding depths may be set for one maximum coding unit, and data of the maximum coding unit may be divided according to one or more coding depth encoding units.

최대 부호화 단위의 예측 부호화 및 주파수 변환이 수행될 수 있다. 예측 부호화 및 주파수 변환도 마찬가지로, 최대 부호화 단위마다, 최대 심도 이하의 심도마다 심도별 부호화 단위를 기반으로 수행된다. The predictive encoding and frequency conversion of the maximum encoding unit can be performed. Likewise, predictive coding and frequency conversion are performed on the basis of the depth coding unit for each maximum coding unit and for each depth below the maximum depth.

최대 부호화 단위가 심도별로 분할될 때마다 심도별 부호화 단위의 개수가 증가하므로, 심도가 깊어짐에 따라 생성되는 모든 심도별 부호화 단위에 대해 예측 부호화 및 주파수 변환을 포함한 부호화가 수행되어야 한다. 이하 설명의 편의를 위해 적어도 하나의 최대 부호화 단위 중 현재 심도의 부호화 단위을 기반으로 예측 부호화 및 주파수 변환을 설명하겠다.Since the number of coding units per depth is increased every time the maximum coding unit is divided by the depth, the coding including the predictive coding and the frequency conversion should be performed for every depth coding unit as the depth increases. For convenience of explanation, predictive coding and frequency conversion will be described based on a coding unit of a current depth among at least one maximum coding unit.

일 실시예에 따른 비디오 부호화 장치(80)는, 영상 데이터의 부호화를 위한 데이터 단위의 크기 또는 형태를 다양하게 선택할 수 있다. 영상 데이터의 부호화를 위해서는 예측 부호화, 주파수 변환, 엔트로피 부호화 등의 단계를 거치는데, 모든 단계에 걸쳐서 동일한 데이터 단위가 사용될 수도 있으며, 단계별로 데이터 단위가 변경될 수도 있다.The video encoding apparatus 80 according to the embodiment may select various sizes or types of data units for encoding image data. To encode the image data, a step such as predictive encoding, frequency conversion, and entropy encoding is performed. The same data unit may be used for all steps, and the data unit may be changed step by step.

예를 들어 비디오 부호화 장치(80)는, 영상 데이터의 부호화를 위한 부호화 단위 뿐만 아니라, 부호화 단위의 영상 데이터의 예측 부호화를 수행하기 위해, 부호화 단위와 다른 데이터 단위를 선택할 수 있다. For example, the video coding apparatus 80 can select a coding unit and a data unit different from the coding unit in order to perform predictive coding of the video data of the coding unit as well as the coding unit for coding the video data.

최대 부호화 단위의 예측 부호화를 위해서는, 최대 부호화 단위의 심도별 부호화 단위의 부분적 데이터 단위를 기반으로 예측 부호화가 수행될 수 있다. 부호화 단위의 부분적 데이터 단위는, 부호화 단위 및 심도별 부호화 단위의 높이 및 너비 중 적어도 하나가 분할된 데이터 단위를 포함할 수 있다. For predictive coding of the maximum coding unit, predictive coding may be performed based on the partial data unit of the coding unit for each depth of the maximum coding unit. The partial data unit of the encoding unit may include a data unit in which at least one of the height and the width of the encoding unit and the depth encoding unit is divided.

예를 들어, 부호화 단위의 크기가 2Nx2N(단, N은 양의 정수)인 경우, 부분적 데이터 단위의 크기는 2Nx2N, 2NxN, Nx2N, NxN 등일 수 있다. 부호화 단위의 높이 또는 너비 중 적어도 하나를 반분하는 형태의 데이터 단위 이외에도 다양하게 분할한 형태의 데이터 단위를 기반으로 예측 부호화가 수행될 수도 있다. 이하, 예측 부호화의 기반이 되는 데이터 단위는 '예측 단위'라고 지칭될 수 있다.For example, when the size of the encoding unit is 2Nx2N (where N is a positive integer), the size of the partial data unit may be 2Nx2N, 2NxN, Nx2N, NxN, and the like. Prediction coding may be performed based on data units of various types, in addition to data units of a type in which at least one of the height and the width of an encoding unit is divided by half. Hereinafter, a data unit on which prediction encoding is based may be referred to as a 'prediction unit'.

부호화 단위의 예측 모드는, 인트라 모드, 인터 모드 및 스킵 모드 중 적어도 하나일 수 있다. 예를 들어 인트라 모드 및 인터 모드는, 2Nx2N, 2NxN, Nx2N, NxN 크기의 예측 단위에 대해서 수행될 수 있다. 또한, 스킵 모드는 2Nx2N 크기의 예측 단위에 대해서만 수행될 수 있다. 부호화 단위 이내의 하나의 예측 단위마다 독립적으로 부호화가 수행되어 부호화 오차가 가장 작은 예측 모드가 선택될 수 있다.The prediction mode of the encoding unit may be at least one of an intra mode, an inter mode, and a skip mode. For example, the intra mode and the inter mode can be performed for prediction units of 2Nx2N, 2NxN, Nx2N, and NxN sizes. In addition, the skip mode can be performed only for a prediction unit of 2Nx2N size. Encoding is performed independently for each prediction unit within an encoding unit, and a prediction mode having the smallest encoding error can be selected.

또한, 일 실시예에 따른 비디오 부호화 장치(80)는, 영상 데이터의 부호화를 위한 부호화 단위 뿐만 아니라, 부호화 단위와 다른 데이터 단위를 기반으로 부호화 단위의 영상 데이터의 주파수 변환을 수행할 수 있다.In addition, the video encoding apparatus 80 according to an exemplary embodiment may perform frequency conversion of image data of an encoding unit based on not only an encoding unit for encoding image data but also a data unit different from the encoding unit.

부호화 단위의 주파수 변환을 위해서는, 부호화 단위보다 작거나 같은 크기의 데이터 단위를 기반으로 주파수 변환이 수행될 수 있다. 예를 들어, 주파수 변환을 위한 데이터 단위는, 인트라 모드를 위한 데이터 단위 및 인터 모드를 위한 데이터 단위를 포함할 수 있다. 이하, 주파수 변환의 기반이 되는 데이터 단위는 '변환 단위'라고 지칭될 수 있다.For frequency conversion of a coding unit, frequency conversion may be performed based on a data unit having a size smaller than or equal to the coding unit. For example, a data unit for frequency conversion may include a data unit for intra mode and a data unit for inter mode. Hereinafter, the data unit on which the frequency conversion is based may be referred to as a 'conversion unit'.

부호화 심도별 부호화 정보는, 부호화 심도 뿐만 아니라 예측 관련 정보 및 주파수 변환 관련 정보가 필요하다. 따라서, 부호화 심도 및 부호화 모드 결정부(83)는 최소 부호화 오차를 발생시킨 부호화 심도 뿐만 아니라, 부호화 심도의 부호화 단위를 예측 단위로 분할한 파티션 타입, 예측 단위별 예측 모드, 주파수 변환을 위한 변환 단위의 크기 등을 결정할 수 있다.The coding information according to the coding depth needs not only the coding depth but also prediction related information and frequency conversion related information. Therefore, the coding depth and coding mode determining section 83 determines not only the coding depth at which the minimum coding error is generated, but also the partition type in which the coding unit of the coding depth is divided into prediction units, the prediction mode for each prediction unit, And the like can be determined.

일 실시예에 따른 부호화 심도 및 부호화 모드 결정부(83)는 심도별 부호화 단위의 부호화 오차를 라그랑지 곱(Lagrangian Multiplier) 기반의 율-왜곡 최적화 기법(Rate-Distortion Optimization)을 이용하여 측정할 수 있다.The coding depth and coding mode decision unit 83 according to the embodiment can measure the coding error of the coding units of depth by using a Lagrangian Multiplier based Rate-Distortion Optimization have.

일 실시예에 따른 복원 영상 생성부(84)는, 부호화된 영상 데이터를 복호화하고 복호화된 영상 데이터에 루프 필터링을 수행하여 복원 영상을 생성한다. 일 실시예에 따른 복원 영상 생성부(84) 중 복호화부(85)는, 부호화부(81)에 의해 영역별 계층적 데이터 단위에 기반하여 부호화된 영상 데이터를 복호화한다. 일 실시예에 따른 복호화부(85)는, 부호화 심도 및 부호화 모드 결정부(830)에 의해 결정된 부호화 심도 및 부호화 모드에 기초하여, 부호화된 영상 데이터를 복호화하고, 최대 부호화 단위별로 공간 영역의 영상 데이터를 출력할 수 있다.The reconstructed image generation unit 84 according to an embodiment decodes the encoded image data and performs loop filtering on the decoded image data to generate a reconstructed image. The decoding unit 85 of the reconstructed image generating unit 84 according to an embodiment decodes the image data encoded based on the hierarchical data unit for each region by the encoding unit 81. [ The decoding unit 85 according to the embodiment decodes the encoded image data based on the encoding depth and the encoding mode determined by the encoding depth and encoding mode deciding unit 830, Data can be output.

일 실시예에 따른 복원 영상 생성부(84) 중 루프 필터링 수행부(86)는 복호화된 영상 데이터에 대해 인루프 필터링을 수행할 수 있다. 일 실시예에 따른 일 실시예에 따른 루프 필터링 수행부(86)에 대해, 일 실시예에 따른 복원 영상 생성부(14)에서 선택적으로 수행되는 적응적 루프 필터링과 동일한 기술이 적용될 수 있다. 따라서, 일 실시예에 따른 일 실시예에 따른 루프 필터링 수행부(86)는, 수평 방향의 1차원 필터링 및 수직 방향의 1차원 필터링을 연속적으로 수행하고 현재 픽처를 복원할 수 있다. 일 실시예에 따른 일 실시예에 따른 루프 필터링 수행부(86)는 복원 영상을 출력하고, 복원 영상은 보상값 및 픽셀 그룹 결정부(87)로 입력될 수 있다. The loop filtering performing unit 86 of the reconstructed image generating unit 84 according to an exemplary embodiment may perform in-loop filtering on the decoded image data. The same technique as the adaptive loop filtering selectively performed by the reconstructed image generating unit 14 according to the embodiment may be applied to the loop filtering performing unit 86 according to the embodiment of the present invention. Accordingly, the loop filtering performing unit 86 according to the embodiment of the present invention can continuously perform one-dimensional filtering in the horizontal direction and one-dimensional filtering in the vertical direction to restore the current picture. The loop filtering performing unit 86 according to an embodiment outputs a reconstructed image and the reconstructed image may be input to the compensation value and pixel group determination unit 87. [

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(87)는, 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여, 각각의 복원 픽셀 및 대응하는 원본 픽셀 간의 오차에 대한 보상값 및 픽셀값 보상 대상인 복원 픽셀들을 포함하는 픽셀 그룹을 결정한다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(87)과 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(16)는 상응하는 기술적 구성 요소이다. The compensation value and pixel group determination unit 87 according to an exemplary embodiment of the present invention determines a compensation value for an error between each restored pixel and a corresponding original pixel, And determines a group of pixels including the pixels. The compensation value and pixel group determination unit 87 and the compensation value and pixel group determination unit 16 according to the embodiment according to the embodiment are corresponding technical components.

따라서, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(87)는, 복원 영상의 이웃하는 복원 픽셀들의 복원 픽셀별 극값 레벨을 결정하고, 이웃하는 복원 픽셀들을 극값 레벨별 픽셀 그룹들로 분류할 수 있다. 또한, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(87)는, 복원 픽셀들을 픽셀값에 기초하여 대역별 픽셀 그룹들로 분류할 수 있다. 또한, 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(87)는, 복원 영상을 분석하여, 소정 방향의 라인들을 검출하고, 복원 픽셀들을 동일한 라인 상에 위치한 복원 픽셀들을 포함하는 라인별 픽셀 그룹들로 분류할 수 있다. Accordingly, the compensation value and pixel group determination unit 87 according to an embodiment determines the extreme level of each reconstructed pixel of neighboring reconstructed pixels of the reconstructed image and classifies neighboring reconstructed pixels into pixel groups of the extreme level . In addition, the compensation value and pixel group determination unit 87 according to an exemplary embodiment may classify the restored pixels into pixel groups for each band based on pixel values. In addition, the compensation value and pixel group determination unit 87 according to an exemplary embodiment analyzes the restored image, detects lines in a predetermined direction, and restores the restored pixels to a line-by-line pixel group . &Lt; / RTI &gt;

일 실시예에 따른 보상값 및 픽셀 그룹 결정부(87)는, 픽셀 그룹마다 개별적으로, 복원 픽셀 및 원본 픽셀 간의 오차들의 평균값을 이용하여, 보상값을 결정할 수 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(87)는, 입력 비디오의 영상 시퀀스, 슬라이스, 프레임 및 부호화 단위 중 적어도 하나의 데이터 단위별로, 보상될 복원 픽셀을 결정하고, 해당 보상값을 결정할 수 있다. 일 실시예에 따른 보상값 및 픽셀 그룹 결정부(87)에 의해 결정된 보상값 또는 픽셀 그룹에 관한 정보는, 전송부(88)로 출력될 수 있다.The compensation value and pixel group determination unit 87 according to the embodiment can determine the compensation value using the average value of the errors between the restored pixel and the original pixel separately for each pixel group. The compensation value and pixel group determination unit 87 according to an exemplary embodiment determines a restored pixel to be compensated for each data unit of at least one of a video sequence, a slice, a frame, and an encoding unit of the input video, . The compensation value according to the embodiment and the compensation value or information about the pixel group determined by the pixel group determination unit 87 may be output to the transmission unit 88. [

일 실시예에 따른 전송부(88)는, 부호화 심도 및 부호화 모드 결정부(83)에서 결정된 적어도 하나의 부호화 심도에 기초하여 부호화된 최대 부호화 단위의 영상 데이터 및 심도별 부호화 모드에 관한 정보를 비트스트림 형태로 출력한다. 부호화부(81)에 의해 부호화된 영상 데이터는 엔트로피 부호화를 통해 비트스트림 형태로 변환된 후, 전송용 비트스트림에 삽입될 수 있다. The transmitting unit 88 according to an embodiment transmits the video data of the maximum coding unit encoded based on at least one coding depth determined by the coding depth and coding mode deciding unit 83 and information on the coding mode per depth And outputs it in stream form. The image data encoded by the encoding unit 81 may be converted into a bit stream format through entropy encoding and then inserted into a bit stream for transmission.

또한 일 실시예에 따른 전송부(88)는, 보상값 및 픽셀 그룹 결정부(16)에 의해 결정된 보상값을 부호화하여 전송용 비트스트림에 삽입될 수 있다. 일 실시예에 따른 전송부(88)는, 보상값 및 픽셀 그룹 결정부(87)로부터 픽셀 그룹 결정 방식에 대한 부가 정보를 입력받아, 이를 부호화하여 비트스트림에 삽입할 수도 있다. In addition, the transmission unit 88 according to an exemplary embodiment may encode the compensation value and the compensation value determined by the pixel group determination unit 16, and may be inserted into the transmission bitstream. The transmitting unit 88 according to an embodiment may receive the compensation value and the additional information on the pixel group determination method from the pixel group determining unit 87, and may encode the added information and insert it into the bitstream.

부호화된 영상 데이터는 영상의 레지듀얼 데이터의 부호화 결과일 수 있다.The encoded image data may be a result of encoding residual data of the image.

심도별 부호화 모드에 관한 정보는, 부호화 심도 정보, 부호화 심도의 부호화 단위의 예측 단위의 파티션 타입 정보, 예측 단위별 예측 모드 정보, 변환 단위의 크기 정보 등을 포함할 수 있다.The information on the depth-dependent coding mode may include coding depth information, partition type information of a prediction unit of a coding unit of coding depth, prediction mode information per prediction unit, size information of a conversion unit, and the like.

부호화 심도 정보는, 현재 심도로 부호화하지 않고 하위 심도의 부호화 단위로 부호화할지 여부를 나타내는 심도별 분할 정보를 이용하여 정의될 수 있다. 현재 부호화 단위의 현재 심도가 부호화 심도라면, 현재 부호화 단위는 현재 심도의 부호화 단위로 부호화되므로 현재 심도의 분할 정보는 더 이상 하위 심도로 분할되지 않도록 정의될 수 있다. 반대로, 현재 부호화 단위의 현재 심도가 부호화 심도가 아니라면 하위 심도의 부호화 단위를 이용한 부호화를 시도해보아야 하므로, 현재 심도의 분할 정보는 하위 심도의 부호화 단위로 분할되도록 정의될 수 있다.The coding depth information can be defined using depth division information indicating whether or not coding is performed at the lower depth coding unit without coding at the current depth. If the current depth of the current encoding unit is the encoding depth, the current encoding unit is encoded in the current depth encoding unit, so that the division information of the current depth can be defined so as not to be further divided into lower depths. On the other hand, if the current depth of the current encoding unit is not the encoding depth, the encoding using the lower depth encoding unit should be tried. Therefore, the division information of the current depth may be defined to be divided into the lower depth encoding units.

현재 심도가 부호화 심도가 아니라면, 하위 심도의 부호화 단위로 분할된 부호화 단위에 대해 부호화가 수행된다. 현재 심도의 부호화 단위 내에 하위 심도의 부호화 단위가 하나 이상 존재하므로, 각각의 하위 심도의 부호화 단위마다 반복적으로 부호화가 수행되어, 동일한 심도의 부호화 단위마다 재귀적(recursive) 부호화가 수행될 수 있다.If the current depth is not the encoding depth, encoding is performed on the encoding unit divided into lower-depth encoding units. Since there are one or more lower-level coding units in the current-depth coding unit, the coding is repeatedly performed for each lower-level coding unit so that recursive coding can be performed for each coding unit of the same depth.

하나의 최대 부호화 단위 안에 적어도 하나의 부호화 심도가 결정되며 부호화 심도마다 적어도 하나의 부호화 모드에 관한 정보가 결정되어야 하므로, 하나의 최대 부호화 단위에 대해서는 적어도 하나의 부호화 모드에 관한 정보가 결정될 수 있다. 또한, 최대 부호화 단위의 데이터는 심도에 따라 계층적으로 구획되어 위치 별로 부호화 심도가 다를 수 있으므로, 데이터에 대해 부호화 심도 및 부호화 모드에 관한 정보가 설정될 수 있다.At least one coding depth is determined in one maximum coding unit and at least one coding mode information is determined for each coding depth so that information on at least one coding mode can be determined for one maximum coding unit. Since the data of the maximum encoding unit is hierarchically divided according to the depth and the depth of encoding may be different for each position, information on the encoding depth and the encoding mode may be set for the data.

따라서, 일 실시예에 따른 전송부(88)는, 최대 부호화 단위에 포함되어 있는 최소 부호화 단위마다 해당 부호화 정보를 설정할 수 있다. 즉, 부호화 심도의 부호화 단위는 동일한 부호화 정보를 보유하고 있는 최소 부호화 단위를 하나 이상 포함하고 있다. 이를 이용하여, 인근 최소 부호화 단위들이 동일한 심도별 부호화 정보를 갖고 있다면, 동일한 최대 부호화 단위에 포함되는 최소 부호화 단위일 수 있다.Therefore, the transmitting unit 88 according to the embodiment can set the corresponding encoding information for each minimum encoding unit included in the maximum encoding unit. That is, the coding unit of the coding depth includes at least one minimum coding unit that holds the same coding information. By using this, if the neighboring minimum encoding units have the same depth encoding information, it can be the minimum encoding unit included in the same maximum encoding unit.

예를 들어 전송부(88)를 통해 출력되는 부호화 정보는, 심도별 부호화 단위별 부호화 정보와 예측 단위별 부호화 정보로 분류될 수 있다. 심도별 부호화 단위별 부호하 정보는, 예측 모드 정보, 파티션 크기 정보를 포함할 수 있다. 예측 단위별로 전송되는 부호화 정보는 인터 모드의 추정 방향에 관한 정보, 인터 모드의 참조 영상 인덱스에 관한 정보, 움직임 벡터에 관한 정보, 인트라 모드의 크로마 성분에 관한 정보, 인트라 모드의 보간 방식에 관한 정보 등을 포함할 수 있다. 또한, 픽처, 슬라이스 또는 GOP별로 정의되는 부호화 단위의 최대 크기에 관한 정보 및 최대 심도에 관한 정보는 비트스트림의 헤더에 삽입될 수 있다.For example, the encoding information output through the transmission unit 88 can be classified into encoding information for each depth unit and encoding information for each prediction unit. The under-coding-by-depth coding unit information may include prediction mode information and partition size information. The encoding information to be transmitted for each prediction unit includes information about the estimation direction of the inter mode, information about the reference picture index of the inter mode, information on the motion vector, information on the chroma component of the intra mode, information on the interpolation mode of the intra mode And the like. Information on the maximum size of a coding unit defined for each picture, slice or GOP, and information on the maximum depth can be inserted into the header of the bitstream.

일 실시예에 따른 전송부(88)는 적응적 루프 필터링에 이용되는 필터 계수를 부호화하여 출력할 수 있다. 또한, 일 실시예에 따른 적응적 루프 필터링을 위해, 각각의 1차원 필터의 종류, 개수, 크기, 양자화 비트, 계수, 필터링 방향, 필터링 수행 여부 및 러닝 필터링 수행 여부 등이 설정될 수 있으므로, 루프 필터링의 1차원 필터 세트에 대한 정보가 부호화되어 전송될 수도 있다.The transmitter 88 according to an exemplary embodiment may encode and output a filter coefficient used for adaptive loop filtering. In addition, for adaptive loop filtering according to an embodiment, the type, number, size, quantization bit, coefficient, filtering direction, whether to perform filtering, and whether to perform running filtering can be set for each one- Information about a one-dimensional filter set of filtering may be encoded and transmitted.

일 실시예에 따른 비디오 부호화 장치(80)의 가장 간단한 형태의 실시예에 따르면, 심도별 부호화 단위는 한 계층 상위 심도의 부호화 단위의 높이 및 너비를 반분한 크기의 부호화 단위이다. 즉, 현재 심도의 부호화 단위의 크기가 2Nx2N이라면, 하위 심도의 부호화 단위의 크기는 NxN 이다. 또한, 2Nx2N 크기의 현재 부호화 단위는 NxN 크기의 하위 심도 부호화 단위를 최대 4개 포함할 수 있다.According to an embodiment of the simplest form of the video coding apparatus 80 according to the embodiment, the coding unit for depth is a coding unit which is half the height and width of the coding unit of one layer higher depth. That is, if the size of the current depth encoding unit is 2Nx2N, the size of the lower depth encoding unit is NxN. In addition, the current encoding unit of 2Nx2N size can include a maximum of 4 sub-depth encoding units of NxN size.

따라서, 일 실시예에 따른 비디오 복호화 장치(80)는 현재 픽처의 특성을 고려하여 결정된 최대 부호화 단위의 크기 및 최대 심도를 기반으로, 각각의 최대 부호화 단위마다 최적의 형태 및 크기의 부호화 단위를 결정할 수 있다. 또한, 각각의 최대 부호화 단위마다 다양한 예측 모드, 주파수 변환 방식 등으로 부호화할 수 있으므로, 다양한 영상 크기의 부호화 단위의 영상 특성을 고려하여 최적의 부호화 모드가 결정될 수 있다.Therefore, the video decoding apparatus 80 according to the embodiment determines the encoding unit of the optimal form and size for each maximum encoding unit based on the size and the maximum depth of the maximum encoding unit determined in consideration of the characteristics of the current picture . In addition, since each encoding unit can be encoded by various prediction modes, frequency conversion methods, and the like, an optimal encoding mode can be determined in consideration of image characteristics of encoding units of various image sizes.

따라서, 영상의 해상도가 매우 높거나 데이터량이 매우 큰 영상을 기존 매크로블록 단위로 부호화한다면, 픽처당 매크로블록의 수가 과도하게 많아진다. 이에 따라, 매크로블록마다 생성되는 압축 정보도 많아지므로 압축 정보의 전송 부담이 커지고 데이터 압축 효율이 감소하는 경향이 있다. 따라서, 일 실시예에 따른 비디오 부호화 장치는, 영상의 크기를 고려하여 부호화 단위의 최대 크기를 증가시키면서, 영상 특성을 고려하여 부호화 단위를 조절할 수 있으므로, 영상 압축 효율이 증대될 수 있다.Therefore, if an image having a very high image resolution or a very large data amount is encoded in units of existing macroblocks, the number of macroblocks per picture becomes excessively large. This increases the amount of compression information generated for each macroblock, so that the burden of transmission of compressed information increases and the data compression efficiency tends to decrease. Therefore, the video encoding apparatus according to an embodiment can increase the maximum size of the encoding unit in consideration of the image size, and adjust the encoding unit in consideration of the image characteristic, so that the image compression efficiency can be increased.

또한, 복호화단에서 복원 영상의 화질을 개선하기 위해 필요한, 복원 영상 및 원본 영상 간의 픽셀값을 보상하기 위한 보상값 정보가, 픽셀 위치에 관한 정보 없이 부호화되어 전송되므로, 부가 정보의 전송 비트량이 절감될 수 있다.
In addition, since the compensation value information for compensating the pixel value between the restored image and the original image necessary for improving the image quality of the restored image at the decoding end is coded and transmitted without information about the pixel position, .

*도 9 는 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 복호화 장치의 블록도를 도시한다.9 is a block diagram of a video decoding apparatus for pixel value compensation after loop filtering based on hierarchical data units for each region according to an embodiment of the present invention.

일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 복호화 장치(90)는 추출부(91), 복원 영상 생성부(94), 픽셀 그룹 결정부(97) 및 복원 픽셀 보상부(98)를 포함한다. 일 실시예에 따른 추출부(91)는 수신부(92) 및 영상 데이터, 부호화 모드 정보, 루프 필터 계수 정보 및 보상값 정보 추출부(93)를 포함하고, 복원 영상 생성부(94)는 복호화부(95) 및 루프 필터링 수행부(96)를 포함한다. The video decoding apparatus 90 for performing pixel filtering after loop filtering based on the hierarchical data units according to an embodiment includes an extracting unit 91, a restored image generating unit 94, a pixel group determining unit 97, And a restored pixel compensation unit 98. [ The extraction unit 91 according to an embodiment includes a receiver 92 and image data, encoding mode information, loop filter coefficient information and a compensation value information extraction unit 93. The reconstruction image generation unit 94 includes a decoding unit (95) and a loop filtering performing unit (96).

일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 복호화 장치(90)의 각종 프로세싱을 위한 부호화 단위, 심도, 예측 단위, 변환 단위, 각종 부호화 모드에 관한 정보 등 각종 용어의 정의는, 도 8 및 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 부호화 장치(80)를 참조하여 전술한 바와 동일하다. Depth unit, prediction unit, conversion unit, and various encoding modes for various processing of the video decoding apparatus 90 for pixel value compensation after loop filtering based on the hierarchical data units for each region according to an embodiment And the like are the same as those described above with reference to the video encoding apparatus 80 for pixel value compensation after loop filtering based on the hierarchical data units for each region according to FIG. 8 and one embodiment.

일 실시예에 따른 추출부(91)는, 부호화된 영상에 대한 비트스트림을 수신하고 파싱하여, 비트스트림으로부터 부호화된 영상 데이터 및 보상값을 추출한다. 일 실시예에 따른 추출부(91) 중 수신부(92)는, 부호화된 비디오에 대한 비트스트림을 수신하여 파싱한다. 일 실시예에 따른 영상 데이터, 부호화 모드 정보, 루프 필터 계수 정보 및 보상값 정보 추출부(93, 이하 '정보 추출부'로 지칭한다)는 파싱된 비트스트림으로부터 최대 부호화 단위별로 영상 데이터를 추출하여 복호화부(95)로 출력한다. 일 실시예에 따른 정보 추출부(93)는 현재 픽처에 대한 헤더로부터 현재 픽처의 부호화 단위의 최대 크기에 관한 정보를 추출할 수 있다. The extracting unit 91 according to an embodiment receives and parses a bitstream of the encoded image, and extracts the encoded image data and the compensation value from the bitstream. The receiving unit 92 of the extracting unit 91 according to the embodiment receives and parses the bitstream of the encoded video. The image data, encoding mode information, loop filter coefficient information, and compensation value information extraction unit 93 (hereinafter referred to as 'information extraction unit') according to an exemplary embodiment extracts image data by a maximum encoding unit from a parsed bitstream And outputs it to the decoding unit 95. The information extracting unit 93 may extract information on the maximum size of the encoding unit of the current picture from the header of the current picture.

또한, 일 실시예에 따른 정보 추출부(93)는 파싱된 비트스트림으로부터 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보를 추출한다. 추출된 부호화 심도 및 부호화 모드에 관한 정보는 복호화부(95)로 출력된다. 즉, 비트열의 영상 데이터를 최대 부호화 단위로 분할하여, 복호화부(95)가 최대 부호화 단위마다 영상 데이터를 복호화하도록 할 수 있다. In addition, the information extracting unit 93 extracts information on a coding depth and a coding mode for each maximum coding unit from the parsed bitstream. The information on the extracted coding depth and coding mode is output to the decoding unit 95. That is, the video data of the bit stream can be divided into a maximum encoding unit, and the decoding unit 95 can decode video data per maximum encoding unit.

최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보는, 하나 이상의 부호화 심도 정보에 대해 설정될 수 있으며, 부호화 심도별 부호화 모드에 관한 정보는, 부호화 단위별 예측 단위의 파티션 타입 정보, 예측 모드 정보 및 변환 단위의 크기 정보 등을 포함할 수 있다. 또한, 부호화 심도 정보로서, 심도별 분할 정보가 추출될 수도 있다.Information on the coding depth and the coding mode per coding unit can be set for one or more coding depth information, and the information on the coding mode for each coding depth includes information on partition type information, prediction mode information, Size information of the conversion unit, and the like. In addition, as the encoding depth information, depth-based segmentation information may be extracted.

일 실시예에 따른 정보 추출부(93)가 추출한 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보는, 일 실시예에 따른 비디오 부호화 장치(80)와 같이 부호화단에서, 최대 부호화 단위별 심도별 부호화 단위마다 반복적으로 부호화를 수행하여 최소 부호화 오차를 발생시키는 것으로 결정된 부호화 심도 및 부호화 모드에 관한 정보이다. 따라서, 일 실시예에 따른 비디오 복호화 장치(90)는 최소 부호화 오차를 발생시키는 부호화 방식에 따라 데이터를 복호화하여 영상을 복원할 수 있다.The information on the coding depth and the coding mode for each maximum coding unit extracted by the information extracting unit 93 according to an exemplary embodiment is similar to that of the video coding apparatus 80 according to the embodiment, And information on a coding depth and a coding mode determined to repeatedly perform coding for each coding unit to generate a minimum coding error. Accordingly, the video decoding apparatus 90 according to an exemplary embodiment can decode data according to a coding scheme that generates a minimum coding error to recover an image.

일 실시예에 따른 정보 추출부(93)는 최소 부호화 단위별로 부호화 심도 및 부호화 모드에 관한 정보를 추출할 수 있다. 최소 부호화 단위별로, 해당 최대 부호화 단위의 부호화 심도 및 부호화 모드에 관한 정보가 기록되어 있다면, 동일한 부호화 심도 및 부호화 모드에 관한 정보를 갖고 있는 최소 부호화 단위들은 동일한 최대 부호화 단위에 포함되는 데이터 단위로 유추될 수 있다. 즉, 동일한 정보의 최소 부호화 단위를 모아 복호화하면, 부호화 오차가 가장 작은 부호화 심도의 부호화 단위를 기반으로 한 복호화가 가능하다.The information extracting unit 93 may extract information on the coding depth and coding mode for each minimum coding unit. If information on the coding depth and the coding mode of the corresponding maximum coding unit is recorded for each minimum coding unit, the minimum coding units having the same coding depth and information on the coding mode are estimated as data units included in the same maximum coding unit . That is, if the minimum coding units of the same information are collected and decoded, it is possible to decode based on the coding units of the coding depth with the smallest coding error.

일 실시예에 따른 복호화부(95)는 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보에 기초하여 각각의 최대 부호화 단위의 영상 데이터를 복호화하여 현재 픽처를 복원한다. 최대 부호화 단위별 부호화 심도 정보에 기초하여, 일 실시예에 따른 복호화부(95)는 적어도 하나의 부호화 심도의 부호화 단위마다 영상 데이터를 복호화할 수 있다. 복호화 과정은 인트라 예측 및 움직임 보상을 포함하는 예측 과정, 및 주파수 역변환 과정을 포함할 수 있다.The decoding unit 95 according to an embodiment decodes the image data of each maximum encoding unit based on information on the encoding depth and the encoding mode for each maximum encoding unit to reconstruct the current picture. Based on the coding depth information for each maximum coding unit, the decoding unit 95 according to an embodiment can decode the video data for each coding unit of at least one coding depth. The decoding process may include a prediction process including intra prediction and motion compensation, and an inverse frequency conversion process.

일 실시예에 따른 복호화부(95)는, 부호화 단위별 예측 부호화를 위해, 부호화 심도별 부호화 단위의 예측 단위의 파티션 타입 정보 및 예측 모드 정보에 기초하여, 부호화 단위마다 각각의 예측 단위 및 예측 모드로 인트라 예측 또는 움직임 보상을 수행할 수 있다.The decoding unit 95 according to one embodiment decodes each prediction unit and prediction mode for each coding unit on the basis of the partition type information and the prediction mode information of the prediction unit of the coding unit for each coding depth, To perform intra prediction or motion compensation.

또한, 일 실시예에 따른 영상 데이터 복호화부(95)는, 최대 부호화 단위별 주파수 역변환을 위해, 부호화 심도별 부호화 단위의 변환 단위의 크기 정보에 기초하여, 부호화 단위마다 각각의 변환 단위로 주파수 역변환을 수행할 수 있다.In addition, the image data decoding unit 95 according to an exemplary embodiment may perform frequency inverse transform (inverse transform) on the basis of the size information of the transform unit of the coding unit for each coding depth, Can be performed.

일 실시예에 따른 복호화부(95)는 심도별 분할 정보를 이용하는 현재 최대 부호화 단위의 부호화 심도를 결정할 수 있다. 만약, 분할 정보가 현재 심도로 복호화할 것을 나타내고 있다면 현재 심도가 부호화 심도이다. 따라서, 일 실시예에 따른 복호화부(95)는 현재 최대 부호화 단위의 영상 데이터에 대해 현재 심도의 부호화 단위를 예측 단위의 파티션 타입, 예측 모드 및 변환 단위 크기 정보를 이용하여 복호화할 수 있다. The decoding unit 95 according to an exemplary embodiment can determine the coding depth of the current maximum coding unit using the division information by depth. If the partition information indicates that the current depth is to be decoded, the current depth is the depth of the encoding. Therefore, the decoding unit 95 according to the embodiment can decode the current depth encoding unit with respect to the image data of the current maximum encoding unit using the partition type, the prediction mode, and the conversion unit size information of the prediction unit.

즉, 최소 부호화 단위에 대해 설정되어 있는 부호화 정보를 관찰하여, 동일한 분할 정보를 포함한 부호화 정보를 보유하고 있는 최소 부호화 단위를 모아, 하나의 데이터 단위로 복호화할 수 있다. That is, it is possible to observe the encoding information set for the minimum encoding unit and to decode the minimum encoding units that hold the encoding information including the same division information, into one data unit.

일 실시예에 따른 정보 추출부(93)는, 비트스트림에 적응적 루프 필터링을 위한 필터 계수에 관한 정보가 삽입되어 있는 경우, 비트스트림으로부터 필터 계수에 대한 정보를 추출할 수도 있다. 일 실시예에 따른 루프 필터링 수행부(96)는, 정보 추출부(93)에 의해 추출된 루프 필터 계수에 관한 정보 등을 입력받아, 복호화부(95)에 의해 복호화된 영상 데이터에 대해 루프 필터링을 수행하여 복원 영상을 생성할 수 있다. The information extracting unit 93 may extract information on a filter coefficient from a bitstream when information on a filter coefficient for adaptive loop filtering is embedded in the bitstream. The loop filtering performing unit 96 according to the embodiment receives information on the loop filter coefficient extracted by the information extracting unit 93 and the like and performs loop filtering on the image data decoded by the decoding unit 95 So that a reconstructed image can be generated.

일 실시예에 따른 루프 필터링 수행부(96)에 대해, 일 실시예에 따른 복원 영상 생성부(24)의 기술적 구성 요소가 동일하게 적용될 수 있다. 따라서 일 실시예에 따른 루프 필터링 수행부(96)는, 복호화된 영상 데이터에 대해 디블로킹 필터링 및 적응적 루프 필터링을 선택적으로 수행할 수 있다. 일 실시예에 따른 적응적 루프 필터링은 연속적인 복수 개의 1차원 필터들을 이용하여 수행될 수 있다. For the loop filtering performing unit 96 according to the embodiment, the technical components of the reconstructed image generating unit 24 according to the embodiment may be applied equally. Accordingly, the loop filtering performing unit 96 according to an exemplary embodiment may selectively perform deblocking filtering and adaptive loop filtering on the decoded image data. The adaptive loop filtering according to an embodiment may be performed using a plurality of continuous one-dimensional filters.

일 실시예에 따른 복원 영상 생성부(94)는, 정보 추출부(93)로부터 추출된 필터 계수의 잔차 정보를 이용하여, 각각의 1차원 필터의 필터 계수를 유도할 수 있다. 예를 들어, 각각의 1차원 필터마다, 현재 필터 계수 및 이전 필터 계수 간의 차이값을 이전 필터 계수에 더함으로써 현재 필터 계수가 유도될 수 있다. 유도된 각각의 1차원 필터의 필터 계수를 이용하여, 디블로킹된 데이터에 대해 연속적인 1차원 필터링이 수행될 수 있다. 디블로킹은 복호화된 데이터의 블록 효과를 감소시키고, 루프 필터링은 복원 영상 및 원본 영상 간의 오차를 최소화시킨다.The reconstructed image generation unit 94 may derive the filter coefficients of each one-dimensional filter using the residual information of the filter coefficients extracted from the information extraction unit 93. [ For example, for each one-dimensional filter, the current filter coefficient may be derived by adding the difference between the current filter coefficient and the previous filter coefficient to the previous filter coefficient. Using the filter coefficients of each derived one-dimensional filter, continuous one-dimensional filtering can be performed on the deblocked data. Deblocking reduces the block effect of the decoded data, and loop filtering minimizes the error between the reconstructed image and the original image.

일 실시예에 따른 정보 추출부(93)는, 비트스트림으로부터 부호화된 영상 데이터 및 보상값 관련 정보를 추출한다. 보상값 관련 정보는 보상값 정보를 포함할 수 있다. 또한, 보상값 관련 정보가 보상값을 이용하여 보상될 복원 픽셀의 결정 방식에 관한 정보를 포함하는 경우에는, 일 실시예에 따른 정보 추출부(93)에 의해 비트스트림으로부터 보상값과 보상될 픽셀 그룹 결정 방식에 관한 정보가 추출될 수도 있다. 일 실시예에 따른 정보 추출부(93)는, 입력 비디오의 영상 시퀀스, 슬라이스, 프레임 및 부호화 단위 중 적어도 하나의 데이터 단위별로, 보상값 또는 보상값 관련 정보를 추출할 수 있다.The information extracting unit 93 extracts the encoded image data and the compensation value related information from the bit stream. The compensation value related information may include compensation value information. When the compensation value related information includes information on the determination method of the reconstructed pixel to be compensated using the compensation value, the information extracting unit 93 extracts, from the bit stream, Information on the group determination method may be extracted. The information extracting unit 93 according to an exemplary embodiment may extract compensation value or compensation value related information for each data unit of at least one of a video sequence, a slice, a frame, and a coding unit of the input video.

일 실시예에 따른 픽셀 그룹 결정부(97)는, 복원 영상 생성부(94)에 의해 생성된 복원 영상 및 정보 추출부(93)에 의해 추출된 보상값 정보를 입력받아, 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여 보상값을 이용하여 보상될 복원 픽셀을 포함하는 픽셀 그룹을 결정할 수 있다. 일 실시예에 따른 복원 픽셀 보상부(98)는, 정보 추출부(93)에 의해 추출된 보상값 및 픽셀 그룹 결정부(97)에 의해 결정된 복원 픽셀들에 관한 정보를 입력받아, 보상값을 이용하여 복원 픽셀의 픽셀값을 보상하여, 픽셀값이 보상된 복원 영상을 출력한다.The pixel group determining unit 97 according to an exemplary embodiment receives the compensation value information extracted by the restored image and information extracting unit 93 generated by the restored image generating unit 94, A pixel group including a restored pixel to be compensated for using the compensation value for restored pixels of the pixel group. The reconstruction pixel compensating unit 98 according to the embodiment receives the compensation value extracted by the information extracting unit 93 and the information about the reconstructed pixels determined by the pixel group deciding unit 97, And compensates the pixel value of the reconstructed pixel to output the reconstructed image with the compensated pixel value.

일 실시예에 따른 정보 추출부(93)에 의해 보상될 픽셀 그룹 결정 방식에 관한 정보가 추출된 경우, 일 실시예에 따른 픽셀 그룹 결정부(97)는 픽셀 그룹 결정 방식에 기초하여 선택적으로 픽셀값 보상 대상인 픽셀 그룹을 결정할 수 있다. 예를 들어, 일 실시예에 따른 픽셀 그룹 결정부(97)는 픽셀 그룹 결정 방식에 기초하여, 복원 픽셀들을 전술한 극값 레벨, 픽셀값 대역 또는 방향성 라인에 따라 분류할지 여부를 결정하고, 픽셀값 보상 대상인 픽셀 그룹을 결정할 수도 있다. 이 경우, 일 실시예에 따른 복원 픽셀 보상부(98)는 극값 레벨별 픽셀 그룹, 대역별 픽셀 그룹 또는 라인별 픽셀 그룹을 위한 보상값을 이용하여, 픽셀 그룹의 복원 픽셀들의 픽셀값을 보상할 수 있다.When information on the pixel group determining method to be compensated by the information extracting unit 93 according to the embodiment is extracted, the pixel group determining unit 97 according to an embodiment selects the pixel group determining method based on the pixel group determining method, Value compensation target pixel group. For example, the pixel group determination unit 97 according to one embodiment determines whether to classify the restored pixels according to the above-mentioned extremum level, the pixel value band or the directional line based on the pixel group determination method, The pixel group to be compensated may be determined. In this case, the restored pixel compensator 98 compensates the pixel values of the restored pixels of the pixel group using the compensation value for the pixel group for each extreme level, the group for each band, or the group for each line .

일 실시예에 따른 비디오 복호화 장치(90)는, 부호화 과정에서 최대 부호화 단위마다 재귀적으로 부호화를 수행하여 최소 부호화 오차를 발생시킨 부호화 단위에 대한 정보를 획득하여, 현재 픽처에 대한 복호화에 이용할 수 있다. 즉, 최대 부호화 단위마다 최적 부호화 단위로 영상 데이터의 복호화가 가능해진다.The video decoding apparatus 90 according to an exemplary embodiment recursively performs encoding for each maximum encoding unit in the encoding process to obtain information on the encoding unit that has generated the minimum encoding error and can use it for decoding the current picture have. That is, it is possible to decode video data in the optimal encoding unit for each maximum encoding unit.

따라서, 높은 해상도의 영상 또는 데이터량이 과도하게 많은 영상이라도 부호화단으로부터 전송된 최적 부호화 모드에 관한 정보를 이용하여, 영상의 특성에 적응적으로 결정된 부호화 단위의 크기 및 부호화 모드에 따라 효율적으로 영상 데이터를 복호화하여 복원할 수 있다.Accordingly, even if an image with a high resolution or an excessively large amount of data is used, the information on the optimal encoding mode transmitted from the encoding end is used, and the image data is efficiently encoded according to the encoding unit size and encoding mode, Can be decoded and restored.

또한, 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 픽셀값 보상을 위한 비디오 부호화 장치(80) 및 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 픽셀값 보상을 위한 비디오 복호화 장치(90)는, 부호화된 영상이 복호화 및 복원된 경우 복원 영상이 원본 영상 간에 발생하는 시스템적 오차를 보상할 수 있다.
In addition, a video coding apparatus 80 for compensating for pixel values based on hierarchical data units according to an embodiment and a video decoding apparatus for compensating pixel values based on hierarchical data units for each region according to an embodiment The decoding unit 90 can compensate for a systematic error occurring between the original images when the encoded image is decoded and restored.

이하 도 10 내지 20을 참조하여, 일 실시예에 따른 영역별 계층적 데이터 단위에 기반한 비디오 부호화 및 복호화가 상술된다.10 to 20, video encoding and decoding based on area-specific hierarchical data units according to an embodiment will be described in detail.

도 10 은 본 발명의 일 실시예에 따른 부호화 단위의 개념을 도시한다.FIG. 10 illustrates a concept of an encoding unit according to an embodiment of the present invention.

부호화 단위의 예는, 너비x높이가 64x64인 부호화 단위부터, 32x32, 16x16, 8x8, 및 4x4를 포함할 수 있다. 정사각형 형태의 부호화 단위 이외에도, 너비x높이가 64x32, 32x64, 32x16, 16x32, 16x8, 8x16, 8x4, 4x8인 부호화 단위들이 존재할 수 있다.An example of an encoding unit may include 32x32, 16x16, 8x8, and 4x4 from an encoding unit with a width x height of 64x64. In addition to the square-shaped encoding units, there may be encoding units whose width x height is 64x32, 32x64, 32x16, 16x32, 16x8, 8x16, 8x4, 4x8.

비디오 데이터(310)에 대해서는, 해상도는 1920x1080, 부호화 단위의 최대 크기는 64, 최대 심도가 2로 설정되어 있다. 비디오 데이터(320)에 대해서는, 해상도는 1920x1080, 부호화 단위의 최대 크기는 64, 최대 심도가 4로 설정되어 있다. 비디오 데이터(330)에 대해서는, 해상도는 352x288, 부호화 단위의 최대 크기는 16, 최대 심도가 2로 설정되어 있다.With respect to the video data 310, the resolution is set to 1920 x 1080, the maximum size of the encoding unit is set to 64, and the maximum depth is set to 2. With respect to the video data 320, the resolution is set to 1920 x 1080, the maximum size of the encoding unit is set to 64, and the maximum depth is set to 4. With respect to the video data 330, the resolution is set to 352 x 288, the maximum size of the encoding unit is set to 16, and the maximum depth is set to 2.

해상도가 높거나 데이터량이 많은 경우 부호화 효율의 향상 뿐만 아니라 영상 특성을 정확히 반형하기 위해 부호화 사이즈의 최대 크기가 상대적으로 큰 것이 바람직하다. 따라서, 비디오 데이터(330)에 비해, 해상도가 높은 비디오 데이터(310, 320)는 부호화 사이즈의 최대 크기가 64로 선택될 수 있다.It is preferable that the maximum size of the coding size is relatively large in order to improve the coding efficiency as well as to accurately characterize the image characteristics when the resolution or the data amount is large. Therefore, the maximum size of the video data 310 and 320 having the higher resolution than the video data 330 can be selected to be 64. FIG.

최대 심도는 계층적 부호화 단위에서 총 계층수를 나타낸다. 따라서, 비디오 데이터(310)의 최대 심도는 2이므로, 비디오 데이터(310)의 부호화 단위(315)는 장축 크기가 64인 최대 부호화 단위로부터, 심도가 두 계층 깊어져서 장축 크기가 32, 16인 부호화 단위들까지 포함할 수 있다. 반면, 비디오 데이터(330)의 최대 심도는 2이므로, 비디오 데이터(330)의 부호화 단위(335)는 장축 크기가 16인 부호화 단위들로부터, 심도가 두 계층 깊어져서 장축 크기가 8, 4인 부호화 단위들까지 포함할 수 있다. The maximum depth indicates the total number of layers in the hierarchical encoding unit. Therefore, since the maximum depth of the video data 310 is 2, the encoding unit 315 of the video data 310 is encoded from a maximum encoding unit having a major axis size of 64, Units. On the other hand, since the maximum depth of the video data 330 is 2, the encoding unit 335 of the video data 330 has a depth of two layers from the encoding units having the major axis size of 16, Units.

비디오 데이터(320)의 최대 심도는 4이므로, 비디오 데이터(320)의 부호화 단위(325)는 장축 크기가 64인 최대 부호화 단위로부터, 심도가 네 계층 깊어져서 장축 크기가 32, 16, 8, 4인 부호화 단위들까지 포함할 수 있다. 심도가 깊어질수록 세부 정보의 표현능력이 향상될 수 있다.Since the maximum depth of the video data 320 is 4, the encoding unit 325 of the video data 320 has a depth of four layers from 32 to 16, 8, and 4 Encoding units. The deeper the depth, the better the ability to express detail.

도 11 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부의 블록도를 도시한다.11 is a block diagram of an image encoding unit based on an encoding unit according to an embodiment of the present invention.

일 실시예에 따른 영상 부호화부(400)는, 비디오 부호화 장치(80)의 부호화 심도 및 부호화 모드 결정부(83)에서 영상 데이터를 부호화하는데 거치는 작업들을 포함한다. 즉, 인트라 예측부(410)는 현재 프레임(405) 중 인트라 모드의 부호화 단위에 대해 인트라 예측을 수행하고, 움직임 추정부(420) 및 움직임 보상부(425)는 인터 모드의 현재 프레임(405) 및 참조 프레임(495)를 이용하여 인터 추정 및 움직임 보상을 수행한다.The image encoding unit 400 according to an exemplary embodiment includes operations to encode image data in the encoding depth and encoding mode determination unit 83 of the video encoding device 80. [ That is, the intraprediction unit 410 performs intraprediction on the intra-mode encoding unit of the current frame 405, and the motion estimation unit 420 and the motion compensation unit 425 perform intraprediction on the current frame 405 of the inter- And a reference frame 495. The inter-frame estimation and the motion compensation are performed using the reference frame and the reference frame.

인트라 예측부(410), 움직임 추정부(420) 및 움직임 보상부(425)로부터 출력된 데이터는 주파수 변환부(430) 및 양자화부(440)를 거쳐 양자화된 변환 계수로 출력된다. 양자화된 변환 계수는 역양자화부(460), 주파수 역변환부(470)을 통해 공간 영역의 데이터로 복원되고, 복원된 공간 영역의 데이터는 디블로킹부(480) 및 루프 필터링부(490)를 거쳐 후처리되어 참조 프레임(495)으로 출력된다. 양자화된 변환 계수는 엔트로피 부호화부(450)를 거쳐 비트스트림(455)으로 출력될 수 있다.The data output from the intraprediction unit 410, the motion estimation unit 420 and the motion compensation unit 425 is output as a quantized transform coefficient through the frequency transform unit 430 and the quantization unit 440. The quantized transform coefficients are reconstructed into spatial domain data through the inverse quantization unit 460 and the frequency inverse transform unit 470 and the data of the reconstructed spatial domain is passed through the deblocking unit 480 and the loop filtering unit 490 Processed and output to the reference frame 495. [ The quantized transform coefficient may be output to the bitstream 455 via the entropy encoding unit 450.

일 실시예에 따른 비디오 부호화 장치(80)에 적용되기 위해서는, 영상 부호화부(400)의 구성 요소들인 인트라 예측부(410), 움직임 추정부(420), 움직임 보상부(425), 주파수 변환부(430), 양자화부(440), 엔트로피 부호화부(450), 역양자화부(460), 주파수 역변환부(470), 디블로킹부(480) 및 루프 필터링부(490)가 모두, 최대 부호화 단위마다 최대 심도를 고려한 심도별 부호화 단위에 기반하여 작업을 수행하여야 한다. The motion estimation unit 420, the motion compensation unit 425, and the frequency transformation unit 420, which are the components of the image encoding unit 400, are applied to the video encoding apparatus 80 according to one embodiment. The quantization unit 440, the entropy encoding unit 450, the inverse quantization unit 460, the frequency inverse transform unit 470, the deblocking unit 480, and the loop filtering unit 490, The work should be performed based on the depth encoding unit considering the maximum depth.

특히, 인트라 예측부(410), 움직임 추정부(420) 및 움직임 보상부(425)는 부호화 단위의 최대 크기 및 심도를 고려하여 부호화 단위 내의 예측 단위 및 예측 모드를 결정하며, 주파수 변환부(430)는 부호화 단위의 최대 크기 및 심도를 고려하여 변환 단위의 크기를 고려하여야 한다.In particular, the intra prediction unit 410, the motion estimation unit 420, and the motion compensation unit 425 determine the prediction unit and the prediction mode in the coding unit in consideration of the maximum size and depth of the coding unit, and the frequency conversion unit 430 ) Should consider the size of the conversion unit considering the maximum size and depth of the encoding unit.

도 12 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부의 블록도를 도시한다.12 is a block diagram of an image decoding unit based on an encoding unit according to an embodiment of the present invention.

비트스트림(505)이 파싱부(510)를 거쳐 복호화 대상인 부호화된 비디오 데이터 및 복호화를 위해 필요한 부호화에 관한 정보가 파싱된다. 부호화된 비디오 데이터는 엔트로피 복호화부(520) 및 역양자화부(530)를 거쳐 역양자화된 데이터로 출력되고, 주파수 역변환부(540)를 거쳐 공간 영역의 영상 데이터가 복원된다. The bit stream 505 passes through the parsing unit 510 and the encoded video data to be decoded and the encoding-related information necessary for decoding are parsed. The encoded video data is output as inverse quantized data through the entropy decoding unit 520 and the inverse quantization unit 530, and the image data in the spatial domain is restored through the frequency inverse transform unit 540.

공간 영역의 영상 데이터에 대해서, 인트라 예측부(550)는 인트라 모드의 부호화 단위에 대해 인트라 예측을 수행하고, 움직임 보상부(560)는 참조 프레임(585)를 함께 이용하여 인터 모드의 부호화 단위에 대해 움직임 보상을 수행한다.The intra-prediction unit 550 performs intraprediction on the intra-mode encoding unit for the video data in the spatial domain, and the motion compensating unit 560 performs intra-prediction on the intra-mode encoding unit using the reference frame 585 And performs motion compensation for the motion compensation.

인트라 예측부(550) 및 움직임 보상부(560)를 거친 공간 영역의 데이터는 디블로킹부(570) 및 루프 필터링부(580)를 거쳐 후처리되어 복원 프레임(595)으로 출력될 수 있다. 또한, 디블로킹부(570) 및 루프 필터링부(580)를 거쳐 후처리된 데이터는 참조 프레임(585)으로서 출력될 수 있다.The data in the spatial domain that has passed through the intra prediction unit 550 and the motion compensation unit 560 may be post-processed through the deblocking unit 570 and the loop filtering unit 580 and output to the reconstruction frame 595. Further, the post-processed data via deblocking unit 570 and loop filtering unit 580 may be output as reference frame 585.

일 실시예에 따른 비디오 복호화 장치(90)의 복호화부(95)에서 영상 데이터를 복호화하기 위해, 일 실시예에 따른 영상 복호화부(500)의 파싱부(510) 이후의 단계별 작업들이 수행될 수 있다.In order to decode the image data in the decoding unit 95 of the video decoding apparatus 90 according to the embodiment, operations after the parsing unit 510 of the image decoding unit 500 according to the embodiment may be performed have.

일 실시예에 따른 비디오 복호화 장치(90)에 적용되기 위해서는, 영상 복호화부(500)의 구성 요소들인 파싱부(510), 엔트로피 복호화부(520), 역양자화부(530), 주파수 역변환부(540), 인트라 예측부(550), 움직임 보상부(560), 디블로킹부(570) 및 루프 필터링부(580)가 모두, 최대 부호화 단위마다 부호화 심도의 부호화 단위에 기반하여 작업을 수행하여야 한다. The entropy decoding unit 520, the inverse quantization unit 530, and the frequency inverse transform unit (not shown), which are components of the video decoding unit 500, to be applied to the video decoding apparatus 90 according to one embodiment. The intraprediction unit 550, the motion compensation unit 560, the deblocking unit 570 and the loop filtering unit 580 all have to perform an operation based on the encoding unit of the encoding depth for each maximum encoding unit .

특히, 인트라 예측부(550), 움직임 보상부(560)는 부호화 단위의 최대 크기 및 심도를 고려하여 부호화 단위 및 예측 모드를 결정하며, 주파수 역변환부(540)는 부호화 단위의 최대 크기 및 심도를 고려하여 변환 단위의 크기를 고려하여야 한다.In particular, the intra prediction unit 550 and the motion compensation unit 560 determine a coding unit and a prediction mode in consideration of the maximum size and depth of a coding unit, and the frequency inverse transform unit 540 sets the maximum size and depth of the coding unit The size of the conversion unit should be considered.

도 13 는 본 발명의 일 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.FIG. 13 shows a coding unit and a prediction unit according to an embodiment of the present invention.

일 실시예에 따른 비디오 부호화 장치(80) 및 일 실시예에 따른 비디오 복호화 장치(90)는 영상 특성을 고려하기 위해 계층적인 부호화 단위를 사용한다. 부호화 단위의 최대 높이 및 너비, 최대 심도는 영상의 특성에 따라 적응적으로 결정될 수도 있으며, 사용자의 요구에 따라 다양하게 설정될 수도 있다. 미리 설정된 부호화 단위의 최대 크기에 따라, 심도별 부호화 단위의 크기가 결정될 수 있다.The video encoding apparatus 80 and the video decoding apparatus 90 according to an embodiment use a hierarchical encoding unit to consider the image characteristics. The maximum height, width, and maximum depth of the encoding unit may be adaptively determined according to the characteristics of the image, or may be variously set according to the demand of the user. The size of each coding unit may be determined according to the maximum size of a predetermined coding unit.

일 실시예에 따른 부호화 단위의 계층 구조(600)는 부호화 단위의 최대 높이 및 너비가 64이며, 최대 심도가 4인 경우를 도시하고 있다. 일 실시예에 따른 부호화 단위의 계층 구조(600)의 세로축을 따라서 심도가 깊어지므로 심도별 부호화 단위의 높이 및 너비가 각각 분할한다. 또한, 부호화 단위의 계층 구조(600)의 가로축을 따라, 각각의 심도별 부호화 단위의 예측 부호화의 기반이 되는 부분적 데이터 단위인 예측 단위가 도시되어 있다.The hierarchical structure 600 of the encoding unit according to an embodiment shows a case where the maximum height and width of the encoding unit is 64 and the maximum depth is 4. Since the depth is deeper along the vertical axis of the hierarchical structure 600 of the encoding unit according to the embodiment, the height and width of the encoding unit for each depth are divided. In addition, along the horizontal axis of the hierarchical structure 600 of the coding unit, a prediction unit which is a partial data unit on which prediction coding of each depth coding unit is based is shown.

즉, 부호화 단위(610)는 부호화 단위의 계층 구조(600) 중 최대 부호화 단위로서 심도가 0이며, 부호화 단위의 크기, 즉 높이 및 너비가 64x64이다. 세로축을 따라 심도가 깊어지며, 크기 32x32인 심도 1의 부호화 단위(620), 크기 16x16인 심도 2의 부호화 단위(630), 크기 8x8인 심도 3의 부호화 단위(640), 크기 4x4인 심도 4의 부호화 단위(650)가 존재한다. 크기 4x4인 심도 4의 부호화 단위(650)는 최소 부호화 단위이다.That is, the coding unit 610 is the largest coding unit among the hierarchical structures 600 of the coding units and has a depth of 0, and the size of the coding units, that is, the height and the width, is 64x64. A depth-1 encoding unit 620 having a size of 32x32, a depth-2 encoding unit 620 having a size 16x16, a depth-3 encoding unit 640 having a size 8x8, a depth 4x4 having a size 4x4, There is an encoding unit 650. An encoding unit 650 of depth 4 of size 4x4 is the minimum encoding unit.

각각의 심도별로 가로축을 따라, 부호화 단위의 예측 단위로서, 부분적 데이터 단위들이 배열된다. 즉, 심도 0의 크기 64x64의 부호화 단위(610)의 예측 단위는, 크기 64x64의 부호화 단위(610)에 포함되는 크기 64x64의 부분적 데이터 단위(610), 크기 64x32의 부분적 데이터 단위들(612), 크기 32x64의 부분적 데이터 단위들(614), 크기 32x32의 부분적 데이터 단위들(616)일 수 있다. 반대로 보면, 부호화 단위는 변환 단위들(610, 612, 614, 616)을 포함하는 최소 크기의 정사각형의 데이터 단위일 수 있다.The partial data units are arranged as a prediction unit of the encoding unit along the horizontal axis for each depth. That is, the prediction unit of the encoding unit 610 having a size of 64x64 with a depth of 0 is a partial data unit 610 having a size of 64x64, partial data units 612 having a size of 64x32 included in the encoding unit 610 of size 64x64, Partial data units 614 of size 32x64, and partial data units 616 of size 32x32. Conversely, the encoding unit may be a minimum-sized square data unit including the conversion units 610, 612, 614, and 616.

마찬가지로, 심도 1의 크기 32x32의 부호화 단위(620)의 예측 단위는, 크기 32x32의 부호화 단위(620)에 포함되는 크기 32x32의 부분적 데이터 단위(620), 크기 32x16의 부분적 데이터 단위들(622), 크기 16x32의 부분적 데이터 단위들(624), 크기 16x16의 부분적 데이터 단위들(626)일 수 있다. Likewise, the prediction unit of the encoding unit 620 of the size 32x32 of the depth 1 is the partial data unit 620 of the size 32x32, the partial data units 622 of the size 32x16, and the partial data unit 620 of the size 32x32 included in the encoding unit 620 of the size 32x32, Partial data units 624 of size 16x32, partial data units 626 of size 16x16.

마찬가지로, 심도 2의 크기 16x16의 부호화 단위(630)의 예측 단위는, 크기 16x16의 부호화 단위(630)에 포함되는 크기 16x16의 부분적 데이터 단위(630), 크기 16x8의 부분적 데이터 단위들(632), 크기 8x16의 부분적 데이터 단위들(634), 크기 8x8의 부분적 데이터 단위들(636)일 수 있다. Likewise, the prediction unit of a 16x16 size 16x16 encoding unit is a 16x16 partial data unit 630, a 16x8 partial data unit 632, and a 16x16 partial data unit 630 included in the 16x16 encoding unit 630, Partial data units 634 of size 8x16, and partial data units 636 of size 8x8.

마찬가지로, 심도 3의 크기 8x8의 부호화 단위(640)의 예측 단위는, 크기 8x8의 부호화 단위(640)에 포함되는 크기 8x8의 부분적 데이터 단위(640), 크기 8x4의 부분적 데이터 단위들(642), 크기 4x8의 부분적 데이터 단위들(644), 크기 4x4의 부분적 데이터 단위들(646)일 수 있다. Likewise, the prediction unit of the encoding unit 640 of the size 8x8 of the depth 3 includes the partial data unit 640 of the size 8x8, the partial data units 642 of the size 8x4, and the partial data units 640 of the size 8x8 included in the encoding unit 640 of the size 8x8, Partial data units 644 of size 4x8, and partial data units 646 of size 4x4.

마지막으로, 심도 4의 크기 4x4의 부호화 단위(650)는 최소 부호화 단위이며 최하위 심도의 부호화 단위이고, 해당 예측 단위도 크기 4x4의 데이터 단위(650)이다.Finally, a coding unit 650 of size 4x4 is the minimum coding unit and the coding unit of the lowest depth, and the prediction unit is a data unit 650 of size 4x4.

일 실시예에 따른 비디오 부호화 장치(80)의 부호화 심도 및 부호화 모드 결정부(83)는, 최대 부호화 단위(610)의 부호화 심도를 결정하기 위해, 최대 부호화 단위(610)에 포함되는 각각의 심도의 부호화 단위마다 부호화를 수행하여야 한다. The encoding depth and encoding mode determination unit 83 of the video encoding apparatus 80 according to an embodiment determines the encoding depth of the maximum encoding unit 610 based on the respective depths included in the maximum encoding unit 610 Encoding is performed for each encoding unit of the encoder.

동일한 범위 및 크기의 데이터를 포함하기 위한 심도별 부호화 단위의 개수는, 심도가 깊어질수록 심도별 부호화 단위의 개수도 증가한다. 예를 들어, 심도 1의 부호화 단위 한 개가 포함하는 데이터에 대해서, 심도 2의 부호화 단위는 네 개가 필요하다. 따라서, 동일한 데이터의 부호화 결과를 심도별로 비교하기 위해서, 한 개의 심도 1의 부호화 단위 및 네 개의 심도 2의 부호화 단위를 이용하여 각각 부호화되어야 한다.The number of coding units per depth to include data of the same range and size increases as the depth of the coding unit increases. For example, for data containing one coding unit at depth 1, four coding units at depth 2 are required. Therefore, in order to compare the encoding results of the same data by depth, they should be encoded using a single depth 1 encoding unit and four depth 2 encoding units, respectively.

각각의 심도별 부호화를 위해서는, 부호화 단위의 계층 구조(600)의 가로축을 따라, 심도별 부호화 단위의 예측 단위들마다 부호화를 수행하여, 해당 심도에서 가장 작은 부호화 오차인 대표 부호화 오차가 선택될 수다. 또한, 부호화 단위의 계층 구조(600)의 세로축을 따라 심도가 깊어지며, 각각의 심도마다 부호화를 수행하여, 심도별 대표 부호화 오차를 비교하여 최소 부호화 오차가 검색될 수 있다. 최대 부호화 단위(610) 중 최소 부호화 오차가 발생하는 심도가 최대 부호화 단위(610)의 부호화 심도 및 파티션 타입으로 선택될 수 있다. For each depth-of-field coding, encoding is performed for each prediction unit of the depth-dependent coding unit along the horizontal axis of the hierarchical structure 600 of the coding unit, and a representative coding error, which is the smallest coding error at the corresponding depth, is selected . In addition, depths are deepened along the vertical axis of the hierarchical structure 600 of encoding units, and the minimum encoding errors can be retrieved by comparing the representative encoding errors per depth by performing encoding for each depth. The depth at which the minimum coding error occurs among the maximum coding units 610 can be selected as the coding depth and the partition type of the maximum coding unit 610. [

도 14 은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위의 관계를 도시한다. FIG. 14 shows a relationship between an encoding unit and a conversion unit according to an embodiment of the present invention.

일 실시예에 따른 비디오 부호화 장치(80) 또는 일 실시예에 따른 비디오 복호화 장치(90)는, 최대 부호화 단위마다 최대 부호화 단위보다 작거나 같은 크기의 부호화 단위로 영상을 부호화하거나 복호화한다. 부호화 과정 중 주파수 변환을 위한 변환 단위의 크기는 각각의 부호화 단위보다 크지 않은 데이터 단위를 기반으로 선택될 수 있다.The video coding apparatus 80 or the video decoding apparatus 90 according to an embodiment encodes or decodes an image in units of coding units smaller than or equal to the maximum coding unit for each maximum coding unit. The size of the conversion unit for frequency conversion during encoding can be selected based on data units that are not larger than the respective encoding units.

예를 들어, 일 실시예에 따른 비디오 부호화 장치(80) 또는 일 실시예에 따른 비디오 복호화 장치(90)에서, 현재 부호화 단위(710)가 64x64 크기일 때, 32x32 크기의 변환 단위(720)를 이용하여 주파수 변환이 수행될 수 있다. For example, in the video coding apparatus 80 according to the embodiment or the video coding apparatus 90 according to the embodiment, when the current coding unit 710 is 64x64 size, the 32x32 conversion unit 720 The frequency conversion can be performed.

또한, 64x64 크기의 부호화 단위(710)의 데이터를 64x64 크기 이하의 32x32, 16x16, 8x8, 4x4 크기의 변환 단위들로 각각 주파수 변환을 수행하여 부호화한 후, 원본과의 오차가 가장 적은 변환 단위가 선택될 수 있다.In addition, the data of the encoding unit 710 of 64x64 size is encoded by performing the frequency conversion with the conversion units of 32x32, 16x16, 8x8, and 4x4 size of 64x64 or smaller, respectively, and then the conversion unit having the smallest error with the original Can be selected.

도 15 은 본 발명의 일 실시예에 따라, 심도별 부호화 정보들을 도시한다.FIG. 15 illustrates depth-specific encoding information, in accordance with an embodiment of the present invention.

일 실시예에 따른 비디오 부호화 장치(80)의 부호화 정보 부호화부는 부호화 모드에 관한 정보로서, 각각의 부호화 심도의 부호화 단위마다 파티션 타입에 관한 정보(800), 예측 모드에 관한 정보(810), 변환 단위 크기에 대한 정보(820)를 부호화하여 전송할 수 있다.The encoding information encoding unit of the video encoding device 80 according to the embodiment is information on the encoding mode, and includes information on the partition type 800, information on the prediction mode 810, Information 820 on the unit size can be encoded and transmitted.

파티션 타입에 대한 정보(800)는, 현재 부호화 단위의 예측 부호화를 위해 예측 단위로서, 현재 부호화 단위가 분할된 타입에 대한 정보를 나타낸다. 예를 들어, 심도 0 및 크기 2Nx2N의 현재 부호화 단위 CU_0는, 크기 2Nx2N의 예측 단위(802), 크기 2NxN의 예측 단위(804), 크기 Nx2N의 예측 단위(806), 크기 NxN의 예측 단위(808) 중 어느 하나의 타입으로 분할되어 예측 단위로 이용될 수 있다. 이 경우 현재 부호화 단위의 파티션 타입에 관한 정보(800)는 크기 2Nx2N의 예측 단위(802), 크기 2NxN의 예측 단위(804), 크기 Nx2N의 예측 단위(806) 및 크기 NxN의 예측 단위(808) 중 하나를 나타내도록 설정된다.The partition type information 800 indicates information on a type in which the current encoding unit is divided as a prediction unit for predictive encoding of the current encoding unit. For example, the current encoding unit CU_0 of depth 0 and size 2Nx2N includes a prediction unit 802 of size 2Nx2N, a prediction unit 804 of size 2NxN, a prediction unit 806 of size Nx2N, a prediction unit 808 of size NxN ) And can be used as a prediction unit. In this case, information 800 regarding the partition type of the current encoding unit includes a prediction unit 802 of size 2Nx2N, a prediction unit 804 of size 2NxN, a prediction unit 806 of size Nx2N, and a prediction unit 808 of size NxN. Lt; / RTI &gt;

예측 모드에 관한 정보(810)는, 각각의 예측 단위의 예측 모드를 나타낸다. 예를 들어 예측 모드에 관한 정보(810)를 통해, 파티션 타입에 관한 정보(800)가 가리키는 예측 단위가 인트라 모드(812), 인터 모드(814) 및 스킵 모드(816) 중 하나로 예측 부호화가 수행되는지 여부가 설정될 수 있다.The information 810 on the prediction mode indicates the prediction mode of each prediction unit. The prediction unit indicated by the information 800 relating to the partition type is predicted to be one of the intra mode 812, the inter mode 814 and the skip mode 816 through the prediction mode information 810, for example. Can be set.

또한, 변환 단위 크기에 관한 정보(820)는 현재 부호화 단위를 어떠한 변환 단위를 기반으로 주파수 변환을 수행할지 여부를 나타낸다. 예를 들어, 변환 단위는 제 1 인트라 변환 단위 크기(822), 제 2 인트라 변환 단위 크기(824), 제 1 인터 변환 단위 크기(826), 제 2 인트라 변환 단위 크기(828) 중 하나일 수 있다.In addition, the information 820 on the conversion unit size indicates whether to perform frequency conversion on the basis of which conversion unit the current encoding unit is performed. For example, the conversion unit may be one of a first intra-conversion unit size 822, a second intra-conversion unit size 824, a first inter-conversion unit size 826, have.

일 실시예에 따른 비디오 복호화 장치(90)의 부호화 정보 추출부는, 각각의 심도별 부호화 단위마다 파티션 타입에 관한 정보(800), 예측 모드에 관한 정보(810), 변환 단위 크기에 대한 정보(820)를 추출하여 복호화에 이용할 수 있다.The encoding information extracting unit of the video decoding apparatus 90 according to the embodiment extracts the information 800 about the partition type, the information 810 about the prediction mode, the information 820 about the conversion unit size ) Can be extracted and used for decoding.

도 16 는 본 발명의 일 실시예에 따른 심도별 부호화 단위를 도시한다. FIG. 16 shows a depth encoding unit according to an embodiment of the present invention.

심도의 변화를 나타내기 위해 분할 정보가 이용될 수 있다. 분할 정보는 현재 심도의 부호화 단위가 하위 심도의 부호화 단위로 분할될지 여부를 나타낸다. Partition information may be used to indicate changes in depth. The division information indicates whether the current-depth encoding unit is divided into lower-depth encoding units.

심도 0 및 2N_0x2N_0 크기의 부호화 단위의 예측 부호화를 위한 예측 단위(910)는 2N_0x2N_0 크기의 파티션 타입(912), 2N_0xN_0 크기의 파티션 타입(914), N_0x2N_0 크기의 파티션 타입(916), N_0xN_0 크기의 파티션 타입(918)을 포함할 수 있다. The prediction unit 910 for the prediction encoding of the coding units of depth 0 and 2N_0x2N_0 has a partition type 912 of 2N_0x2N_0 size, a partition type 914 of 2N_0xN_0 size, a partition type 916 of N_0x2N_0 size, a partition of size N_0xN_0 Type &lt; / RTI &gt;

파티션 타입마다, 한 개의 2N_0x2N_0 크기의 예측 단위, 두 개의 2N_0xN_0 크기의 예측 단위, 두 개의 N_0x2N_0 크기의 예측 단위, 네 개의 N_0xN_0 크기의 예측 단위마다 반복적으로 예측 부호화가 수행되어야 한다. 크기 2N_0x2N_0, 크기 N_0x2N_0 및 크기 2N_0xN_0 및 크기 N_0xN_0의 예측 단위에 대해서는, 인트라 모드 및 인터 모드로 예측 부호화가 수행될 수 있다. 스킵 모드는 크기 2N_0x2N_0의 예측 단위에 예측 부호화가 대해서만 수행될 수 있다.For each partition type, predictive encoding should be repeatedly performed for each prediction unit of 2N_0x2N_0 size, two 2N_0xN_0 size prediction units, two N_0x2N_0 size prediction units, and four N_0xN_0 size prediction units. For a prediction unit of size 2N_0x2N_0, size N_0x2N_0, size 2N_0xN_0, and size N_0xN_0, predictive coding may be performed in intra mode and inter mode. The skip mode can be performed only for predictive encoding in a prediction unit of size 2N_0x2N_0.

크기 N_0xN_0의 파티션 타입(918)에 의한 부호화 오차가 가장 작다면, 심도 0를 1로 변경하고(920), 심도 2 및 크기 N_0xN_0의 파티션 타입의 부호화 단위들(922, 924, 926, 928)에 대해 반복적으로 최소 부호화 오차를 검색해 나갈 수 있다. If the coding error by the partition type 918 of the size N_0xN_0 is the smallest, the depth 0 is changed to 1 (920), and the coding units 922, 924, 926 and 928 of the partition type of the depth 2 and the size N_0xN_0 are changed The minimum coding error can be repeatedly searched for.

동일한 심도의 부호화 단위들(922, 924, 926, 928)에 대해 부호화가 반복적으로 수행되므로, 이중 하나만 예를 들어 심도 1의 부호화 단위의 부호화를 설명한다. 심도 1 및 크기 2N_1x2N_1 (=N_0xN_0)의 부호화 단위의 예측 부호화를 위한 예측 단위(930)는, 크기 2N_1x2N_1의 파티션 타입(932), 크기 2N_1xN_1의 파티션 타입(934), 크기 N_1x2N_1의 파티션 타입(936), 크기 N_1xN_1의 파티션 타입(938)을 포함할 수 있다. 파티션 타입마다, 한 개의 크기 2N_1x2N_1의 예측 단위, 두 개의 크기 2N_1xN_1의 예측 단위, 두 개의 크기 N_1x2N_1의 예측 단위, 네 개의 크기 N_1xN_1의 예측 단위마다 반복적으로 예측 부호화가 수행되어야 한다.Since encoding is repeatedly performed on the encoding units 922, 924, 926, and 928 of the same depth, encoding of only one of the encoding units of depth 1, for example, will be described. The prediction unit 930 for predicting the coding unit of the depth 1 and the size 2N_1x2N_1 (= N_0xN_0) includes a partition type 932 of size 2N_1x2N_1, a partition type 934 of size 2N_1xN_1, a partition type 936 of size N_1x2N_1, , And a partition type 938 of size N_1xN_1. For each partition type, predictive coding should be repeatedly performed for each prediction unit of a size 2N_1x2N_1, a prediction unit of two sizes 2N_1xN_1, a prediction unit of two sizes N_1x2N_1, and a prediction unit of four sizes N_1xN_1.

또한, 크기 N_1xN_1 크기의 파티션 타입(938)에 의한 부호화 오차가 가장 작다면, 심도 1을 심도 2로 변경하면서(940), 심도 2 및 크기 N_2xN_2의 부호화 단위들(942, 944, 946, 948)에 대해 반복적으로 최소 부호화 오차를 검색해 나갈 수 있다. If the coding error by the partition type 938 of the size N_1xN_1 is the smallest, the coding units 942, 944, 946 and 948 of the depth 2 and the size N_2xN_2 are changed while changing the depth 1 to the depth 2 (940) The minimum coding error can be repeatedly searched for.

최대 심도가 d인 경우, 심도별 분할 정보는 심도 d-1일 때까지 설정될 수 있다. 즉, 심도 d-1 및 크기 2N_(d-1)x2N_(d-1)의 부호화 단위의 예측 부호화를 위한 예측 단위(950)는, 크기 2N_(d-1)x2N_(d-1)의 파티션 타입(952), 크기 2N_(d-1)xN_(d-1)의 파티션 타입(954), 크기 N_(d-1)x2N_(d-1)의 파티션 타입(956), 크기 N_(d-1)xN_(d-1)의 파티션 타입(958)을 포함할 수 있다. If the maximum depth is d, the depth-based segmentation information can be set until the depth d-1. That is, the prediction unit 950 for predictive coding of the coding unit of the depth d-1 and the size 2N_ (d-1) x2N_ (d-1) A partition type 954 of size 2N_ (d-1) xN_ (d-1), a partition type 956 of size N_ (d-1) x2N_ 1) xN_ (d-1) &lt; / RTI &gt;

파티션 타입마다, 한 개의 크기 2N_(d-1)x2N_(d-1)의 예측 단위, 두 개의 크기 2N_(d-1)xN_(d-1)의 예측 단위, 두 개의 크기 N_(d-1)x2N_(d-1)의 예측 단위, 네 개의 크기 N_(d-1)xN_(d-1)의 예측 단위마다 반복적으로 예측 부호화를 통한 부호화가 수행되어야 한다. 최대 심도가 d이므로, 심도 d-1의 부호화 단위(952)는 더 이상 분할 과정을 거치지 않는다.(D-1) x2N_ (d-1), two predicted units of two sizes 2N_ (d-1) (d-1) x2N_ (d-1), four sizes N_ (d-1) xN_ (d-1). Since the maximum depth is d, the coding unit 952 of depth d-1 no longer undergoes the division process.

일 실시예에 따른 비디오 부호화 장치(80)는 부호화 단위(912)를 위한 부호화 심도를 결정하기 위해, 심도별 부호화 오차를 비교하여 가장 작은 부호화 오차가 발생하는 심도를 선택한다. The video coding apparatus 80 according to an exemplary embodiment compares depth-dependent coding errors to determine the depth of coding for the coding unit 912 to select the depth at which the smallest coding error occurs.

예를 들어, 심도 0의 부호화 단위에 대한 부호화 오차는 파티션 타입(912, 914, 916, 918)마다 예측 부호화를 수행한 후 가장 작은 부호화 오차가 발생하는 예측 단위가 결정된다. 마찬가지로 심도 0, 1, ..., d-1 마다 부호화 오차가 가장 작은 예측 단위가 검색될 수 있다. 심도 d에서는, 크기 2N_dx2N_d의 부호화 단위이면서 예측 단위(960)를 기반으로 한 예측 부호화를 통해 부호화 오차가 결정될 수 있다. For example, a coding error for a coding unit of depth 0 is predicted for each partition type 912, 914, 916, and 918, and a prediction unit in which the smallest coding error occurs is determined. Similarly, a prediction unit having the smallest coding error can be searched for every depth 0, 1, ..., d-1. At the depth d, the coding error can be determined through predictive coding based on the prediction unit 960, which is a coding unit of size 2N_dx2N_d.

이런 식으로 심도 0, 1, ..., d-1, d의 모든 심도별 최소 부호화 오차를 비교하여 오차가 가장 작은 심도가 선택되어 부호화 심도로 결정될 수 있다. 부호화 심도 및 해당 심도의 예측 단위는 부호화 모드에 관한 정보로써 부호화되어 전송될 수 있다. 또한, 심도 0으로부터 부호화 심도에 이르기까지 부호화 단위가 분할되어야 하므로, 부호화 심도의 분할 정보만이 '0'으로 설정되고, 부호화 심도를 제외한 심도별 분할 정보는 '1'로 설정되어야 한다. In this way, the minimum coding error of each of the depths 0, 1, ..., d-1, and d is compared and the depth with the smallest error is selected to be determined as the coding depth. The coding depth and the prediction unit of the corresponding depth can be encoded and transmitted as information on the coding mode. In addition, since the coding unit must be divided from the depth 0 to the coding depth, only the division information of the coding depth is set to '0', and the division information by depth is set to '1' except for the coding depth.

일 실시예에 따른 비디오 복호화 장치(90)의 추출부(91)는 부호화 단위(912)에 대한 부호화 심도 및 예측 단위에 관한 정보를 추출하여 부호화 단위(912)를 복호화하는데 이용할 수 있다. 일 실시예에 따른 비디오 복호화 장치(90)는 심도별 분할 정보를 이용하여 분할 정보가 '0'인 심도를 부호화 심도로 파악하고, 해당 심도에 대한 부호화 모드에 관한 정보를 이용하여 복호화에 이용할 수 있다.The extracting unit 91 of the video decoding apparatus 90 according to the embodiment may extract the information on the coding depth and the prediction unit for the coding unit 912 and use it to decode the coding unit 912. [ The video decoding apparatus 90 according to an embodiment grasps the depth with the division information of '0' as the coding depth using the division information according to the depth, and uses the information about the coding mode for the corresponding depth to use it for decoding have.

도 17, 18 및 19는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 주파수 변환 단위의 관계를 도시한다.FIGS. 17, 18 and 19 illustrate the relationship between an encoding unit, a prediction unit, and a frequency conversion unit according to an embodiment of the present invention.

부호화 단위(1010)는, 최대 부호화 단위에 대해 일 실시예에 따른 비디오 부호화 장치(80)가 결정한 부호화 심도별 부호화 단위들이다. 예측 단위(1060)는 부호화 단위(1010) 중 각각의 부호화 심도별 부호화 단위의 예측 단위들이며, 변환 단위(1070)는 각각의 부호화 심도별 부호화 단위의 변환 단위들이다.The coding unit 1010 is coding units for coding depth determined by the video coding apparatus 80 according to the embodiment with respect to the maximum coding unit. The prediction unit 1060 is a prediction unit of each coding depth unit among the coding units 1010 and the conversion unit 1070 is a conversion unit of each coding depth unit.

심도별 부호화 단위들(1010)은 최대 부호화 단위의 심도가 0이라고 하면, 부호화 단위들(1012, 1054)은 심도가 1, 부호화 단위들(1014, 1016, 1018, 1028, 1050, 1052)은 심도가 2, 부호화 단위들(1020, 1022, 1024, 1026, 1030, 1032, 1048)은 심도가 3, 부호화 단위들(1040, 1042, 1044, 1046)은 심도가 4이다. When the depth of the maximum encoding unit is 0, the depth of the encoding units 1012 and 1054 is 1 and the depth of the encoding units 1014, 1016, 1018, 1028, 1050, The coding units 1020, 1022, 1024, 1026, 1030, 1032 and 1048 have a depth of 3 and the coding units 1040, 1042, 1044 and 1046 have a depth of 4.

예측 단위들(1060) 중 일부(1014, 1016, 1022, 1032, 1048, 1050, 1052, 1054)는 부호화 단위가 분할된 타입이다. 즉, 예측 단위(1014, 1022, 1050, 1054)는 2NxN의 파티션 타입이며, 예측 단위(1016, 1048, 1052)는 Nx2N의 파티션 타입, 예측 단위(1032)는 NxN의 파티션 타입이다. 즉, 심도별 부호화 단위들(1010)의 예측 단위는 각각의 부호화 단위보다 작거나 같다. A portion (1014, 1016, 1022, 1032, 1048, 1050, 1052, 1054) of the prediction units 1060 is a type in which the coding unit is divided. That is, the prediction units 1014, 1022, 1050 and 1054 are partition types of 2NxN, the prediction units 1016, 1048 and 1052 are partition types of Nx2N, and the prediction units 1032 are partition types of NxN. That is, the prediction unit of the depth-dependent coding units 1010 is smaller than or equal to each coding unit.

변환 단위들(1070) 중 일부(1052)의 영상 데이터에 대해서는 부호화 단위에 비해 작은 크기의 데이터 단위로 주파수 변환 또는 주파수 역변환이 수행된다. 또한, 변환 단위(1014, 1016, 1022, 1032, 1048, 1050, 1052, 1054)는 예측 단위들(1060) 중 해당 예측 단위와 비교해보면, 서로 다른 크기 또는 형태의 데이터 단위이다. 즉, 일 실시예에 따른 비디오 부호화 장치(80) 및 일 실시예에 다른 비디오 복호화 장치(90)는 동일한 부호화 단위에 대한 인트라 예측/움직임 추정/움직임 보상 작업, 및 주파수 변환/역변환 작업이라 할지라도, 각각 별개의 데이터 단위를 기반으로 수행할 수 있다.The image data of a part 1052 of the conversion units 1070 is subjected to frequency conversion or frequency inverse conversion in units of data smaller in size than the encoding unit. The conversion units 1014, 1016, 1022, 1032, 1048, 1050, 1052, and 1054 are data units of different sizes or types when compared with the prediction units of the prediction units 1060. That is, the video coding apparatus 80 according to the embodiment and the video coding apparatus 90 according to the embodiment can perform the intra prediction / motion estimation / motion compensation operation for the same coding unit and the frequency conversion / , Each based on a separate data unit.

도 20 은 본 발명의 일 실시예에 따른 부호화 단위별 부호화 정보를 도시한다.FIG. 20 shows encoding information for each encoding unit according to an embodiment of the present invention.

일 실시예에 따른 비디오 부호화 장치(80)의 전송부(80)는 부호화 단위별 부호화 정보를 출력하고, 일 실시예에 따른 비디오 복호화 장치(90)의 부호화 정보 추출부(91)는 부호화 단위별 부호화 정보를 추출할 수 있다.The transmitting unit 80 of the video encoding apparatus 80 according to an embodiment outputs encoding information for each encoding unit and the encoding information extracting unit 91 of the video decoding apparatus 90 according to the embodiment extracts encoding information for each encoding unit It is possible to extract the encoding information.

부호화 정보는 부호화 단위에 대한 분할 정보, 파티션 타입 정보, 예측 모드 정보, 변환 단위 크기 정보를 포함할 수 있다. 도 11에 도시되어 있는 부호화 정보들은 일 실시예에 따른 비디오 부호화 장치(80) 및 일 실시예에 따른 비디오 복호화 장치(90)에서 설정할 수 있는 일례이다.The encoding information may include division information for the encoding unit, partition type information, prediction mode information, and conversion unit size information. The encoding information shown in FIG. 11 is an example that can be set in the video encoding apparatus 80 according to the embodiment and the video encoding apparatus 90 according to the embodiment.

분할 정보는 해당 부호화 단위의 부호화 심도를 나타낼 수 있다. 즉, 분할 정보에 따라 더 이상 분할되지 않는 심도가 부호화 심도이므로, 부호화 심도에 대해서 파티션 타입 정보, 예측 모드, 변환 단위 크기 정보가 정의될 수 있다. 분할 정보에 따라 한 단계 더 분할되어야 하는 경우에는, 분할된 4개의 하위 심도의 부호화 단위마다 독립적으로 부호화가 수행되어야 한다.The division information may indicate the coding depth of the corresponding encoding unit. That is, since depths that are no longer divided according to the division information are coding depths, partition type information, prediction mode, and conversion unit size information can be defined with respect to the coding depth. When it is necessary to further divide by one division according to the division information, encoding should be performed independently for each of four divided sub-depth coding units.

파티션 타입 정보는, 부호화 심도의 부호화 단위의 변환 단위의 파티션 타입을 2Nx2N, 2NxN, Nx2N 및 NxN 중 하나로 나타낼 수 있다. 예측 모드는, 인트라 모드, 인터 모드 및 스킵 모드 중 하나로 나타낼 수 있다. 인트라 모드 및 인터 모드는 파티션 타입 2Nx2N, 2NxN, Nx2N 및 NxN에서 정의될 수 있으며, 스킵 모드는 파티션 타입 2Nx2N에서만 정의될 수 있다. 변환 단위 크기는 인트라 모드에서 두 종류의 크기, 인터 모드에서 두 종류의 크기로 설정될 수 있다.As the partition type information, the partition type of the conversion unit of the coding unit of the coding depth can be represented by 2Nx2N, 2NxN, Nx2N and NxN. The prediction mode may be represented by one of an intra mode, an inter mode, and a skip mode. The intra mode and the inter mode can be defined in the partition types 2Nx2N, 2NxN, Nx2N and NxN, and the skip mode can be defined only in the partition type 2Nx2N. The conversion unit size can be set to two kinds of sizes in the intra mode and two kinds of sizes in the inter mode.

부호화 단위 내의 최소 부호화 단위마다, 소속되어 있는 부호화 심도의 부호화 단위별 부호화 정보를 수록하고 있을 수 있다. 따라서, 인접한 최소 부호화 단위들끼리 각각 보유하고 있는 부호화 정보들을 확인하면, 동일한 부호화 심도의 부호화 단위에 포함되는지 여부가 확인될 수 있다. 또한, 최소 부호화 단위가 보유하고 있는 부호화 정보를 이용하면 해당 부호화 심도의 부호화 단위를 확인할 수 있으므로, 최대 부호화 단위 내의 부호화 심도들의 분포가 유추될 수 있다.The encoding unit-specific encoding information of the belonging encoding depth may be stored for each minimum encoding unit in the encoding unit. Therefore, if encoding information held in each of the adjacent minimum encoding units is checked, it can be confirmed whether or not the encoding information is included in the encoding unit of the same encoding depth. In addition, since the encoding unit of the encoding depth can be identified by using the encoding information held in the minimum encoding unit, the distribution of encoding depths in the maximum encoding unit can be inferred.

따라서 이 경우 현재 부호화 단위가 주변 데이터 단위를 참조하여 예측하기 경우, 현재 부호화 단위에 인접하는 심도별 부호화 단위 내의 최소 부호화 단위의 부호화 정보가 직접 이용됨으로써 최소 부호화 단위의 데이터가 참조될 수 있다.In this case, when the current encoding unit is predicted with reference to the neighboring data unit, the encoding information of the minimum encoding unit in the depth encoding unit adjacent to the current encoding unit is directly used, so that the data of the minimum encoding unit can be referred to.

또 다른 실시예로, 심도별 부호화 단위의 부호화 정보가 심도별 부호화 단위 내 중 대표되는 최소 부호화 단위에 대해서만 저장되어 있을 수 있다. 이 경우 현재 부호화 단위가 주변 부호화 단위를 참조하여 예측되는 경우, 인접하는 심도별 부호화 단위의 부호화 정보를 이용하여, 심도별 부호화 단위 내에서 현재 부호화 단위에 인접하는 데이터가 검색됨으로써 참조될 수도 있다.
In yet another embodiment, the encoding information of the depth encoding unit may be stored only for the minimum encoding unit represented in the depth encoding unit. In this case, when the current encoding unit is predicted by referring to the surrounding encoding unit, the data adjacent to the current encoding unit in the depth encoding unit may be retrieved using the encoding information of the adjacent depth encoding unit.

도 21 는 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 부호화 방법의 흐름도를 도시한다.FIG. 21 shows a flowchart of a video encoding method for pixel value compensation after loop filtering based on hierarchical data units for each region according to an embodiment of the present invention.

단계 2110에서, 현재 픽처는 적어도 하나의 최대 부호화 단위로 분할되고, 심도마다 최대 부호화 단위의 영역이 분할된 적어도 하나의 분할 영역시 부호화되어, 적어도 하나의 분할 영역 별로 최종 부호화 결과가 출력될 심도인 부호화 심도가 결정된다. 또한, 심도별 부호화 단위마다, 부호화 심도 또는 분할 횟수, 부호화 심도의 파티션 타입, 예측 모드 및 변환 단위 크기 등의 부호화 모드가 결정된다.In step 2110, the current picture is divided into at least one maximum coding unit, and the coding unit is coded in at least one divided area in which the area of the maximum coding unit is divided for each depth, The coding depth is determined. In addition, the coding modes such as the coding depth or the number of times of division, the partition type of the coding depth, the prediction mode, and the size of the conversion unit are determined for each depth-by-depth coding unit.

가능한 총 분할 횟수를 나타내는 최대 심도가 미리 설정될 수도 있다. 최대 부호화 단위가 단계별로 분할되며 심도가 깊어질 때마다, 하위 심도별 부호화 단위들마다 반복적으로 부호화가 수행되어야 한다. 부호화 단위의 최소 부호화 오차를 발생시키는 부호화 심도가 결정되기 위해서는, 모든 심도별 부호화 단위마다 부호화 오차가 측정되어 비교되어야 한다. The maximum depth indicating the possible total number of divisions may be set in advance. The maximum encoding unit is divided into stages, and each time the depth is deepened, it is necessary to repeatedly perform encoding for each lower-depth encoding unit. In order to determine the coding depth that causes the minimum coding error of the coding unit, the coding error should be measured and compared for each coding unit of each depth.

단계 2120에서, 부호화된 영상 데이터가 부호화 심도 및 부호화 모드에 기초하여 복호화되고, 복호화된 영상 데이터에 대해 루프 필터링이 수행되어 복원 영상이 생성된다. 일 실시예에 따라, 복호화된 영상 데이터 또는 디블로킹된 영상 데이터에 대해 한 번 이상의 1차원 필터링을 연속적으로 수행하는 적응적 루프 필터링이 수행됨으로써 복원 영상이 생성될 수 있다.In step 2120, the encoded image data is decoded based on the encoding depth and encoding mode, and the decoded image data is subjected to loop filtering to generate a reconstructed image. According to one embodiment, a reconstructed image may be generated by performing adaptive loop filtering that performs one or more one-dimensional filtering operations on the decoded image data or deblocked image data one after another.

단계 2130에서, 복원 영상 중 소정 그룹의 복원 픽셀들에 대하여, 각각의 복원 픽셀 및 원본 픽셀 간의 오차에 대한 보상값 및 보상 대상인 픽셀을 포함하는 픽셀 그룹이 결정된다. 픽셀값 보상 대상인 복원 픽셀들을 포함하는 픽셀 그룹은, 픽셀값의 극값 레벨, 픽셀값 대역 또는 라인의 구성 여부에 따라 결정될 수 있다. 픽셀 그룹별 보상값은, 해당 복원 픽셀들 및 각각의 대응되는 원본 픽셀들 간의 오차의 평균값에 기초하여 결정될 수 있다.In step 2130, for the restored pixels of the predetermined group among the restored images, a group of pixels including the compensation value for the error between each restored pixel and the original pixel and the pixel to be compensated is determined. The pixel group including the restored pixels to be compensated for the pixel value may be determined according to the extreme level of the pixel value, the pixel value band, or whether the line is composed. The compensation value for each pixel group can be determined based on an average value of the errors between the corresponding restored pixels and respective corresponding original pixels.

단계 2140에서, 최대 부호화 단위마다 적어도 하나의 분할 영역 별 최종 부호화 결과인 영상 데이터와, 부호화 심도 및 부호화 모드에 관한 정보, 루프 필터링 계수 정보 및 보상값 관련 정보가 출력된다. 부호화 모드에 관한 정보는 부호화 심도에 관한 정보 또는 분할 정보, 부호화 심도의 파티션 타입 정보, 예측 모드 정보 및 변환 단위 크기 정보 등을 포함할 수 있다. In step 2140, video data as a final encoding result for each of at least one divided area, information on the coding depth and encoding mode, loop filtering coefficient information, and compensation value related information are outputted for each maximum encoding unit. The information on the encoding mode may include information on the encoding depth or division information, partition type information of the encoding depth, prediction mode information, and conversion unit size information.

영역별 계층적 데이터 단위에 기반하여 비디오 부호화 방식에 의해 부호화된 부호화 모드에 관한 정보, 부호화된 비디오 데이터, 루프 필터링 계수 정보와 함께, 복원 영상 및 원본 영상 간의 픽셀 그룹별 보상값 관련 정보가 부호화되어, 복호화단으로 송신될 수 있다.The compensation value-related information for each pixel group between the restored image and the original image is coded together with the information on the encoding mode, the encoded video data, and the loop filtering coefficient information encoded by the video encoding method based on the hierarchical data unit for each region , And can be transmitted to the decoding end.

도 22 은 본 발명의 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 루프 필터링 후 픽셀값 보상을 위한 비디오 복호화 방법의 흐름도를 도시한다.FIG. 22 shows a flowchart of a video decoding method for pixel value compensation after loop filtering based on hierarchical data units for each region according to an embodiment of the present invention.

단계 2210에서, 영역별 계층적 데이터 단위에 기반하여 비디오 부호화 방식에 의해 부호화된 비디오에 대한 비트스트림이 수신되어 파싱되고, 파싱된 비트스트림으로부터 최대 크기의 최대 부호화 단위에 할당되는 현재 픽처의 영상 데이터, 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보, 루프 필터링 계수 정보 및 보상값 관련 정보 등이 추출된다. In step 2210, a bitstream for video encoded by the video encoding method is received and parsed based on the hierarchical data unit for each region, and the image data of the current picture allocated to the maximum encoding unit of the maximum size from the parsed bitstream Information on coding depth and coding mode for each coding unit, loop filtering coefficient information, and compensation value related information are extracted.

최대 부호화 단위별 부호화 심도는, 현재 픽처의 부호화 과정에서 최대 부호화 단위별로 부호화 오차가 가장 적은 심도로 선택된 심도이다. 최대 부호화 단위별 부호화는, 최대 부호화 단위를 심도별로 계층적으로 분할한 적어도 하나의 데이터 단위에 기반하여 영상 데이터가 부호화된 것이다. 따라서, 부호화 단위별 부호화 심도를 파악한 후 각각의 영상 데이터를 복호화함으로써 영상의 부복호화의 효율성이 향상될 수 있다.The coding depth for each maximum coding unit is the depth selected with the smallest coding error for each maximum coding unit in the process of coding the current picture. The encoding of the maximum encoding unit is the image data encoded based on at least one data unit obtained by dividing the maximum encoding unit hierarchically by depth. Accordingly, the decoding efficiency of the image can be improved by decoding each image data after grasping the coding depth for each coding unit.

단계 2220에서, 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보에 기초하여 각각의 최대 부호화 단위의 영상 데이터가 복호화되고, 복호화된 영상 데이터에 대해 루프 필터링이 수행되어 복원 영상이 생성된다. 복호화된 영상 데이터 또는 디블로킹된 영상 데이터에 대해 일 실시예에 따라 한 번 이상의 1차원 필터링이 연속적으로 수행되는 적응적 루프 플터링이 수행됨으로써 복원 영상이 생성될 수 있다.In step 2220, the image data of each maximum encoding unit is decoded based on the information on the encoding depth and the encoding mode for each maximum encoding unit, and the decoded image data is subjected to loop filtering to generate a reconstructed image. The reconstructed image can be generated by performing adaptive loop filtering on the decoded image data or deblocked image data, in which one or more one-dimensional filtering is continuously performed according to an embodiment.

단계 2230에서, 복원 영상의 복원 픽셀들 중, 보상값을 이용하여 보상할 복원 픽셀을 포함하는 픽셀 그룹이 결정된다. 추출된 보상값 관련 정보에 기초하여, 픽셀 그룹 결정 방식에 따라, 복원 픽셀의 픽셀값의 극값 레벨, 픽셀값 대역 또는 라인의 구성 여부에 따라, 보상값을 이용하여 픽셀값이 보상될 복원 픽셀들을 포함하는 픽셀 그룹이 결정될 수 있다. In step 2230, among the restored pixels of the restored image, a group of pixels including the restored pixel to be compensated by using the compensation value is determined. Based on the extracted compensation value related information, in accordance with the pixel group determination method, according to the extreme value level of the pixel value of the restored pixel, the pixel value band, or the configuration of the line, The group of pixels including the pixel can be determined.

단계 2240에서, 결정된 픽셀 그룹의 복원 픽셀에 대해, 보상값을 이용하여 복원 픽셀 및 원본 픽셀 간의 오차가 보상되어, 오차가 보상된 복원 영상이 출력될 수 있다. In step 2240, for the restored pixel of the determined pixel group, the error between the restored pixel and the original pixel is compensated using the compensation value, and the restored image with the error compensated can be output.

일 실시예에 따른 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 픽셀값 보상을 위한 비디오 부호화 방법 또는 일 실시예에 따른 영역별 계층적 데이터 단위에 기반하여 픽셀값 보상을 위한 비디오 복호화 방법에 따르면, 복원 영상의 시스템적 오차가 보상됨으로써 복원 영상의 화질이 개선될 수 있으며, 픽셀 그룹별 보상값 정보만이 부호화되어 송수되므로, 픽셀값 보상 대상인 픽셀의 위치에 대한 정보까지 송수신될 필요가 없으므로, 복원 영상의 화질 개선을 위한 부가 정보의 전송 비트레이트가 절감될 수 있다.A video encoding method for compensating a pixel value based on a hierarchical data unit for each region according to an embodiment and a video decoding method for compensating a pixel value based on a hierarchical data unit for each region according to an embodiment The systematic error of the reconstructed image is compensated to improve the image quality of the reconstructed image and only the compensation value information per pixel group is coded and transmitted so that it is necessary to transmit and receive information on the position of the pixel to be compensated for the pixel value The transmission bit rate of the additional information for improving the image quality of the reconstructed image can be reduced.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등) 및 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등)와 같은 저장매체를 포함한다.The above-described embodiments of the present invention can be embodied in a general-purpose digital computer that can be embodied as a program that can be executed by a computer and operates the program using a computer-readable recording medium. The computer-readable recording medium includes a storage medium such as a magnetic storage medium (e.g., ROM, floppy disk, hard disk, etc.) and an optical reading medium (e.g., CD-ROM, DVD, etc.).

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The present invention has been described with reference to the preferred embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

Claims (4)

픽셀값 보상을 위한 타입 정보를 비트스트림으로부터 획득하는 단계;
상기 타입 정보가 제1 타입 및 제2 타입 중 적어도 하나를 나타낼 때, 상기 비트스트림으로부터 복수 개의 오프셋들을 획득하는 단계;
상기 타입 정보가 상기 제1 타입을 나타낼 때, 현재 블록의 픽셀들 중, 하나의 픽셀값 대역에 대응하는 하나의 픽셀에, 상기 복수 개의 오프셋들 중 하나를 적용하는 단계; 및
상기 타입 정보가 상기 제2 타입을 나타낼 때, 상기 현재 블록의 픽셀들 중, 하나의 레벨에 대응하는 하나의 픽셀에, 상기 복수 개의 오프셋들 중 하나를 적용하는 단계를 포함하고,
상기 픽셀값 대역은 복수 개의 픽셀값 대역들 중 하나이고,
상기 레벨은 복수 개의 레벨들 중 하나이고, 상기 레벨은 상기 픽셀의 샘플값과 상기 픽셀의 이웃 픽셀들의 샘플값들의 크기를 비교하여 결정되고,
상기 타입 정보가 상기 제1 타입을 나타낼 때, 상기 복수 개의 오프셋들은 상기 복수 개의 픽셀값 대역들에 대응하고,
상기 타입 정보가 상기 제2 타입을 나타낼 때, 상기 복수 개의 오프셋들은 상기 복수 개의 레벨들에 대응하는 것을 특징으로 하는 비디오 복호화 방법.
Obtaining type information for pixel value compensation from a bitstream;
Obtaining a plurality of offsets from the bitstream when the type information indicates at least one of a first type and a second type;
Applying one of the plurality of offsets to one pixel of the pixels of the current block corresponding to one pixel value band when the type information indicates the first type; And
Applying one of the plurality of offsets to a pixel corresponding to one level of pixels of the current block when the type information indicates the second type,
Wherein the pixel value band is one of a plurality of pixel value bands,
Wherein said level is one of a plurality of levels, said level being determined by comparing a magnitude of sample values of said pixel with neighboring pixels of said pixel,
When the type information indicates the first type, the plurality of offsets correspond to the plurality of pixel value bands,
And when the type information indicates the second type, the plurality of offsets correspond to the plurality of levels.
삭제delete 삭제delete 픽셀값 보상을 위한 타입 정보를 비트스트림으로부터 획득하고, 상기 타입 정보가 제1 타입 및 제2 타입 중 적어도 하나를 나타낼 때, 상기 비트스트림으로부터 복수 개의 오프셋들을 획득하는 프로세서; 및
현재 블록의 픽셀들에 상기 복수 개의 오프셋들을 적용하는 보상부를 포함하고,
상기 타입 정보가 상기 제1 타입을 나타낼 때, 상기 보상부는, 상기 현재 블록의 픽셀들 중, 하나의 픽셀값 대역에 대응하는 하나의 픽셀에, 상기 복수 개의 오프셋들 중 하나를 적용하고,
상기 타입 정보가 상기 제2 타입을 나타낼 때, 상기 보상부는, 상기 현재 블록의 픽셀들 중, 하나의 레벨에 대응하는 하나의 픽셀에, 상기 복수 개의 오프셋들 중 하나를 적용하고,
상기 픽셀값 대역은 복수 개의 픽셀값 대역들 중 하나이고,
상기 레벨은 복수 개의 레벨들 중 하나이고, 상기 레벨은 상기 픽셀의 샘플값과 상기 픽셀의 이웃 픽셀들의 샘플값들의 크기를 비교하여 결정되고,
상기 타입 정보가 상기 제1 타입을 나타낼 때, 상기 복수 개의 오프셋들은 상기 복수 개의 픽셀값 대역들에 대응하고,
상기 타입 정보가 상기 제2 타입을 나타낼 때, 상기 복수 개의 오프셋들은 상기 복수 개의 레벨들에 대응하는 것을 특징으로 하는 비디오 복호화 장치.
A processor for obtaining type information for pixel value compensation from a bitstream and obtaining a plurality of offsets from the bitstream when the type information indicates at least one of a first type and a second type; And
And a compensator for applying the plurality of offsets to pixels of a current block,
When the type information indicates the first type, the compensation unit applies one of the plurality of offsets to one pixel corresponding to one pixel value band among the pixels of the current block,
When the type information indicates the second type, the compensation unit applies one of the plurality of offsets to one pixel corresponding to one level among the pixels of the current block,
Wherein the pixel value band is one of a plurality of pixel value bands,
Wherein said level is one of a plurality of levels, said level being determined by comparing a magnitude of sample values of said pixel with neighboring pixels of said pixel,
When the type information indicates the first type, the plurality of offsets correspond to the plurality of pixel value bands,
And when the type information indicates the second type, the plurality of offsets correspond to the plurality of levels.
KR1020150034527A 2015-03-12 2015-03-12 Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same KR101626449B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150034527A KR101626449B1 (en) 2015-03-12 2015-03-12 Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150034527A KR101626449B1 (en) 2015-03-12 2015-03-12 Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020140148746A Division KR101627193B1 (en) 2014-10-29 2014-10-29 Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same

Publications (2)

Publication Number Publication Date
KR20150035942A KR20150035942A (en) 2015-04-07
KR101626449B1 true KR101626449B1 (en) 2016-06-01

Family

ID=53032910

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150034527A KR101626449B1 (en) 2015-03-12 2015-03-12 Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same

Country Status (1)

Country Link
KR (1) KR101626449B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009089032A2 (en) 2008-01-10 2009-07-16 Thomson Licensing Methods and apparatus for illumination compensation of intra-predicted video

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100716998B1 (en) * 2005-05-24 2007-05-10 삼성전자주식회사 Encoder and Decoder for reducing blocking phenomenon, method therefor, and recording medium storing A program to implement thereof
JP5513740B2 (en) * 2006-03-27 2014-06-04 パナソニック株式会社 Image decoding apparatus, image encoding apparatus, image decoding method, image encoding method, program, and integrated circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009089032A2 (en) 2008-01-10 2009-07-16 Thomson Licensing Methods and apparatus for illumination compensation of intra-predicted video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
K. McCann, et al. Samsung’s Response to the Call for Proposals on Video Compression Technology. JCT-VC of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11. 1st Meeting. JCTVC-A124, Apr. 15-23, 2010, pp.1-42

Also Published As

Publication number Publication date
KR20150035942A (en) 2015-04-07

Similar Documents

Publication Publication Date Title
KR101529992B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR102487618B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR101855293B1 (en) Method and apparatus for video intra prediction encoding, and method and apparatus for video intra prediction decoding
KR101701342B1 (en) Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
KR20180061027A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20130085393A (en) Method and apparatus for encoding video with restricting bi-directional prediction and block merging, method and apparatus for decoding video
KR20150018239A (en) Method and apparatus for determining merge mode
KR101626450B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR20140089488A (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101927970B1 (en) Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
KR101974138B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR101839573B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR101731432B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR101626449B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR101603693B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR101603695B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR101627193B1 (en) Method and apparatus for video encoding for compensating pixel value of pixel group, method and apparatus for video decoding for the same
KR101926017B1 (en) Method and apparatus for video encoding and decoding dependent on hierarchical structure of coding unit
KR101882950B1 (en) Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
KR101780026B1 (en) Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
KR101824058B1 (en) Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
KR101727065B1 (en) Method and apparatus for video encoding considering adaptive loop filtering, and method and apparatus for video decoding considering adaptive loop filtering
KR20150060614A (en) Method and apparatus for video encoding and decoding dependent on hierarchical structure of coding unit
KR101662743B1 (en) Method and apparatus for video encoding and decoding dependent on hierarchical structure of coding unit
KR101538920B1 (en) Method and apparatus for video encoding and decoding dependent on hierarchical structure of coding unit

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
A302 Request for accelerated examination
E902 Notification of reason for refusal
E90F Notification of reason for final refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant