KR20180000886A - Method and apparatus for processing a video signal - Google Patents

Method and apparatus for processing a video signal Download PDF

Info

Publication number
KR20180000886A
KR20180000886A KR1020160079137A KR20160079137A KR20180000886A KR 20180000886 A KR20180000886 A KR 20180000886A KR 1020160079137 A KR1020160079137 A KR 1020160079137A KR 20160079137 A KR20160079137 A KR 20160079137A KR 20180000886 A KR20180000886 A KR 20180000886A
Authority
KR
South Korea
Prior art keywords
corner
pixel
outlier
value
corner outlier
Prior art date
Application number
KR1020160079137A
Other languages
Korean (ko)
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 KR1020160079137A priority Critical patent/KR20180000886A/en
Priority to CN202311027861.4A priority patent/CN116781902A/en
Priority to CN201780039316.3A priority patent/CN109479131B/en
Priority to PCT/KR2017/006634 priority patent/WO2017222331A1/en
Priority to CN202311031996.8A priority patent/CN116828178A/en
Priority to CN202311031020.0A priority patent/CN116828177A/en
Priority to US16/312,677 priority patent/US20190327476A1/en
Priority to CN202311028575.XA priority patent/CN116781903A/en
Publication of KR20180000886A publication Critical patent/KR20180000886A/en
Priority to US17/070,956 priority patent/US20210058646A1/en
Priority to US17/716,301 priority patent/US20220272390A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • 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

Abstract

The present invention provides a method and a device for processing a video signal, which effectively detect a noise generated at a corner of a block included in a video signal decoded in a block unit and effectively compensate (filter) the detected noise. The method for processing a video signal according to the present invention comprises the following steps of: selecting one corner pixel from four corner pixels adjacent to an intersecting point as a corner outlier when corners of four blocks included in the video signal decoded in the block unit are adjacent to each other at the one intersecting point; and filtering the selected corner outlier. The corner outlier selection uses a difference value between pixel values of the four corner pixels adjacent to the intersecting point and a predetermined threshold value.

Description

비디오 신호 처리 방법 및 장치{METHOD AND APPARATUS FOR PROCESSING A VIDEO SIGNAL}TECHNICAL FIELD [0001] The present invention relates to a video signal processing method and apparatus,

본 발명은 비디오 신호 처리 방법 및 장치에 관한 것이다.The present invention relates to a video signal processing method and apparatus.

최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.Recently, the demand for high resolution and high quality images such as high definition (HD) image and ultra high definition (UHD) image is increasing in various applications. As the image data has high resolution and high quality, the amount of data increases relative to the existing image data. Therefore, when the image data is transmitted using a medium such as a wired / wireless broadband line or stored using an existing storage medium, The storage cost is increased. High-efficiency image compression techniques can be utilized to solve such problems as image data becomes high-resolution and high-quality.

영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.An inter picture prediction technique for predicting a pixel value included in a current picture from a previous or a subsequent picture of a current picture by an image compression technique, an intra picture prediction technique for predicting a pixel value included in a current picture using pixel information in the current picture, There are various techniques such as an entropy encoding technique in which a short code is assigned to a value having a high appearance frequency and a long code is assigned to a value having a low appearance frequency. Image data can be effectively compressed and transmitted or stored using such an image compression technique.

한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.On the other hand, demand for high-resolution images is increasing, and demand for stereoscopic image content as a new image service is also increasing. Video compression techniques are being discussed to effectively provide high resolution and ultra-high resolution stereoscopic content.

본 발명은 블록 단위로 복호화된 비디오 신호에 포함되는 블록의 코너에 발생하는 노이즈를 효과적으로 검출하고, 검출된 노이즈를 효과적으로 보상(필터링)하는 비디오 신호 처리 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a video signal processing method and apparatus for effectively detecting noise occurring at a corner of a block included in a video signal decoded on a block-by-block basis, and effectively compensating (filtering) the detected noise.

본 발명에 따른 비디오 신호 처리 방법은, 블록 단위로 복호화된 비디오 신호에 포함되는 4개의 블록들의 코너가 하나의 교차점에서 서로 인접할 때, 상기 교차점에 인접하는 4개의 코너 픽셀들 중, 하나의 코너 픽셀을 코너 아웃라이어(Corner outlier)로서 선택하고, 상기 코너 아웃라이어를 필터링하며, 상기 코너 아웃라이어 선택은, 상기 교차점에 인접하는 4개의 코너 픽셀들의 픽셀값들 사이의 차이값과 제1 문턱값을 이용하는 것을 특징으로 한다.A video signal processing method according to the present invention is characterized in that when four corners of blocks included in a video signal decoded on a block basis are adjacent to each other at one intersection point among four corner pixels adjacent to the intersection, Selecting a pixel as a corner outlier and filtering the corner outlier, wherein the corner outlier selection is based on a difference between pixel values of four corner pixels adjacent to the intersection and a first threshold Is used.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 제1 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 한다.In the video signal processing method according to the present invention, the first threshold value is determined based on the quantization parameter of the four blocks.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 선택된 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어와의 유사도를 더 판단하고, 상기 필터링은, 상기 유사도 판단에 기초하여 수행되는 것을 특징으로 한다.In the video signal processing method according to the present invention, the similarity degree between the corner outlier and the pixel included in the same block as the selected corner outlier and adjacent to the corner outlier is further determined, Is carried out on the basis of the following equation.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 유사도 판단은, 상기 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어의 픽셀값들 사이의 차이값과 제2 문턱값을 이용하는 것을 특징으로 한다.In the video signal processing method according to the present invention, it is preferable that the similarity determination is performed based on a difference between the pixel values of the pixels included in the same block as the corner outlier and adjacent to the corner outlier, The threshold value is used.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 제2 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 한다.In the video signal processing method according to the present invention, the second threshold value is determined based on a quantization parameter of the four blocks.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 선택된 코너 아웃라이어에 인접하는 블록 경계가 이미지 영역의 에지인지 여부를 더 판단하고, 상기 필터링은, 상기 블록 경계가 이미지 영역의 에지인지 여부의 판단에 기초하여 수행되는 것을 특징으로 한다.In the video signal processing method according to the present invention, it is further determined whether or not the block boundary adjacent to the selected corner outlier is an edge of the image area, and the filtering is performed on the basis of the determination whether the block boundary is an edge of the image area Is carried out on the basis of the following formula.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 블록 경계가 이미지 영역의 에지인지 여부의 판단은, 상기 코너 아웃라이어에 인접한 블록내의 픽셀들로서, 상기 블록 경계에 인접하는 픽셀들의 픽셀값들 사이의 변화량과 제3 문턱값을 이용하는 제1 에지 판단을 포함하는 것을 특징으로 한다.In the method of processing a video signal according to the present invention, the determination as to whether the block boundary is an edge of an image area may comprise: determining, as pixels in a block adjacent to the corner outlier, And a first edge determination using a third threshold value.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 제3 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 한다.In the video signal processing method according to the present invention, the third threshold value is determined based on a quantization parameter of the four blocks.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 블록 경계가 이미지 영역의 에지인지 여부의 판단은, 상기 코너 아웃라이어에 수평 또는 수직으로 인접한 코너 픽셀과 상기 코너 아웃라이어의 픽셀값들 사이의 차이값과 제4 문턱값을 이용하는 제2 에지 판단을 더 포함하는 것을 특징으로 한다.In the video signal processing method according to the present invention, it is preferable that the determination of whether or not the block boundary is an edge of the image area includes: determining a difference value between corner pixels vertically adjacent to the corner outlier and pixel values of the corner outlier And a second edge determination using a fourth threshold value.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 제4 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 한다.In the video signal processing method according to the present invention, the fourth threshold value is determined based on a quantization parameter of the four blocks.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 필터링은, 상기 교차점에 인접하는 4개의 코너 픽셀들의 가중 평균값을 상기 코너 아웃라이어의 필터링된 픽셀값으로 설정하는 것을 특징으로 한다.In the video signal processing method according to the present invention, the filtering is performed by setting a weighted average value of four corner pixels adjacent to the intersection point as a filtered pixel value of the corner outlier.

본 발명에 따른 비디오 신호 처리 방법에 있어서, 상기 필터링은, 상기 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀에 대한 필터링을 포함하는 것을 특징으로 한다.In the video signal processing method according to the present invention, the filtering includes filtering for pixels included in the same block as the corner outlier and adjacent to the corner outlier.

본 발명에 따른 비디오 신호 처리 장치는, 블록 단위로 복호화된 비디오 신호에 포함되는 4개의 블록들의 코너가 하나의 교차점에서 서로 인접할 때, 상기 교차점에 인접하는 4개의 코너 픽셀들 중, 하나의 코너 픽셀을 코너 아웃라이어(Corner outlier)로서 선택하고, 상기 코너 아웃라이어를 필터링하는 코너 아웃라이어 필터를 포함하며, 상기 코너 아웃라이어의 선택은, 상기 교차점에 인접하는 4개의 코너 픽셀들의 픽셀값들 사이의 차이값과 제1 문턱값을 이용하는 것을 특징으로 한다.When a corner of four blocks included in a video signal decoded in a block unit is adjacent to each other at one intersection point, among the four corner pixels adjacent to the intersection point, A corner outlier filter for selecting a pixel as a corner outlier and filtering the corner outlier, wherein the selection of the corner outlier is performed between pixel values of four corner pixels adjacent to the intersection And the first threshold value is used.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 제1 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 한다.In the video signal processing apparatus according to the present invention, the first threshold value is determined based on the quantization parameter of the four blocks.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 코너 아웃라이어 필터는, 상기 선택된 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어와의 유사도를 더 판단하고, 상기 필터링은, 상기 유사도 판단에 기초하여 수행되는 것을 특징으로 한다.The corner outlier filter further determines the similarity between the corner outlier and a pixel included in the same block as the selected corner outlier and adjacent to the corner outlier, And the filtering is performed based on the similarity determination.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 유사도 판단은, 상기 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어의 픽셀값들 사이의 차이값과 제2 문턱값을 이용하는 것을 특징으로 한다.In the video signal processing apparatus according to the present invention, it is preferable that the degree of similarity determination is performed based on a difference between pixel values of a pixel included in the same block as the corner outlier and adjacent to the corner outlier and pixel values of the corner outlier, The threshold value is used.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 제2 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 한다.In the video signal processing apparatus according to the present invention, the second threshold value is determined based on the quantization parameter of the four blocks.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 코너 아웃라이어 필터는, 상기 선택된 코너 아웃라이어에 인접하는 블록 경계가 이미지 영역의 에지인지 여부를 더 판단하고, 상기 필터링은, 상기 블록 경계가 이미지 영역의 에지인지 여부의 판단에 기초하여 수행되는 것을 특징으로 한다.In the video signal processing apparatus according to the present invention, the corner outlier filter further determines whether a block boundary adjacent to the selected corner outlier is an edge of an image area, Is determined based on a determination as to whether or not the edge of the image is an edge.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 블록 경계가 이미지 영역의 에지인지 여부의 판단은, 상기 코너 아웃라이어에 인접한 블록내의 픽셀들로서, 상기 블록 경계에 인접하는 픽셀들의 픽셀값들 사이의 변화량과 제3 문턱값을 이용하는 제1 에지 판단을 포함하는 것을 특징으로 한다.The determination as to whether or not the block boundary is an edge of an image area may be made by determining a change amount between pixel values of pixels adjacent to the block boundary as pixels in a block adjacent to the corner outlier, And a first edge determination using a third threshold value.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 제3 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 한다.In the video signal processing apparatus according to the present invention, the third threshold value is determined based on the quantization parameter of the four blocks.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 블록 경계가 이미지 영역의 에지인지 여부의 판단은, 상기 코너 아웃라이어에 수평 또는 수직으로 인접한 코너 픽셀과 상기 코너 아웃라이어의 픽셀값들 사이의 차이값과 제4 문턱값을 이용하는 제2 에지 판단을 더 포함하는 것을 특징으로 한다.In the video signal processing apparatus according to the present invention, it is preferable that the determination as to whether or not the block boundary is an edge of an image area includes: determining whether a difference between a corner pixel horizontally or vertically adjacent to the corner outlier and pixel values of the corner outlier And a second edge determination using a fourth threshold value.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 제4 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 한다.In the video signal processing apparatus according to the present invention, the fourth threshold value is determined based on the quantization parameter of the four blocks.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 필터링은, 상기 교차점에 인접하는 4개의 코너 픽셀들의 가중 평균값을 상기 코너 아웃라이어의 필터링된 픽셀값으로 설정하는 것을 특징으로 한다.In the video signal processing apparatus according to the present invention, the filtering is performed by setting a weighted average value of four corner pixels adjacent to the intersection as the filtered pixel value of the corner outlier.

본 발명에 따른 비디오 신호 처리 장치에 있어서, 상기 필터링은, 상기 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀에 대한 필터링을 포함하는 것을 특징으로 한다.The video signal processing apparatus according to the present invention is characterized in that the filtering includes filtering for pixels included in the same block as the corner outlier and adjacent to the corner outlier.

본 발명에 의하면, 블록 단위로 복호화된 비디오 신호에 포함되는 블록의 코너에 발생하는 노이즈를 효과적으로 검출할 수 있다.According to the present invention, it is possible to effectively detect noise occurring at corners of blocks included in a video signal decoded in block units.

본 발명에 의하면, 블록 단위로 복호화된 비디오 신호의 블록의 코너에 발생하는 노이즈를 효과적으로 보상할 수 있다. According to the present invention, it is possible to effectively compensate for noise occurring at corners of a block of a video signal decoded in block units.

본 발명에 의하면, 부호화/복호화 처리의 단위인 블록의 코너에 발생하는 노이즈를 효과적으로 검출 및 보상함으로써, 해당 블록이 화면 간 예측 및/또는 화면 내 예측의 레퍼런스로서 사용되어, 다른 블록이나 다른 픽쳐로 노이즈가 전파되는 것을 방지할 수 있다.According to the present invention, by effectively detecting and compensating for the noise occurring at the corner of a block which is a unit of encoding / decoding processing, the block is used as a reference of inter-picture prediction and / or intra-picture prediction, It is possible to prevent the noise from propagating.

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 3(a)는 본 발명의 일실시예에 따른 코너 아웃라이어 필터의 필터링 대상이 되는 코너 아웃라이어를 설명하기 위한 도면이다.
도 3(b)는 도 3(a)의 교차점을 중심으로 하는 2x2 영역의 픽셀들의 픽셀값을 예시적으로 나타낸 도면이다.
도 3(c)는 코너 아웃라이어를 검출하고 필터링하기 위해 사용되는 픽셀들의 위치를 지시하기 위한 인덱스를 표시한 도면이다.
도 4는 본 발명의 일실시예에 따른 코너 아웃라이어 필터의 동작을 설명하기 위한 순서도이다.
1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
3 (a) is a view for explaining a corner outlier to be filtered by a corner outlier filter according to an embodiment of the present invention.
3 (b) is a diagram illustrating pixel values of pixels of a 2x2 region centered on the intersection of FIG. 3 (a).
FIG. 3 (c) is a diagram showing an index for indicating the position of pixels used for detecting and filtering a corner outlier.
4 is a flowchart illustrating an operation of a corner outlier filter according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.The terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used for the same constituent elements in the drawings, and redundant explanations for the same constituent elements will be omitted.

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

도 1을 참조하면, 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.1, the image encoding apparatus 100 includes a picture division unit 110, prediction units 120 and 125, a transform unit 130, a quantization unit 135, a reordering unit 160, an entropy encoding unit An inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155. [

도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Each of the components shown in FIG. 1 is shown independently to represent different characteristic functions in the image encoding apparatus, and does not mean that each component is composed of separate hardware or one software configuration unit. That is, each constituent unit is included in each constituent unit for convenience of explanation, and at least two constituent units of the constituent units may be combined to form one constituent unit, or one constituent unit may be divided into a plurality of constituent units to perform a function. The integrated embodiments and separate embodiments of the components are also included within the scope of the present invention, unless they depart from the essence of the present invention.

또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.In addition, some of the components are not essential components to perform essential functions in the present invention, but may be optional components only to improve performance. The present invention can be implemented only with components essential for realizing the essence of the present invention, except for the components used for the performance improvement, and can be implemented by only including the essential components except the optional components used for performance improvement Are also included in the scope of the present invention.

픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(110)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다.The picture division unit 110 may divide the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The picture division unit 110 divides one picture into a plurality of coding units, a prediction unit, and a combination of conversion units, and generates a coding unit, a prediction unit, and a conversion unit combination So that the picture can be encoded.

예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.For example, one picture may be divided into a plurality of coding units. In order to divide a coding unit in a picture, a recursive tree structure such as a quad tree structure can be used. In a coding or decoding scheme in which one picture or a largest coding unit is used as a root and divided into other coding units A unit can be divided with as many child nodes as the number of divided coding units. Under certain constraints, an encoding unit that is no longer segmented becomes a leaf node. That is, when it is assumed that only one square division is possible for one coding unit, one coding unit can be divided into a maximum of four different coding units.

이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.Hereinafter, in the embodiment of the present invention, a coding unit may be used as a unit for performing coding, or may be used as a unit for performing decoding.

예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.The prediction unit may be one divided into at least one square or rectangular shape having the same size in one coding unit, and one of the prediction units in one coding unit may be divided into another prediction Or may have a shape and / or size different from the unit.

부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN 으로 분할하지 않고 인트라 예측을 수행할 수 있다.If a prediction unit performing intra prediction on the basis of an encoding unit is not the minimum encoding unit at the time of generation, intraprediction can be performed without dividing the prediction unit into a plurality of prediction units NxN.

예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The prediction units 120 and 125 may include an inter prediction unit 120 for performing inter prediction and an intra prediction unit 125 for performing intra prediction. It is possible to determine whether to use inter prediction or intra prediction for a prediction unit and to determine concrete information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit in which the prediction is performed may be different from the processing unit in which the prediction method and the concrete contents are determined. For example, the method of prediction, the prediction mode and the like are determined as a prediction unit, and the execution of the prediction may be performed in a conversion unit. The residual value (residual block) between the generated prediction block and the original block can be input to the conversion unit 130. [ In addition, the prediction mode information, motion vector information, and the like used for prediction can be encoded by the entropy encoding unit 165 together with the residual value and transmitted to the decoder. When a particular encoding mode is used, it is also possible to directly encode the original block and transmit it to the decoding unit without generating a prediction block through the prediction units 120 and 125.

인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. The inter-prediction unit 120 may predict a prediction unit based on information of at least one of a previous picture or a following picture of the current picture, and may predict a prediction unit based on information of a partially- Unit may be predicted. The inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.In the reference picture interpolating section, the reference picture information is supplied from the memory 155 and pixel information of an integer pixel or less can be generated in the reference picture. In the case of a luminance pixel, a DCT-based interpolation filter having a different filter coefficient may be used to generate pixel information of an integer number of pixels or less in units of quarter pixels. In the case of a color difference signal, a DCT-based 4-tap interpolation filter having a different filter coefficient may be used to generate pixel information of an integer number of pixels or less in units of 1/8 pixel.

모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolating unit. Various methods such as Full Search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) can be used as methods for calculating motion vectors. The motion vector may have a motion vector value of 1/2 or 1/4 pixel unit based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by making the motion prediction method different. Various methods such as a skip method, a merge method, an AMVP (Advanced Motion Vector Prediction) method, and an Intra Block Copy method can be used as the motion prediction method.

인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit 125 can generate a prediction unit based on reference pixel information around the current block which is pixel information in the current picture. In the case where the neighboring block of the current prediction unit is the block in which the inter prediction is performed so that the reference pixel is the pixel performing the inter prediction, the reference pixel included in the block in which the inter prediction is performed is referred to as the reference pixel Information. That is, when the reference pixel is not available, the reference pixel information that is not available may be replaced by at least one reference pixel among the available reference pixels.

인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, the prediction mode may have a directional prediction mode in which reference pixel information is used according to a prediction direction, and a non-directional mode in which direction information is not used in prediction. The mode for predicting the luminance information may be different from the mode for predicting the chrominance information and the intra prediction mode information or predicted luminance signal information used for predicting the luminance information may be utilized to predict the chrominance information.

인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. 그러나 인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 N x N 분할을 사용하는 인트라 예측을 사용할 수 있다.When intraprediction is performed, when the size of the prediction unit is the same as the size of the conversion unit, intra prediction is performed on the prediction unit based on pixels existing on the left side of the prediction unit, pixels existing on the upper left side, Can be performed. However, when intra prediction is performed, when the size of the prediction unit differs from the size of the conversion unit, intraprediction can be performed using the reference pixel based on the conversion unit. It is also possible to use intra prediction using N x N divisions for only the minimum coding units.

인트라 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.The intra prediction method can generate a prediction block after applying an AIS (Adaptive Intra Smoothing) filter to the reference pixel according to the prediction mode. The type of the AIS filter applied to the reference pixel may be different. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit can be predicted from the intra prediction mode of the prediction unit existing around the current prediction unit. In the case where the prediction mode of the current prediction unit is predicted using the mode information predicted from the peripheral prediction unit, if the intra prediction mode of the current prediction unit is the same as the intra prediction mode of the current prediction unit, The prediction mode information of the current block can be encoded by performing entropy encoding if the prediction mode of the current prediction unit is different from the prediction mode of the neighbor prediction unit.

또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다. In addition, a residual block including a prediction unit that has been predicted based on the prediction unit generated by the prediction units 120 and 125 and a residual value that is a difference value from the original block of the prediction unit may be generated. The generated residual block may be input to the transform unit 130. [

변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다. The transform unit 130 transforms the residual block including the residual information of the prediction unit generated through the original block and the predictors 120 and 125 into a DCT (Discrete Cosine Transform), a DST (Discrete Sine Transform), a KLT You can convert using the same conversion method. The decision to apply the DCT, DST, or KLT to transform the residual block may be based on the intra prediction mode information of the prediction unit used to generate the residual block.

양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.The quantization unit 135 may quantize the values converted into the frequency domain by the conversion unit 130. [ The quantization factor may vary depending on the block or the importance of the image. The values calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the reorder unit 160.

재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The reordering unit 160 can reorder the coefficient values with respect to the quantized residual values.

재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The reordering unit 160 may change the two-dimensional block type coefficient to a one-dimensional vector form through a coefficient scanning method. For example, the rearranging unit 160 may scan a DC coefficient to a coefficient in a high frequency region using a Zig-Zag scan method, and change the DC coefficient to a one-dimensional vector form. Instead of the jig-jag scan, a vertical scan may be used to scan two-dimensional block type coefficients in a column direction, and a horizontal scan to scan a two-dimensional block type coefficient in a row direction depending on the size of the conversion unit and the intra prediction mode. That is, it is possible to determine whether any scanning method among the jig-jag scan, the vertical direction scan and the horizontal direction scan is used according to the size of the conversion unit and the intra prediction mode.

엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160. For entropy encoding, various encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be used.

엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. The entropy encoding unit 165 receives the residual value count information of the encoding unit, the block type information, the prediction mode information, the division unit information, the prediction unit information and the transmission unit information, and the motion information of the motion unit from the reordering unit 160 and the prediction units 120 and 125 Vector information, reference frame information, interpolation information of a block, filtering information, and the like.

엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.The entropy encoding unit 165 can entropy-encode the coefficient value of the encoding unit input by the reordering unit 160. [

역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. The inverse quantization unit 140 and the inverse transformation unit 145 inverse quantize the quantized values in the quantization unit 135 and inversely transform the converted values in the conversion unit 130. [ The residual value generated by the inverse quantization unit 140 and the inverse transform unit 145 is combined with the prediction unit predicted through the motion estimation unit, the motion compensation unit and the intra prediction unit included in the prediction units 120 and 125, A block (Reconstructed Block) can be generated.

필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).

디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.The deblocking filter can remove block distortion caused by the boundary between the blocks in the reconstructed picture. It may be determined whether to apply a deblocking filter to the current block based on pixels included in a few columns or rows included in the block to determine whether to perform deblocking. When a deblocking filter is applied to a block, a strong filter or a weak filter may be applied according to the deblocking filtering strength required. In applying the deblocking filter, horizontal filtering and vertical filtering may be performed concurrently in performing vertical filtering and horizontal filtering.

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit may correct the offset of the deblocked image with respect to the original image in units of pixels. In order to perform offset correction for a specific picture, pixels included in an image are divided into a predetermined number of areas, and then an area to be offset is determined and an offset is applied to the area. Alternatively, Can be used.

ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive Loop Filtering (ALF) can be performed based on a comparison between the filtered reconstructed image and the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group may be determined and different filtering may be performed for each group. The information related to whether to apply the ALF may be transmitted for each coding unit (CU), and the shape and the filter coefficient of the ALF filter to be applied may be changed according to each block. Also, an ALF filter of the same type (fixed form) may be applied irrespective of the characteristics of the application target block.

메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.The memory 155 may store the reconstructed block or picture calculated through the filter unit 150 and the reconstructed block or picture stored therein may be provided to the predictor 120 or 125 when the inter prediction is performed.

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

도 2를 참조하면, 영상 복호화기(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.2, the image decoder 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, prediction units 230 and 235, 240, and a memory 245 may be included.

영상 부호화기에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화기와 반대의 절차로 복호화될 수 있다.When an image bitstream is input in the image encoder, the input bitstream may be decoded in a procedure opposite to that of the image encoder.

엔트로피 복호화부(210)는 영상 부호화기의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. The entropy decoding unit 210 can perform entropy decoding in a procedure opposite to that in which entropy encoding is performed in the entropy encoding unit of the image encoder. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied in accordance with the method performed by the image encoder.

엔트로피 복호화부(210)에서는 부호화기에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.The entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed in the encoder.

재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.The reordering unit 215 can perform reordering based on a method in which the entropy decoding unit 210 rearranges the entropy-decoded bitstreams in the encoding unit. The coefficients represented by the one-dimensional vector form can be rearranged by restoring the coefficients of the two-dimensional block form again. The reordering unit 215 can perform reordering by receiving information related to the coefficient scanning performed by the encoding unit and performing a reverse scanning based on the scanning order performed by the encoding unit.

역양자화부(220)는 부호화기에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 can perform inverse quantization based on the quantization parameters provided by the encoder and the coefficient values of the re-arranged blocks.

역변환부(225)는 영상 부호화기에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화기에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화기의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.The inverse transform unit 225 may perform an inverse DCT, an inverse DST, and an inverse KLT on the DCT, DST, and KLT transformations performed by the transform unit on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit 225 of the image decoder, a transform technique (e.g., DCT, DST, KLT) may be selectively performed according to a plurality of information such as a prediction method, a size of a current block, and a prediction direction.

예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction units 230 and 235 can generate a prediction block based on the prediction block generation related information provided by the entropy decoding unit 210 and the previously decoded block or picture information provided in the memory 245. [

전술한 바와 같이 영상 부호화기에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 N x N 분할을 사용하는 인트라 예측을 사용할 수도 있다.As described above, when intra prediction is performed in the same manner as in the image encoder, when the size of the prediction unit is the same as the size of the conversion unit, pixels existing on the left side of the prediction unit, pixels existing on the upper left side, However, when the size of the prediction unit differs from the size of the prediction unit in intra prediction, intraprediction is performed using a reference pixel based on the conversion unit . It is also possible to use intra prediction using N x N divisions for only the minimum coding unit.

예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 영상 부호화기에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.The prediction units 230 and 235 may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit receives various information such as prediction unit information input from the entropy decoding unit 210, prediction mode information of the intra prediction method, motion prediction related information of the inter prediction method, and identifies prediction units in the current coding unit. It is possible to determine whether the unit performs inter prediction or intra prediction. The inter prediction unit 230 predicts the current prediction based on the information included in at least one of the previous picture of the current picture or the following picture including the current prediction unit by using information necessary for inter prediction of the current prediction unit provided by the image encoder, Unit can be performed. Alternatively, the inter prediction may be performed on the basis of the information of the partial region previously reconstructed in the current picture including the current prediction unit.

인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드 중 어떠한 방법인지 여부를 판단할 수 있다.In order to perform inter prediction, a motion prediction method of a prediction unit included in a corresponding encoding unit on the basis of an encoding unit includes a skip mode, a merge mode, an AMVP mode, and an intra block copy mode It is possible to judge whether or not it is any method.

인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화기에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit 235 can generate a prediction block based on the pixel information in the current picture. If the prediction unit is a prediction unit that performs intra prediction, the intra prediction can be performed based on the intra prediction mode information of the prediction unit provided by the image encoder. The intraprediction unit 235 may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolator, and a DC filter. The AIS filter performs filtering on the reference pixels of the current block and can determine whether to apply the filter according to the prediction mode of the current prediction unit. The AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit provided in the image encoder and the AIS filter information. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.

참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolator may interpolate the reference pixels to generate reference pixels in units of pixels less than or equal to an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on pixel values obtained by interpolating reference pixels. The reference pixel may not be interpolated in the prediction mode in which the prediction mode of the current prediction unit generates the prediction block without interpolating the reference pixel. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The restored block or picture may be provided to the filter unit 240. The filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.

영상 부호화기로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화기의 디블록킹 필터에서는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. When information on whether a deblocking filter is applied to a corresponding block or picture from the image encoder or a deblocking filter is applied, information on whether a strong filter or a weak filter is applied can be provided. In the deblocking filter of the video decoder, the deblocking filter related information provided by the video encoder is provided, and the video decoder can perform deblocking filtering for the corresponding block.

오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image, offset information, and the like during encoding.

ALF는 부호화기로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.The ALF can be applied to an encoding unit on the basis of ALF application information and ALF coefficient information provided from an encoder. Such ALF information may be provided in a specific parameter set.

메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다. The memory 245 may store the reconstructed picture or block to be used as a reference picture or a reference block, and may also provide the reconstructed picture to the output unit.

전술한 바와 같이 이하, 본 발명의 실시예에서는 설명의 편의상 코딩 유닛(Coding Unit)을 부호화 단위라는 용어로 사용하지만, 부호화뿐만 아니라 복호화를 수행하는 단위가 될 수도 있다.As described above, in the embodiment of the present invention, a coding unit (coding unit) is used as a coding unit for convenience of explanation, but it may be a unit for performing not only coding but also decoding.

본 발명에 따른 영상 부호화 장치의 필터부(150) 및 영상 복호화 장치의 필터부(240)는 본 발명에 따른 필터링의 대상인 코너 아웃라이어(Corner outlier)를 필터링하는 코너 아웃라이어 필터를 더 포함할 수 있다. 코너 아웃라이어 필터는 디블록킹 필터의 앞 또는 뒤, 오프셋 보정부의 앞 또는 뒤, ALF(Adaptive Loop Filter)의 앞 또는 뒤에 위치할 수 있다. 또는, 본 발명에 따른 필터링은 인루프(in-loop) 필터링의 일부로 수행될 수도 있으며, 인트라 예측 또는 인터 예측의 레퍼런스로서 사용되는 픽셀들에 대해서도 수행될 수 있다.The filter unit 150 of the image encoding apparatus and the filter unit 240 of the image decoding apparatus according to the present invention may further include a corner outlier filter for filtering a corner outlier that is an object of filtering according to the present invention have. The corner outlier filter may be located before or after the deblocking filter, before or after the offset corrector, or before or after the ALF (Adaptive Loop Filter). Alternatively, filtering according to the present invention may be performed as part of in-loop filtering and also for pixels used as a reference of intraprediction or inter prediction.

도 3(a)는 본 발명의 일실시예에 따른 코너 아웃라이어 필터의 필터링 대상이 되는 코너 아웃라이어를 설명하기 위한 도면이다. 도 3(b)는 도 3(a)의 교차점을 중심으로 하는 2x2 영역의 픽셀들의 픽셀값을 예시적으로 나타낸 도면이다. 도 3(c)는 코너 아웃라이어를 검출하고 필터링하기 위해 사용되는 픽셀들의 위치를 지시하기 위한 인덱스를 표시한 도면이다. 도 3(a), 도 3(b) 및 도 3(c)에 있어서, 굵은 선으로 나타낸 부분은 블록과 블록간의 경계를 의미하며, 각 격자는 하나의 픽셀에 대응된다.3 (a) is a view for explaining a corner outlier to be filtered by a corner outlier filter according to an embodiment of the present invention. 3 (b) is a diagram illustrating pixel values of pixels of a 2x2 region centered on the intersection of FIG. 3 (a). FIG. 3 (c) is a diagram showing an index for indicating the position of pixels used for detecting and filtering a corner outlier. In Figs. 3 (a), 3 (b) and 3 (c), a portion indicated by a thick line means a boundary between a block and a block, and each lattice corresponds to one pixel.

도 3(a)에 도시된 바와 같이, 블록 단위로 복호화된 영상에 있어서, 하나의 교차점(300)을 중심으로 4개의 블록(301, 302, 303, 304)의 코너가 만날 수 있다. 4개의 블록(301, 302, 303, 304) 각각의 크기는 서로 상이하거나, 일부 또는 전부 동일할 수 있다. 상기 4개의 블록(301, 302, 303, 304)은 각각 예측, 양자화 또는 변환의 단위 블록이 될 수 있다. 상기 4개의 블록(301, 302, 303, 304)의 양자화(또는 역양자화)에 사용된 양자화 파라미터는 각각 서로 상이하거나 일부 또는 전부 동일할 수 있다. As shown in FIG. 3 (a), in the image decoded in block units, the corners of the four blocks 301, 302, 303, and 304 may meet around one intersection point 300. The sizes of each of the four blocks 301, 302, 303, and 304 may be different from each other, or some or all of them may be the same. The four blocks 301, 302, 303, and 304 may be unit blocks of prediction, quantization, or transformation, respectively. The quantization parameters used for the quantization (or dequantization) of the four blocks 301, 302, 303, and 304 may be different from each other, or some or all of them may be the same.

상기 복호화된 영상은 다양한 형태의 이미지 영역을 포함할 수 있으며, 이미지 영역의 경계(에지)가 부호화/복호화의 단위인 블록의 경계와 일치하지 않을 수 있다. 예컨대, 도 3(a)에 있어서, 빗금친 부분의 이미지 영역(305)은 복수의 블록(301, 302, 303, 304)에 걸쳐 존재할 수 있으며, 이중 하나의 블록(301)에 대해서는 코너 부분에만 걸쳐 존재할 수 있다. 이 때, 교차점(300)을 중심으로 인접하는 4개의 코너 픽셀들은 모두 동일 이미지 영역(305)에 속하는 인접 픽셀들이므로 유사한 픽셀값을 가질 것을 예상할 수 있다.The decoded image may include various types of image regions, and the boundary (edge) of the image region may not coincide with the boundary of a block that is a unit of encoding / decoding. For example, in FIG. 3A, an image area 305 of a hatched portion may exist over a plurality of blocks 301, 302, 303, 304, and only one corner 301 Lt; / RTI > At this time, it can be expected that the four corner pixels adjacent to each other around the intersection point 300 are adjacent pixels belonging to the same image area 305, and therefore have similar pixel values.

그러나, 예측, 양자화, 변환 등의 부호화/복호화 처리가 블록 단위로 수행되는 등의 이유로, 복호화된 영상에 포함된 동일 이미지 영역(305)에 속하는 상기 4개의 인접 코너 픽셀들 사이에도 픽셀값이 크게 차이나는 경우가 있다. 예컨대, 도 3(a)에서, 교차점(300)을 중심으로 인접하는 4개의 코너 픽셀들 중, 좌상측 블록(301)에 속하는 코너 픽셀의 픽셀값이 다른 나머지 3개의 코너 픽셀의 픽셀값들 보다 매우 작거나 커지는 경우가 있다. However, because the encoding / decoding processes such as prediction, quantization, and conversion are performed on a block-by-block basis, pixel values are also large between the four adjacent corner pixels belonging to the same image area 305 included in the decoded image There are cases of difference. 3 (a), among the four corner pixels adjacent to each other at the intersection 300, the pixel value of the corner pixel belonging to the upper left side block 301 is greater than the pixel values of the remaining three corner pixels It may be very small or large.

본 발명의 코너 아웃라이어 필터는 복호화된 영상에 포함된 4개의 블록들(301, 302, 303, 304)이 하나의 교차점(300)을 중심으로 만날 때, 상기 교차점(300)을 중심으로 인접하는 4개의 코너 픽셀들 중, 다른 코너 픽셀들의 픽셀값들과 큰 차이를 나타내는 픽셀값을 갖는 코너 픽셀을 코너 아웃라이어로서 검출하고 필터링한다. 즉, 코너 아웃라이어란, 양자화 에러(quantization error) 또는 예측 에러(prediction error) 등으로 인하여, 복원된 영상내의 하나의 블록의 코너 픽셀값이 그와 인접한 다른 블록의 코너 픽셀값들과 큰 차이를 나타내는 경우에, 이러한 노이즈(noise)를 포함하는 코너 픽셀로 정의될 수 있다. 또한, 본 발명에 따른 코너 아웃라이어는, 주변 인접 픽셀들의 픽셀값들과 큰 차이를 나타내는 픽셀값을 갖는 픽셀 및 그 주변 픽셀들을 포함할 수 있다.The corner outlier filter according to the present invention is characterized in that when four blocks 301, 302, 303 and 304 included in a decoded image are centered on one intersection 300, A corner pixel having a pixel value indicating a large difference from the pixel values of the other corner pixels among the four corner pixels is detected and filtered as a corner outlier. In other words, the corner outlier is a method in which a corner pixel value of one block in a reconstructed image is greatly different from corner pixel values of adjacent blocks due to a quantization error or a prediction error , It can be defined as a corner pixel including such noise. In addition, the corner outlier according to the present invention may include a pixel having a pixel value indicating a large difference from the pixel values of nearby neighboring pixels, and surrounding pixels.

도 3(b)는 도 3(a)의 교차점(300)을 중심으로 하는 2x2 영역을 확대한 확대도이다. 도 3(b)에 있어서, 각각의 격자에 포함된 숫자는 블록에 포함된 픽셀이 갖는 픽셀값을 예시적으로 나타낸다.Fig. 3 (b) is an enlarged view of a 2x2 area around the intersection 300 of Fig. 3 (a). In Fig. 3 (b), numerals included in each grid represent exemplary pixel values of pixels included in the block.

도 3(b)에 도시된 바와 같이, 교차점(300)에 인접하는 4개의 코너 픽셀들은 픽셀값으로서 각각 120, 61, 44, 29의 값을 가질 수 있다. 이와 같이, 인접하는 4개의 코너 픽셀 중 픽셀값이 120인 코너 픽셀(빗금친 부분)이 다른 나머지 3개의 코너 픽셀들의 픽셀값들(61, 44, 29)과 큰 차이를 나타냄을 알 수 있다. 따라서, 120의 픽셀값을 갖는 코너 픽셀이 본 발명의 필터링의 대상인 코너 아웃라이어에 해당될 수 있다.As shown in FIG. 3 (b), four corner pixels adjacent to the intersection point 300 may have values of 120, 61, 44, and 29, respectively, as pixel values. As described above, it can be seen that a corner pixel (hatched portion) having a pixel value of 120 among the four neighboring corner pixels is greatly different from the pixel values (61, 44, 29) of the remaining three corner pixels. Thus, a corner pixel with a pixel value of 120 may correspond to a corner outlier, which is the subject of filtering of the present invention.

도 3(c)는 코너 아웃라이어를 검출하고 필터링하기 위해 사용되는 상기 2x2 영역의 픽셀들의 위치를 지시하기 위한 인덱스를 표시한 도면이다. 도 3(c)에 도시된 바와 같이, 교차점(300)을 중심으로 인접하는 코너 픽셀들의 위치는 대문자(A, B, C 및 D)로 각각 표시하고, 각 코너 픽셀에 인접하는 픽셀들의 위치는 소문자와 숫자를 결합(a1, a2, b1, b2, c1, c2, d1, d2)하여 표시한다. 코너 아웃라이어를 검출하고 필터링하기 위해 사용되는 코너 아웃라이어 필터의 입력은 도 3(c)에 도시된 영역의 픽셀들로 한정되지 않으며, 블록과 블록 사이의 경계를 중심으로 수직적, 수평적 및/또는 대각선으로 인접하는 영역내의 픽셀들이 이용될 수 있다. 예컨대, 3x3, 4x4 등과 같은 정사각형 영역의 픽셀들을 이용할 수도 있고, 또는 1x2, 2x1, 1x3, 3x1, 1x4, 4x1, 2x3, 3x2, 2x4, 4x2, 3x4, 4x3 등과 같은 직사각형 영역의 픽셀들을 이용할 수도 있다. 코너 아웃라이어 필터의 입력으로 사용되는 픽셀들은 부호화기/복호화기가 이미 알고 있는 위치의 픽셀들일 수 있다. 또는 그 픽셀들의 위치와 관련된 정보가 비트스트림에 포함되어 시그널링될 수도 있다.FIG. 3 (c) shows an index for indicating the position of the pixels in the 2x2 area used for detecting and filtering the corner outlier. As shown in FIG. 3 (c), the positions of the corner pixels adjacent to each other around the intersection point 300 are indicated by uppercase letters A, B, C, and D, respectively, (A1, a2, b1, b2, c1, c2, d1, d2). The input of the corner outlier filter used to detect and filter the corner outliers is not limited to the pixels in the area shown in Figure 3 (c), and the vertical, horizontal and / Or pixels within diagonally adjacent regions may be used. For example, pixels in a square area such as 3x3, 4x4, etc. may be used, or pixels in a rectangular area such as 1x2, 2x1, 1x3, 3x1, 1x4, 4x1, 2x3, 3x2, 2x4, 4x2, 3x4, 4x3, . The pixels used as the inputs of the corner outlier filter may be pixels at locations that the encoder / decoder knows. Or information related to the position of the pixels may be included in the bitstream and signaled.

이하, 도 3(c)에 도시한 픽셀들의 위치에 관한 인덱스를 참조하여 코너 아웃라이어 필터의 동작을 설명한다. 또한, 도 3(c)에 도시한 픽셀들의 위치에 관한 인덱스 중, 코너 픽셀 B의 픽셀값이 다른 인접 코너 픽셀 A, C 및 D의 픽셀값들과 큰 차이를 나타내는 경우를 가정하여 설명한다.Hereinafter, the operation of the corner outlier filter will be described with reference to the index related to the positions of the pixels shown in Fig. 3 (c). It is assumed that the pixel value of the corner pixel B represents a large difference from the pixel values of the other adjacent corner pixels A, C, and D among the indexes regarding the positions of the pixels shown in FIG. 3 (c).

도 4는 본 발명의 일 실시예에 따른 코너 아웃라이어 필터의 동작을 설명하기 위한 순서도이다.4 is a flowchart illustrating an operation of a corner outlier filter according to an embodiment of the present invention.

코너 아웃라이어 필터의 입력으로서, 하나의 교차점(300)을 중심으로 인접하는 4개의 블록들(301, 302, 303, 304)에 포함된 픽셀들의 픽셀값들이 사용될 수 있다. 예컨대, 도 3(c)에 도시된 2x2 영역 내의 픽셀들의 픽셀값들이 코너 아웃라이어 필터의 입력으로서 사용될 수 있다.As input of the corner outlier filter, pixel values of pixels included in the four blocks 301, 302, 303, 304 adjacent to each other at one intersection 300 can be used. For example, the pixel values of the pixels in the 2x2 region shown in Figure 3 (c) can be used as inputs to the corner outlier filter.

코너 아웃라이어 선택 단계(S401)에서는, 하나의 교차점(300)을 중심으로 4개의 블록들(301, 302, 303, 304)이 인접할 때, 상기 교차점에 인접하는 4개의 코너 픽셀들(A, B, C, D) 중, 다른 인접 코너 픽셀들의 픽셀값들과 큰 차이를 나타내는 픽셀값을 갖는 코너 픽셀을 코너 아웃라이어로서 선택한다.In the corner outlier selection step S401, when four blocks 301, 302, 303 and 304 are adjacent to each other around one intersection 300, four corner pixels A, B, C, and D), a corner pixel having a pixel value indicating a large difference from pixel values of other adjacent corner pixels is selected as a corner outlier.

코너 아웃라이어의 선택은, 상기 교차점에 인접하는 코너 픽셀의 픽셀값들 사이의 차이값과 제1 문턱값(threshold)을 이용하여 수행될 수 있다. 상기 픽셀값들 사이의 차이값은 수평, 수직 및/또는 대각선으로 인접하고 있는 픽셀들의 픽셀값들 사이의 차이값일 수 있다. 상기 제1 문턱값은 양자화 파라미터에 기초하여 설정될 수 있다. 예컨대, 상기 제1 문턱값은 상기 인접한 4개의 블록(301, 302, 303, 304)의 양자화 파라미터 중 어느 하나일 수도 있고, 또는 상기 인접한 4개의 블록(301, 302, 303, 304)의 양자화 파라미터 중 최대값, 최소값, 최빈값, 중간값, 평균값, 가중평균값 및/또는 이들 값을 소정의 상수값으로 스케일링하여 유도되는 값을 제1 문턱값으로서 사용할 수 있다. 상기 소정의 상수값은 고정된 값을 사용하거나 가변적일 수 있으며, 비트스트림에 포함되어 시그널링된 정보에 기초하여 획득될 수도 있다. 그러나, 제1 문턱값은 이에 한정되지 않으며, 기 정의된 값을 사용하거나, 영상의 특성 등에 따라 다른 값으로 설정하거나, 또는 비트스트림에 의해 시그널링되는 값을 사용할 수도 있다.The selection of the corner outlier may be performed using a difference value between the pixel values of the corner pixels adjacent to the intersection and a first threshold. The difference value between the pixel values may be a difference value between pixel values of pixels adjacent horizontally, vertically and / or diagonally. The first threshold value may be set based on a quantization parameter. For example, the first threshold value may be one of the quantization parameters of the four adjacent blocks 301, 302, 303, 304, or the quantization parameter of the adjacent four blocks 301, 302, 303, A maximum value, a minimum value, a mode value, a middle value, an average value, a weighted average value, and / or a value derived by scaling these values to a predetermined constant value may be used as a first threshold value. The predetermined constant value may be a fixed value or may be variable and may be obtained based on the signaled information included in the bitstream. However, the first threshold value is not limited to this, and it may be set to a different value depending on the characteristics of the image, using a predefined value, or a value signaled by the bitstream.

본 발명의 일실시예에 따르면, 아래의 수학식(1)로부터, 상기 교차점에 인접하는 4개의 코너 픽셀들(A, B, C, D) 중, 다른 인접 코너 픽셀들의 픽셀값들과 큰 차이를 나타내는 픽셀값을 갖는 코너 픽셀을 코너 아웃라이어로서 선택할 수 있다. According to one embodiment of the present invention, from the following equation (1), the pixel values of the other adjacent corner pixels among the four corner pixels (A, B, C, D) A corner pixel having a pixel value representing a corner outlier can be selected as a corner outlier.

[수학식1][Equation 1]

Figure pat00001
Figure pat00001

수학식(1)에 따르면, 먼저, 4개의 코너 픽셀들의 픽셀값들의 차이값에 기초하여, 4개의 코너 픽셀들 중, 다른 인접 코너 픽셀들의 픽셀값들과 큰 차이를 나타내는 픽셀값을 갖는 코너 픽셀을 선택할 수 있다. According to the equation (1), first, based on the difference value of the pixel values of the four corner pixels, of the four corner pixels, a corner pixel having a pixel value indicating a large difference from the pixel values of the other adjacent corner pixels Can be selected.

구체적으로, 코너 픽셀 A와 코너 픽셀 C의 픽셀값의 차이값과 코너 픽셀 B와 코너 픽셀 D의 픽셀값의 차이값을 비교함으로써, 코너 픽셀 A 또는 코너 픽셀 C 중에 코너 아웃라이어가 포함되는지, 아니면 코너 픽셀 B 또는 코너 픽셀 D에 코너 아웃라이어가 포함되는지 판단할 수 있다. 예컨대, 코너 픽셀 A와 코너 픽셀 C의 픽셀값의 차이값이 코너 픽셀 B와 코너 픽셀 D의 픽셀값의 차이값보다 작다면, 코너 픽셀 B 또는 코너 픽셀 D 중에 코너 아웃라이어가 포함되는 것으로 판단할 수 있다. Specifically, by comparing the difference value between the pixel value of the corner pixel A and the pixel value of the corner pixel C and the difference value between the corner pixel B and the pixel value of the corner pixel D, it is determined whether the corner outlier is included in the corner pixel A or the corner pixel C It is possible to judge whether the corner outlier is included in the corner pixel B or the corner pixel D. For example, if the difference value between the pixel values of the corner pixels A and C is smaller than the difference value between the pixel values of the corner pixels B and D, it is determined that the corner outlier is included in the corner pixel B or the corner pixel D .

코너 픽셀 B 또는 코너 픽셀 D 중에 코너 아웃라이어가 포함되는 것으로 판단되면, 다시 코너 픽셀 B와 코너 픽셀 C의 픽셀값의 차이값과 코너 픽셀 A와 코너 픽셀 D의 픽셀값의 차이값을 비교할 수 있다. 만약, 코너 픽셀 B와 코너 픽셀 C의 픽셀값의 차이값이 코너 픽셀 A와 코너 픽셀 D의 픽셀값의 차이값보다 크다면, 코너 픽셀 B 또는 코너 픽셀 C 중에 코너 아웃라이어가 포함되는 것으로 판단할 수 있다. If it is determined that the corner outlier is included in the corner pixel B or the corner pixel D, the difference value between the pixel values of the corner pixel B and the corner pixel C and the difference value between the corner pixel A and the pixel value of the corner pixel D . If the difference value between the pixel values of the corner pixels B and C is larger than the difference value between the pixel values of the corner pixels A and D, it is determined that the corner outlier is included in the corner pixel B or the corner pixel C .

상기 예에서, 첫번째 비교과정(

Figure pat00002
)을 통해, 코너 픽셀 B 또는 코너 픽셀 D 중에 코너 아웃라이어가 포함되는 것으로 판단되고, 두번째 비교과정(
Figure pat00003
)을 통해, 코너 픽셀 B 또는 코너 픽셀 C 중에 코너 아웃라이어가 포함되는 것으로 판단된다면, 상기 두 번의 비교 과정을 통해, 코너 픽셀 B의 픽셀값이 다른 코너 픽셀 A, C, D의 픽셀값들과 큰 차이를 갖는 것을 알 수 있다. 따라서, 코너 픽셀 B가 나타내는 코너 아웃라이어가 될 수 있는 것으로 판단할 수 있다.In this example, the first comparison process (
Figure pat00002
), It is determined that the corner outlier is included in the corner pixel B or the corner pixel D, and the second comparison process
Figure pat00003
), It is determined that the corner outlier is included in the corner pixel B or the corner pixel C, the pixel value of the corner pixel B is compared with the pixel values of the other corner pixels A, C, and D It can be seen that there is a large difference. Therefore, it can be judged that it can be a corner outlier represented by the corner pixel B.

상기와 같이, 인접한 코너 픽셀의 픽셀값들 사이의 차이값을 비교하는 절차를 통해, 4개의 인접한 코너 픽셀(A, B, C, D) 중, 다른 3개의 인접 코너 픽셀들의 픽셀값들과 큰 차이를 나타내는 픽셀값을 갖는 코너 픽셀을 선택할 수 있다. 그러나, 인접하는 4개의 코너 픽셀들 중 다른 코너 픽셀들의 픽셀값들과 큰 차이를 나타내는 픽셀값을 갖는 코너 픽셀의 선택은 상기 수학식(1)에 의한 방법 이외에도 다양한 방법에 의해 수행될 수 있다.As described above, the pixel values of the other three neighboring corner pixels among the four adjacent corner pixels A, B, C, and D are compared with the pixel values of the other three neighboring corner pixels by the procedure of comparing the difference value between the pixel values of adjacent corner pixels. A corner pixel having a pixel value indicating a difference can be selected. However, the selection of the corner pixels having the pixel value representing a large difference from the pixel values of the other four corner pixels among the neighboring corner pixels can be performed by various methods other than the method according to the above equation (1).

상기 수학식(1)에서, 두 번의 비교 과정을 통해, 4개의 인접한 코너 픽셀(A, B, C, D) 중, 다른 3개의 인접 코너 픽셀들의 픽셀값과 큰 차이를 나타내는 픽셀값을 갖는 코너 픽셀로서, 코너 픽셀 B가 선택되면, 선택된 코너 픽셀 B와 다른 3개의 인접 코너 픽셀 A, C, D와의 픽셀값의 차이값을 제1 문턱값과 비교할 수 있다. 상기 제1 문턱값은 예컨대, 상기 인접한 4개의 블록의 양자화 파라미터의 평균값의 1/3인 QP/3으로 설정하여 사용할 수 있다. 그러나, 제1 문턱값은 이에 한정되지 않으며, 영상의 특성 등에 따라 다른 값으로 설정하거나, 또는 비트스트림에 의해 시그널링되는 값을 사용할 수도 있다. In the above Equation (1), through two comparison processes, a corner having a pixel value representing a large difference from the pixel value of the other three adjacent corner pixels among the four adjacent corner pixels (A, B, C, D) As a pixel, when the corner pixel B is selected, the difference value of the pixel values of the selected corner pixel B and the three adjacent corner pixels A, C, D can be compared with the first threshold value. The first threshold value may be set to, for example, QP / 3, which is 1/3 of the average value of the quantization parameters of the adjacent four blocks. However, the first threshold value is not limited to this, and may be set to a different value depending on the characteristics of the image, or a value signaled by the bitstream may be used.

상기 수학식(1)에서, 선택된 코너 픽셀 B와 다른 3개의 인접 코너 픽셀 A, C, D와의 픽셀값의 차이값이 모두 제1 문턱값보다 클 때, 상기 선택된 코너 픽셀 B를 코너 아웃라이어로서 선택할 수 있다. 만약 상기 수학식(1)에서, 선택된 코너 픽셀 B와 다른 3개의 인접 코너 픽셀 A, C, D 중 하나 이상의 코너 픽셀과의 픽셀값의 차이값이 제1 문턱값보다 작다면, 코너 아웃라이어가 선택되지 않을 수 있다. 이 경우, 해당 코너 아웃라이어 필터 입력에 대한 코너 아웃라이어 필터링 동작은 종료될 수 있다.When the difference value between the pixel values of the selected corner pixel B and the three neighboring corner pixels A, C and D are both greater than the first threshold value in the equation (1), the selected corner pixel B is set as a corner outlier You can choose. If the difference value of the pixel value between the selected corner pixel B and one or more corner pixels of the three adjacent corner pixels A, C and D is smaller than the first threshold value in the above equation (1), the corner outlier May not be selected. In this case, the corner outlier filtering operation for the corresponding corner outlier filter input may be terminated.

S401 단계에서, 코너 아웃라이어가 선택되면, 선택된 코너 아웃라이어와 동일 블록내에 속하면서, 선택된 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어와의 유사성을 판단할 수 있다(S402). S402 단계는 경우에 따라 수행되지 않을 수 있으며, 예컨대, S402 단계의 생략 여부는 영상의 특성에 기초하여 결정되거나 시그널링되는 정보에 기초하여 결정될 수 있다.If the corner outlier is selected in step S401, the similarity between the corner outlier and the pixel adjacent to the selected corner outlier can be determined while belonging to the same block as the selected corner outlier (S402). Step S402 may not be performed as the case may be. For example, the omission of step S402 may be determined based on information determined or signaled based on the characteristics of the image.

예컨대, 수학식(1)에 의해, 도 3(c)의 코너 픽셀 B가 코너 아웃라이어로서 선택된 경우, 코너 픽셀 B와 동일 블록(301)내에 속하며, 수평으로 인접한 픽셀 b1 및/또는 수직으로 인접한 픽셀 b2와 코너 픽셀 B 사이의 유사성을 판단할 수 있다.For example, when the corner pixel B of Fig. 3 (c) is selected as the corner outlier, the pixel b1 and / or the vertically adjacent pixel belonging to the same block 301 as the corner pixel B and horizontally adjacent The similarity between the pixel b2 and the corner pixel B can be determined.

상기 유사성 판단은 동일 블록 내의 픽셀과 코너 픽셀 B의 픽셀값의 차이값에 기초하여 수행될 수 있다. 여기서 동일 블록 내의 픽셀은 코너 픽셀 B와 동일 수평선 및/또는 수직선 상에 위치한 것일 수 있다. 동일 블록 내의 픽셀은 코너 픽셀 B와 연속적으로 인접한 하나 또는 그 이상의 픽셀일 수도 있고, 소정의 거리만큼 떨어진 위치의 하나 또는 그 이상의 픽셀일 수도 있다. 예컨대, 동일 블록 내 수평 및/또는 수직으로 인접한 인접 픽셀(b1, b2)과 코너 픽셀 B의 픽셀값의 차이값을 제2 문턱값과 비교함으로써 수행될 수 있다. 상기 제2 문턱값은 양자화 파라미터에 기초하여 설정될 수 있다. 예컨대, 상기 인접한 4개의 블록(301, 302, 303, 304)의 양자화 파라미터 중 어느 하나일 수도 있고, 또는 상기 인접한 4개의 블록(301, 302, 303, 304)의 양자화 파라미터 중 최대값, 최소값, 최빈값, 중간값, 평균값, 가중평균값 및/또는 이들 값을 소정의 상수값으로 스케일링하여 유도되는 값을 제2 문턱값으로서 사용할 수 있다. 상기 소정의 상수값은 고정된 값을 사용하거나 가변적일 수 있으며, 비트스트림에 포함되어 시그널링된 정보에 기초하여 획득될 수도 있다. 본 발명의 일실시예에 따르면, 상기 제2 문턱값은 예컨대, 상기 인접한 4개의 블록의 양자화 파라미터의 평균값의 1/6인 QP/6로 설정하여 사용할 수 있다. 그러나, 제2 문턱값은 이에 한정되지 않으며, 영상의 특성 등에 따라 다른 값으로 설정하거나, 또는 비트스트림에 의해 시그널링되는 값을 사용할 수도 있다.The similarity determination may be performed based on the difference value between the pixel value in the same block and the pixel value in the corner pixel B. [ Where the pixels in the same block may be located on the same horizontal and / or vertical line as the corner pixel B. A pixel in the same block may be one or more pixels that are consecutively adjacent to the corner pixel B, or may be one or more pixels at a predetermined distance apart. For example, it can be performed by comparing the difference value between the pixel value of the neighboring pixel (b1, b2) horizontally and / or vertically adjacent in the same block and the corner pixel B with the second threshold value. The second threshold value may be set based on the quantization parameter. The maximum value, the minimum value, and the minimum value of the quantization parameters of the four adjacent blocks 301, 302, 303, and 304 may be any one of the quantization parameters of the adjacent four blocks 301, 302, 303, A mode value, a middle value, an average value, a weighted average value, and / or a value derived by scaling these values to a predetermined constant value may be used as a second threshold value. The predetermined constant value may be a fixed value or may be variable and may be obtained based on the signaled information included in the bitstream. According to an embodiment of the present invention, the second threshold value may be set to, for example, QP / 6, which is 1/6 of the average value of the quantization parameters of the adjacent four blocks. However, the second threshold value is not limited to this, and may be set to a different value depending on the characteristics of the image, or a value signaled by the bit stream may be used.

본 발명의 일실시예에 따르면, 아래의 수학식(2)를 이용하여, 동일 블록 내 인접 픽셀(b1, b2)과 코너 픽셀 B 사이의 유사성을 판단할 수 있다.According to an embodiment of the present invention, the similarity between the neighboring pixels b1 and b2 in the same block and the corner pixel B can be determined using the following equation (2).

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

Figure pat00004
Figure pat00004

상기 수학식(2)에서, 코너 픽셀 B와 이에 수평으로 인접하는 픽셀 b1의 픽셀값의 차이값을 제2 문턱값인 QP/6과 비교한다. 만약 코너 픽셀 B와 픽셀 b1의 픽셀값의 차이값이 QP/6보다 작으면, 코너 픽셀 B와 픽셀 b1은 서로 유사한 것으로 판단될 수 있다. 코너 픽셀 B와 픽셀 b2의 유사성 판단도 동일한 방법으로 수행될 수 있다.In Equation (2), the difference value between the pixel value of the corner pixel B and the pixel b1 horizontally adjacent thereto is compared with the second threshold value QP / 6. If the difference between the pixel values of the corner pixels B and b1 is less than QP / 6, the corner pixels B and b1 can be judged to be similar to each other. The determination of similarity between the corner pixel B and the pixel b2 can also be performed in the same manner.

상기 유사성 판단 결과, 동일 블록 내 인접 픽셀들(b1, b2)과 코너 픽셀 B가 유사하지 않은 것으로 판단되면, 코너 아웃라이어로서 선택된 상기 코너 픽셀 B에 대한 코너 아웃라이어 필터링 동작은 종료될 수 있다. If it is determined that the neighboring pixels b1 and b2 in the same block and the corner pixel B are not similar to each other, the corner outlier filtering operation for the corner pixel B selected as the corner outlier may be terminated.

상기 유사성 판단 결과, 동일 블록 내 인접 픽셀(b1, b2)과 코너 픽셀 B가 유사한 것으로 판단되면, S403 단계로 진행하여, 선택된 코너 아웃라이어에 대한 처리를 계속할 수 있다. If it is determined that the neighboring pixels b1 and b2 in the same block are similar to the corner pixel B as a result of the similarity determination, the process proceeds to step S403 and the processing for the selected corner outlier can be continued.

S403 단계에서는, 코너 아웃라이어에 인접하는 수평 블록 경계 및 수직 블록 경계가 영상에 포함된 이미지 영역의 에지(edge)인지 여부를 판단한다. S403 단계는 경우에 따라 수행되지 않을 수 있으며, 예컨대, S403 단계의 생략 여부는 영상의 특성에 기초하여 결정되거나 시그널링되는 정보에 기초하여 결정될 수 있다.In step S403, it is determined whether a horizontal block boundary and a vertical block boundary adjacent to the corner outlier are edges of an image area included in the image. Step S403 may not be performed as the case may be. For example, the omission of step S403 may be determined based on information determined or signaled based on the characteristics of the image.

S403 단계는, 코너 아웃라이어로 선택된 코너 픽셀 B가 다른 인접 코너 픽셀(A, C, D)들과 서로 다른 이미지 영역에 포함되어 있어, 필터링을 수행하는 것이 적절치 못한 경우에 해당하는지를 판단하기 위한 것이다. 예컨대, 코너 픽셀 B가 속한 이미지 영역과 코너 픽셀 A, C 및 D가 속한 이미지 영역이 서로 다르면, 코너 픽셀 B의 픽셀값은 다른 인접 코너 픽셀 A, C 및 D의 픽셀값과 큰 차이를 나타낼 수 있다. 이러한 경우의 픽셀값의 차이는 예컨대, 블록 단위의 양자화 등에 의한 노이즈라고 볼 수 없는 경우가 있다. 따라서, 이러한 경우, 코너 픽셀 B에 대해 코너 아웃라이어 필터링을 수행하지 않는 것이 바람직하다.Step S403 is for judging whether or not the corner pixel B selected as the corner outlier is included in different image areas from the other adjacent corner pixels A, C and D, . For example, if the image area to which the corner pixel B belongs and the image area to which the corner pixels A, C, and D belong are different from each other, the pixel value of the corner pixel B may show a large difference from the pixel values of the other adjacent corner pixels A, have. In this case, the difference in pixel value may not be regarded as noise due to, for example, block-based quantization. Therefore, in such a case, it is preferable not to perform corner outlier filtering on the corner pixel B.

S403 단계에서는, 코너 아웃라이어인 코너 픽셀 B에 인접하는 수평 블록 경계 및 수직 블록 경계가 이미지 영역의 에지인지의 여부에 대한 판단을 수행한다. 만약, 코너 픽셀 B에 인접하는 수평 블록 경계 및 수직 블록 경계가 이미지 영역의 에지인 것으로 판단되면, 코너 픽셀 B와 다른 인접 코너 픽셀 A, C 및 D는 서로 상이한 이미지 영역에 속하는 것으로 판단될 수 있다.In step S403, a determination is made as to whether or not the horizontal block boundary and the vertical block boundary adjacent to the corner pixel B that is the corner outlier are edges of the image area. If it is determined that the horizontal block boundary and the vertical block boundary adjacent to the corner pixel B are the edges of the image area, it can be determined that the corner pixel B and the other adjacent corner pixels A, C, and D belong to different image areas .

본 발명의 일실시예에 따른 상기 에지 여부 판단은 코너 아웃라이어인 코너 픽셀 B에 인접하는 블록들(302, 303, 304)에 포함된 픽셀들로서, 상기 수평 블록 경계 및 수직 블록 경계에 인접한 적어도 하나의 픽셀과 제3 문턱값을 이용하여 수행할 수 있다. 상기 제3 문턱값은 양자화 파라미터에 기초하여 설정될 수 있다. 예컨대, 상기 인접한 4개의 블록(301, 302, 303, 304)의 양자화 파라미터 중 어느 하나일 수도 있고, 또는 상기 인접한 4개의 블록(301, 302, 303, 304)의 양자화 파라미터 중 최대값, 최소값, 최빈값, 중간값, 평균값, 가중평균값 및/또는 이들 값을 소정의 상수값으로 스케일링하여 유도되는 값을 제3 문턱값으로서 사용할 수도 있다. 상기 소정의 상수값은 고정된 값을 사용하거나 가변적일 수 있으며, 비트스트림에 포함되어 시그널링된 정보에 기초하여 획득될 수도 있다. 그러나, 제3 문턱값은 이에 한정되지 않으며, 영상의 특성 등에 따라 다른 값으로 설정하거나, 또는 비트스트림에 의해 시그널링되는 값을 사용할 수도 있다. 본 발명의 일실시예에 따르면, 상기 제3 문턱값은 예컨대, 상기 인접한 4개의 블록의 양자화 파라미터의 평균값의 1/6인 QP/6로 설정하여 사용할 수 있다. 그러나, 제3 문턱값은 이에 한정되지 않으며, 영상의 특성 등에 따라 다른 값으로 설정하거나, 또는 비트스트림에 의해 시그널링되는 값을 사용할 수도 있다.The edge determination according to an exemplary embodiment of the present invention may include at least one pixel included in the blocks 302, 303, and 304 adjacent to the corner pixel B, which is a corner outlier, And a third threshold value. The third threshold value may be set based on the quantization parameter. The maximum value, the minimum value, and the minimum value of the quantization parameters of the four adjacent blocks 301, 302, 303, and 304 may be any one of the quantization parameters of the adjacent four blocks 301, 302, 303, A value derived by scaling a mode value, an intermediate value, an average value, a weighted average value, and / or a predetermined constant value may be used as a third threshold value. The predetermined constant value may be a fixed value or may be variable and may be obtained based on the signaled information included in the bitstream. However, the third threshold value is not limited to this, and may be set to a different value depending on the characteristics of the image, or a value signaled by the bitstream may be used. According to an embodiment of the present invention, the third threshold value may be set to, for example, QP / 6, which is 1/6 of the average value of the quantization parameters of the adjacent four blocks. However, the third threshold value is not limited to this, and may be set to a different value depending on the characteristics of the image, or a value signaled by the bitstream may be used.

본 발명의 일실시예에 따른 상기 에지 여부 판단은 코너 아웃라이어에 인접하는 블록들에 포함된 픽셀들로서, 상기 수평 블록 경계 및 수직 블록 경계에 인접한 픽셀들의 변화량을 상기 제3 문턱값과 비교할 수 있다. 예컨대, 코너 픽셀 B가 코너 아웃라이어로서 선택된 경우, 아래의 수학식 (3)을 이용하여 코너 픽셀 B에 인접하는 수평 블록 경계 및 수직 블록 경계가 이미지 영역의 에지인지 여부를 판단할 수 있다. According to an embodiment of the present invention, the determination of the edge may include comparing pixels of the pixels neighboring the corner outlier with pixels of the pixels adjacent to the horizontal block boundary and the vertical block boundary with the third threshold value . For example, when the corner pixel B is selected as the corner outlier, it is possible to determine whether the horizontal block boundary and the vertical block boundary adjacent to the corner pixel B are edges of the image area using Equation (3) below.

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

Figure pat00005
Figure pat00005

상기 수학식(3)에서, 코너 아웃라이어인 코너 픽셀 B에 인접하는 수평 블록 경계가 에지인지 여부를 판단하기 위해, 코너 픽셀 B에 인접하는 블록에 포함된 픽셀들로서, 상기 수평 블록 경계에 인접한 픽셀들 c1, C, D 및 d1이 사용될 수 있다. 상기 픽셀들(c1, C, D 및 d1)의 변화량으로서, 예컨대, 상기 픽셀들(c1, C, D 및 d1)의 픽셀값의 평균값과 픽셀 c1의 픽셀값의 차이값 및/또는 상기 픽셀들(c1, C, D 및 d1)의 픽셀값의 평균값과 픽셀 d1의 픽셀값의 차이값을 이용할 수 있다. 또는 상기 수평 블록 경계에 인접한 픽셀들 중 둘 이상의 픽셀값들의 차이값을 소정의 기준값과 비교하는 과정을 이용할 수도 있다. 상기 소정의 기준값은 영상의 특성에 기초하여 결정되거나, 시그널링 될 수 있다. 상기 픽셀들(c1, C, D 및 d1)의 변화량이 제3 문턱값인 QP/6보다 작으면, 상기 픽셀들(c1, C, D 및 d1)의 변화량이 작은 것으로 판단하고, 상기 픽셀들(c1, C, D 및 d1)이 인접한 수평 블록 경계는 이미지 영역의 에지인 것으로 판단할 수 있다.In order to determine whether the horizontal block boundary adjacent to the corner pixel B which is a corner outlier is an edge in the above equation (3), pixels included in a block adjacent to the corner pixel B are pixels adjacent to the horizontal block boundary The c1, C, D and d1 may be used. The difference value between the average value of the pixel values of the pixels c1, C, D and d1 and the pixel value of the pixel c1 and / or the difference value between the average value of the pixels c1, C, D and d1 and / the difference value between the average value of the pixel values of the pixels c1, c, d, and d1 and the pixel value of the pixel d1 can be used. Or comparing a difference value of two or more pixel values among pixels adjacent to the horizontal block boundary with a predetermined reference value. The predetermined reference value may be determined based on a characteristic of an image or may be signaled. If it is determined that the amount of change of the pixels (c1, C, D, and d1) is smaller than the third threshold value QP / 6, (c1, C, D, and d1) adjacent to each other may be an edge of the image area.

마찬가지로, 코너 아웃라이어인 코너 픽셀 B에 인접하는 수직 블록 경계가 에지인지 여부를 판단하기 위해, 코너 픽셀 B에 인접하는 블록에 포함된 픽셀들로서, 상기 수직 블록 경계에 인접한 픽셀들 a2, A, D 및 d2가 사용될 수 있다. 상기 픽셀들(a2, A, D 및 d2)의 변화량으로서, 예컨대, 상기 픽셀들(a2, A, D 및 d2)의 픽셀값의 평균값과 픽셀 a2의 픽셀값의 차이값 및/또는 상기 픽셀들(a2, A, D 및 d2)의 픽셀값의 평균값과 픽셀 d2의 픽셀값의 차이값을 이용할 수 있다. 또는 상기 수직 블록 경계에 인접한 픽셀들 중 둘 이상의 픽셀값들의 차이값을 소정의 기준값과 비교하는 과정을 이용할 수도 있다. 상기 소정의 기준값은 영상의 특성에 기초하여 결정되거나, 시그널링 될 수 있다. 상기 픽셀들(a2, A, D 및 d2)의 변화량이 제3 문턱값인 QP/6보다 작으면, 상기 픽셀들(a2, A, D 및 d2)의 변화량이 작은 것으로 판단하고, 상기 픽셀들(a2, A, D 및 d2)이 인접한 수직 블록 경계는 이미지 영역의 에지인 것으로 판단할 수 있다.Similarly, to determine whether the vertical block boundary adjacent to the corner pixel B, which is the corner outlier, is an edge, pixels included in the block adjacent to the corner pixel B are pixels a2, A, D And d2 may be used. The difference between the average value of the pixel values of the pixels a2, A, D and d2 and the pixel value of the pixel a2 and / or the difference between the average value of the pixels a2, A, D and d2 and / (a2, A, D and d2) and the difference value between the pixel value of the pixel d2 and the average value of the pixel values of the pixels a2, A, D and d2. Or comparing the difference value of two or more pixel values among the pixels adjacent to the vertical block boundary with a predetermined reference value. The predetermined reference value may be determined based on a characteristic of an image or may be signaled. A, D, and d2 is smaller when the amount of change of the pixels a2, A, D, and d2 is smaller than the third threshold value QP / 6, (a2, A, D, and d2) can determine that the adjacent vertical block boundary is the edge of the image area.

본 발명의 일실시예는 블록의 경계가 이미지 영역의 에지인지의 여부를 판단하기 위해 상기 수학식(3)을 이용하였으나, 이미지 영역의 에지 여부 판단에 관한 방법은 이에 한정되지 않으며, 다양한 방법이 적용될 수 있다.In the embodiment of the present invention, the above equation (3) is used to determine whether or not the boundary of the block is the edge of the image area. However, the method of determining whether the edge of the image area is edge is not limited to this, Can be applied.

S403 단계에서, 상기 수학식(3)에 의한 판단 결과, 코너 아웃라이어인 코너 픽셀 B에 인접하는 수평 블록 경계 또는 수직 블록 경계가 이미지 영역의 에지가 아닌 것으로 판단되면, S404 단계의 코너 아웃라이어 필터링을 수행할 수 있다.If it is determined in step S403 that the horizontal block boundary or the vertical block boundary adjacent to the corner pixel B that is the corner outlier is not the edge of the image area as a result of the determination in Equation (3), the corner outlier filtering Can be performed.

S403 단계에서, 상기 수학식(3)에 의한 판단 결과, 코너 아웃라이어인 코너 픽셀 B에 인접하는 수평 블록 경계 및 수직 블록 경계가 모두 이미지 영역의 에지에 해당하는 것으로 판단되면, 코너 픽셀 B에 대한 코너 아웃라이어 필터링 동작은 종료되거나, 아래 수학식(4)를 이용한 에지 판단을 추가적으로 더 수행할 수 있다. 아래 수학식(4)를 이용한 추가적인 에지 판단은 경우에 따라 수행되지 않을 수 있으며, 예컨대, 아래 수학식(4)를 이용한 추가적인 에지 판단의 생략 여부는 영상의 특성에 기초하여 결정되거나 시그널링되는 정보에 기초하여 결정될 수 있다.If it is determined in step S403 that both the horizontal block boundary and the vertical block boundary adjacent to the corner pixel B that are the corner outliers correspond to the edges of the image area as a result of the determination of Equation (3) The corner outlier filtering operation may be terminated or an edge determination using the following equation (4) may be further performed. The additional edge determination using Equation (4) below may not be performed in some cases. For example, whether to omit the additional edge determination using Equation (4) may be determined based on the characteristics of the image, Can be determined.

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

Figure pat00006
Figure pat00006

상기 수학식(4)에서, 코너 아웃라이어인 코너 픽셀 B와 이에 인접하는 코너 픽셀 A의 픽셀값의 차이가 제4 문턱값보다 작은지 여부를 판단한다. 상기 제4 문턱값은 양자화 파라미터에 기초하여 설정될 수 있다. 예컨대, 상기 인접한 4개의 블록(301, 302, 303, 304)의 양자화 파라미터 중 어느 하나일 수도 있고, 또는 상기 인접한 4개의 블록(301, 302, 303, 304)의 양자화 파라미터 중 최대값, 최소값, 최빈값, 중간값, 평균값, 가중평균값 및/또는 이들 값을 소정의 상수값으로 스케일링하여 유도되는 값을 제4 문턱값으로서 사용할 수도 있다. 상기 소정의 상수값은 고정된 값을 사용하거나 가변적일 수 있으며, 비트스트림에 포함되어 시그널링된 정보에 기초하여 획득될 수도 있다. 그러나, 제4 문턱값은 이에 한정되지 않으며, 영상의 특성 등에 따라 다른 값으로 설정하거나, 또는 비트스트림에 의해 시그널링되는 값을 사용할 수도 있다. 본 발명의 일실시예에 따르면, 상기 제4 문턱값은 예컨대, 상기 인접한 4개의 블록의 양자화 파라미터의 평균값의 1/2인 QP/2로 설정하여 사용할 수 있다. 그러나, 제4 문턱값은 이에 한정되지 않으며, 영상의 특성 등에 따라 다른 값으로 설정하거나, 또는 비트스트림에 의해 시그널링되는 값을 사용할 수도 있다. 전술한 본 발명의 일실시예에 사용된 제1 내지 제4 문턱값은 전부가 동일 또는 상이하거나, 일부가 동일 또는 상이할 수 있다.In Equation (4), it is determined whether the difference between the corner pixel B, which is the corner outlier, and the pixel value of the neighboring corner pixel A is smaller than the fourth threshold value. The fourth threshold value may be set based on the quantization parameter. The maximum value, the minimum value, and the minimum value of the quantization parameters of the four adjacent blocks 301, 302, 303, and 304 may be any one of the quantization parameters of the adjacent four blocks 301, 302, 303, A value derived by scaling the mode value, the intermediate value, the average value, the weighted average value, and / or these values to a predetermined constant value may be used as the fourth threshold value. The predetermined constant value may be a fixed value or may be variable and may be obtained based on the signaled information included in the bitstream. However, the fourth threshold value is not limited to this, and may be set to a different value depending on the characteristics of the image, or a value signaled by the bit stream may be used. According to an embodiment of the present invention, the fourth threshold value may be set to, for example, QP / 2 which is one-half the average value of the quantization parameters of the adjacent four blocks. However, the fourth threshold value is not limited to this, and may be set to a different value depending on the characteristics of the image, or a value signaled by the bit stream may be used. The first through fourth threshold values used in the above-described embodiment of the present invention may be all the same or different, or some of them may be the same or different.

상기 수학식(4)에서, 코너 아웃라이어인 코너 픽셀 B와 이에 인접하는 코너 픽셀 A의 픽셀값의 차이가 QP/2보다 작은지 여부를 판단한다. 코너 픽셀 B와 이에 인접하는 코너 픽셀 A의 픽셀값의 차이가 QP/2보다 작으면, 코너 픽셀 B에 인접한 수직 블록 경계는 이미지 영역의 에지인 것으로 최종 판단할 수 있다. In Equation (4), it is determined whether or not the difference between the corner pixel B, which is the corner outlier, and the neighboring corner pixel A, is smaller than QP / 2. If the difference between the corner pixel B and the neighboring corner pixel A pixel value is less than QP / 2, then the vertical block boundary adjacent to corner pixel B can be determined to be the edge of the image area.

마찬가지로, 상기 수학식(4)에서, 코너 아웃라이어인 코너 픽셀 B와 이에 인접하는 코너 픽셀 C의 픽셀값의 차이가 QP/2보다 작은지 여부를 판단한다. 코너 픽셀 B와 이에 인접하는 코너 픽셀 C의 픽셀값의 차이가 QP/2보다 작으면, 코너 픽셀 B에 인접한 수평 블록 경계는 이미지 영역의 에지인 것으로 최종 판단할 수 있다.Similarly, in Equation (4), it is determined whether or not the difference between the pixel value of the corner pixel B which is the corner outlier and the neighboring corner pixel C is smaller than QP / 2. If the difference between the pixel values of the corner pixels B and the neighboring corner pixels C is smaller than QP / 2, the horizontal block boundary adjacent to the corner pixels B can be finally determined to be the edge of the image area.

S403 단계에서, 수학식(3) 및/또는 수학식(4)에 의한 에지 판단 결과, 코너 픽셀 B에 인접한 수평 블록 경계와 수직 블록 경계가 모두 이미지 영역의 에지인 것으로 판단되면, S404 단계의 필터링을 수행하지 않고 종료할 수 있다.If it is determined in step S403 that both the horizontal block boundary and the vertical block boundary adjacent to the corner pixel B are edges of the image area as a result of the edge determination according to the equation (3) and / or the equation (4) Can be terminated without performing.

S403 단계에서, 수학식(3) 및/또는 수학식(4)에 의한 에지 판단 결과, 코너 픽셀 B에 인접한 수평 블록 경계 또는 수직 블록 경계가 이미지 영역의 에지가 아닌 것으로 판단되면, S404 단계로 진행하여, 코너 픽셀 B에 대한 코너 아웃라이어 필터링을 수행할 수 있다. 상술한 바와 같이, S401 단계 내지 S403 단계를 순차적으로 거쳐 필터링의 대상인 코너 아웃라이어를 결정할 수 있다. 다만, S401 단계 내지 S403 단계는 판단 순서를 한정한 것이 아니며, 발명의 본질이 유지되는 한도 내에서 판단 순서를 적응적으로 변경할 수도 있다. 또한, 필터링의 대상인 코너 아웃라이어는 S401 단계 내지 S403 단계 중 적어도 하나를 선택적으로 이용하여 결정될 수도 있다.If it is determined in step S403 that the horizontal block boundary or the vertical block boundary adjacent to the corner pixel B is not the edge of the image area as a result of edge determination according to equation (3) and / or equation (4) To perform corner outlier filtering for the corner pixel B, as shown in FIG. As described above, it is possible to sequentially determine the corner outliers to be filtered through steps S401 to S403. However, the steps S401 to S403 are not limited to the determination order, and the determination order may be changed adaptively to the extent that the essence of the invention is maintained. Further, the corner outlier, which is the object of filtering, may be determined by selectively using at least one of steps S401 to S403.

코너 아웃라이어 및 이에 인접하는 픽셀에 대한 필터링은 인접한 픽셀들과의 차이를 감소시키는 방향으로 수행될 수 있으며, 예컨대, 다른 블록에 속하는 인접 코너 픽셀들과의 픽셀값의 차이를 감소시키는 방향으로 수행될 수 있다. 본 발명의 일실시예에 따르면, 예컨대, 아래 수학식(5)를 이용하여 필터링을 수행할 수 있다. The filtering for the corner outlier and neighboring pixels may be performed in a direction to reduce a difference from adjacent pixels and may be performed in a direction to reduce a difference between pixel values of neighboring corner pixels belonging to another block . According to an embodiment of the present invention, for example, filtering can be performed using the following equation (5).

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

Figure pat00007
Figure pat00007

상기 수학식(5)에서, A, B, C, D, b1, b2는 각각 도 3(c)에 도시된 위치의 픽셀의 픽셀값을 의미하며, B', b1', b2'는 각각 도 3(c)에서 B, b1, b2의 위치의 픽셀값을 필터링한 값을 의미한다. 상기 필터링되는 픽셀은 코너 아웃라이어 및 이에 수평, 수직 및/또는 대각선으로 인접하는 픽셀을 포함할 수 있다. 필터링에 사용되는 필터링 계수는 부호화기/복화화기가 이미 알고 있는 정해진 값을 사용할 수도 있으며, 필터링의 계수를 영상의 특성에 기초하여 유도하거나, 필터링의 계수에 관한 정보가 시그널링 될 수도 있다. 필터링은 반드시 예측, 양자화 및/또는 변환 블록의 경계에 대해서만 수행되는 것은 아니며, 예컨대, 8x8, 16x16, 32x32, 64x64 블록의 경계와 같이 소정의 크기를 갖는 블록의 경계에 대해서만 수행될 수도 있다. 필터링이 수행되는 블록의 유형 및/또는 크기에 관한 정보는 부호화기/복호화기가 이미 알고 있는 정보를 이용할 수도 있고, 또는 영상의 특성에 기초하여 결정되거나, 그에 관한 정보가 시그널링 될 수도 있다.In the above equation (5), A, B, C, D, b1 and b2 respectively denote the pixel values of the pixels at the positions shown in FIG. 3 (c), and B ', b1' and b2 ' 3 (c) is a value obtained by filtering pixel values at positions of B, b1, and b2. The filtered pixels may include corner outliers and pixels that are horizontally, vertically and / or diagonally adjacent to the corner outliers. The filtering coefficients used for filtering may use predetermined values already known by the encoder / decoder, derive the coefficients of the filtering based on the characteristics of the image, or information about the coefficients of the filtering may be signaled. The filtering is not necessarily performed only on the boundary of the prediction, quantization and / or conversion block, and may be performed only on the boundary of the block having a predetermined size, for example, the boundary of 8x8, 16x16, 32x32, 64x64 blocks. Information about the type and / or size of the block on which filtering is performed may be based on information already known by the encoder / decoder, or may be determined based on characteristics of the image, or information on the information may be signaled.

Claims (24)

블록 단위로 복호화된 비디오 신호에 포함되는 4개의 블록들의 코너가 하나의 교차점에서 서로 인접할 때, 상기 교차점에 인접하는 4개의 코너 픽셀들 중, 하나의 코너 픽셀을 코너 아웃라이어(Corner outlier)로서 선택하는 단계; 및
상기 코너 아웃라이어를 필터링하는 단계를 포함하며,
상기 코너 아웃라이어 선택 단계는, 상기 교차점에 인접하는 4개의 코너 픽셀들의 픽셀값들 사이의 차이값과 제1 문턱값을 이용하는 것을 특징으로 하는 비디오 신호 처리 방법.
When the corners of the four blocks included in the video signal decoded in the block unit are adjacent to each other at one intersection point, one corner pixel out of the four corner pixels adjacent to the intersection point is regarded as a corner outlier Selecting; And
Filtering the corner outlier,
Wherein the corner outlier selecting step uses a difference value and a first threshold value between pixel values of four corner pixels adjacent to the intersection point.
제1 항에 있어서,
상기 제1 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 처리 방법.
The method according to claim 1,
Wherein the first threshold value is determined based on a quantization parameter of the four blocks.
제1 항에 있어서,
상기 코너 아웃라이어 선택 단계에서 선택된 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어와의 유사도를 판단하는 단계를 더 포함하고,
상기 필터링 단계는, 상기 유사도 판단에 기초하여 수행되는 것을 특징으로 하는 비디오 신호 처리 방법.
The method according to claim 1,
Further comprising the step of determining a degree of similarity between the corner outlier and pixels adjacent to the corner outlier included in the same block as the corner outlier selected in the corner outlier selecting step,
Wherein the filtering step is performed based on the similarity determination.
제3 항에 있어서,
상기 유사도 판단 단계는, 상기 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어의 픽셀값들 사이의 차이값과 제2 문턱값을 이용하는 것을 특징으로 하는 비디오 신호 처리 방법.
The method of claim 3,
Wherein the similarity determination step uses a difference value between a pixel value of the corner outlier and a pixel included in the same block as the corner outlier and the pixel value of the corner outlier and a second threshold value. Processing method.
제4 항에 있어서,
상기 제2 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 처리 방법.
5. The method of claim 4,
Wherein the second threshold value is determined based on a quantization parameter of the four blocks.
제1 항에 있어서,
상기 코너 아웃라이어 선택 단계에서 선택된 코너 아웃라이어에 인접하는 블록 경계가 이미지 영역의 에지인지 여부를 판단하는 단계를 더 포함하고,
상기 필터링 단계는, 상기 블록 경계가 이미지 영역의 에지인지 여부의 판단에 기초하여 수행되는 것을 특징으로 하는 비디오 신호 처리 방법.
The method according to claim 1,
Further comprising the step of determining whether a block boundary adjacent to the corner outlier selected in the corner outlier selecting step is an edge of the image area,
Wherein the filtering step is performed based on a determination of whether the block boundary is an edge of an image area.
제6 항에 있어서,
상기 블록 경계가 이미지 영역의 에지인지 여부의 판단은, 상기 코너 아웃라이어에 인접한 블록내의 픽셀들로서, 상기 블록 경계에 인접하는 픽셀들의 픽셀값들 사이의 변화량과 제3 문턱값을 이용하는 제1 에지 판단 단계를 포함하는 것을 특징으로 하는 비디오 신호 처리 방법.
The method according to claim 6,
Wherein the determination of whether the block boundary is an edge of the image area comprises determining a first edge determination using a third threshold value and a change amount between pixel values of pixels adjacent to the block boundary, The method comprising the steps of:
제7 항에 있어서
상기 제3 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 처리 방법.
The method of claim 7, wherein
Wherein the third threshold value is determined based on a quantization parameter of the four blocks.
제7 항에 있어서,
상기 블록 경계가 이미지 영역의 에지인지 여부의 판단은, 상기 코너 아웃라이어에 수평 또는 수직으로 인접한 코너 픽셀과 상기 코너 아웃라이어의 픽셀값들 사이의 차이값과 제4 문턱값을 이용하는 제2 에지 판단 단계를 더 포함하는 것을 특징으로 하는 비디오 신호 처리 방법.
8. The method of claim 7,
Wherein the determination of whether the block boundary is an edge of an image area comprises determining a second edge determination using a difference value between a corner pixel horizontally or vertically adjacent to the corner outlier and a pixel value of the corner outlier and a fourth threshold value, ≪ / RTI >
제9 항에 있어서,
상기 제4 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 처리 방법.
10. The method of claim 9,
Wherein the fourth threshold value is determined based on a quantization parameter of the four blocks.
제1 항 내지 제10 항 중 어느 한 항에 있어서,
상기 필터링 단계는, 상기 교차점에 인접하는 4개의 코너 픽셀들의 가중 평균값을 상기 코너 아웃라이어의 필터링된 픽셀값으로 설정하는 것을 특징으로 하는 비디오 신호 처리 방법.
11. The method according to any one of claims 1 to 10,
Wherein the filtering step sets a weighted average value of four corner pixels adjacent to the intersection point to a filtered pixel value of the corner outlier.
제1 항 내지 제10 항 중 어느 한 항에 있어서,
상기 필터링 단계는, 상기 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀에 대한 필터링을 포함하는 것을 특징으로 하는 비디오 신호 처리 방법.
11. The method according to any one of claims 1 to 10,
Wherein the filtering comprises filtering for pixels adjacent to the corner outlier included in the same block as the corner outlier.
블록 단위로 복호화된 비디오 신호에 포함되는 4개의 블록들의 코너가 하나의 교차점에서 서로 인접할 때, 상기 교차점에 인접하는 4개의 코너 픽셀들 중, 하나의 코너 픽셀을 코너 아웃라이어(Corner outlier)로서 선택하고, 상기 코너 아웃라이어를 필터링하는 코너 아웃라이어 필터를 포함하며,
상기 코너 아웃라이어의 선택은, 상기 교차점에 인접하는 4개의 코너 픽셀들의 픽셀값들 사이의 차이값과 제1 문턱값을 이용하는 것을 특징으로 하는 비디오 신호 처리 장치.
When the corners of the four blocks included in the video signal decoded in the block unit are adjacent to each other at one intersection point, one corner pixel out of the four corner pixels adjacent to the intersection point is regarded as a corner outlier And a corner outlier filter for filtering the corner outlier,
Wherein the selection of the corner outlier uses a difference value and a first threshold value between pixel values of four corner pixels adjacent to the intersection point.
제13 항에 있어서,
상기 제1 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 처리 장치.
14. The method of claim 13,
Wherein the first threshold value is determined based on a quantization parameter of the four blocks.
제13 항에 있어서,
상기 코너 아웃라이어 필터는,
상기 선택된 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어와의 유사도를 더 판단하고,
상기 필터링은, 상기 유사도 판단에 기초하여 수행되는 것을 특징으로 하는 비디오 신호 처리 장치.
14. The method of claim 13,
Wherein the corner outlier filter comprises:
Determining a degree of similarity between pixels adjacent to the corner outlier and the corner outlier included in the same block as the selected corner outlier,
Wherein the filtering is performed based on the similarity determination.
제15 항에 있어서,
상기 유사도 판단은, 상기 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀과 상기 코너 아웃라이어의 픽셀값들 사이의 차이값과 제2 문턱값을 이용하는 것을 특징으로 하는 비디오 신호 처리 장치.
16. The method of claim 15,
Wherein the degree of similarity determination is performed using a difference value between a pixel adjacent to the corner outlier and a pixel value of the corner outlier and a second threshold value included in the same block as the corner outlier, Device.
제16 항에 있어서,
상기 제2 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 처리 장치.
17. The method of claim 16,
And the second threshold value is determined based on a quantization parameter of the four blocks.
제13 항에 있어서,
상기 코너 아웃라이어 필터는,
상기 선택된 코너 아웃라이어에 인접하는 블록 경계가 이미지 영역의 에지인지 여부를 더 판단하고,
상기 필터링은, 상기 블록 경계가 이미지 영역의 에지인지 여부의 판단에 기초하여 수행되는 것을 특징으로 하는 비디오 신호 처리 장치.
14. The method of claim 13,
Wherein the corner outlier filter comprises:
Further determining whether a block boundary adjacent to the selected corner outlier is an edge of an image area,
Wherein the filtering is performed based on a determination of whether the block boundary is an edge of an image area.
제18 항에 있어서,
상기 블록 경계가 이미지 영역의 에지인지 여부의 판단은, 상기 코너 아웃라이어에 인접한 블록내의 픽셀들로서, 상기 블록 경계에 인접하는 픽셀들의 픽셀값들 사이의 변화량과 제3 문턱값을 이용하는 제1 에지 판단을 포함하는 것을 특징으로 하는 비디오 신호 처리 장치.
19. The method of claim 18,
Wherein the determination of whether the block boundary is an edge of the image area comprises determining a first edge determination using a third threshold value and a change amount between pixel values of pixels adjacent to the block boundary, And a video signal processor for processing the video signal.
제19 항에 있어서
상기 제3 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 처리 장치.
The method of claim 19, wherein
Wherein the third threshold value is determined based on a quantization parameter of the four blocks.
제19 항에 있어서,
상기 블록 경계가 이미지 영역의 에지인지 여부의 판단은, 상기 코너 아웃라이어에 수평 또는 수직으로 인접한 코너 픽셀과 상기 코너 아웃라이어의 픽셀값들 사이의 차이값과 제4 문턱값을 이용하는 제2 에지 판단을 더 포함하는 것을 특징으로 하는 비디오 신호 처리 장치.
20. The method of claim 19,
Wherein the determination of whether the block boundary is an edge of an image area comprises determining a second edge determination using a difference value between a corner pixel horizontally or vertically adjacent to the corner outlier and a pixel value of the corner outlier and a fourth threshold value, The video signal processing apparatus further comprising:
제21 항에 있어서,
상기 제4 문턱값은 상기 4개의 블록들의 양자화 파라미터에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 처리 장치.
22. The method of claim 21,
Wherein the fourth threshold value is determined based on a quantization parameter of the four blocks.
제13 항 내지 제22 항 중 어느 한 항에 있어서,
상기 필터링은, 상기 교차점에 인접하는 4개의 코너 픽셀들의 가중 평균값을 상기 코너 아웃라이어의 필터링된 픽셀값으로 설정하는 것을 특징으로 하는 비디오 신호 처리 장치.
24. The method according to any one of claims 13 to 22,
Wherein the filtering sets a weighted average value of four corner pixels adjacent to the intersection point as a filtered pixel value of the corner outlier.
제13 항 내지 제22 항 중 어느 한 항에 있어서,
상기 필터링은, 상기 코너 아웃라이어와 동일 블록 내에 포함되며 상기 코너 아웃라이어에 인접하는 픽셀에 대한 필터링을 포함하는 것을 특징으로 하는 비디오 신호 처리 장치.
24. The method according to any one of claims 13 to 22,
Wherein the filtering includes filtering for pixels adjacent to the corner outlier included in the same block as the corner outlier.
KR1020160079137A 2016-06-24 2016-06-24 Method and apparatus for processing a video signal KR20180000886A (en)

Priority Applications (10)

Application Number Priority Date Filing Date Title
KR1020160079137A KR20180000886A (en) 2016-06-24 2016-06-24 Method and apparatus for processing a video signal
CN202311027861.4A CN116781902A (en) 2016-06-24 2017-06-23 Video signal decoding and encoding method, and bit stream transmission method
CN201780039316.3A CN109479131B (en) 2016-06-24 2017-06-23 Video signal processing method and device
PCT/KR2017/006634 WO2017222331A1 (en) 2016-06-24 2017-06-23 Video signal processing method and device
CN202311031996.8A CN116828178A (en) 2016-06-24 2017-06-23 Video signal decoding and encoding method, and bit stream transmission method
CN202311031020.0A CN116828177A (en) 2016-06-24 2017-06-23 Video signal decoding and encoding method, and bit stream transmission method
US16/312,677 US20190327476A1 (en) 2016-06-24 2017-06-23 Video signal processing method and device
CN202311028575.XA CN116781903A (en) 2016-06-24 2017-06-23 Video signal decoding and encoding method, and bit stream transmission method
US17/070,956 US20210058646A1 (en) 2016-06-24 2020-10-15 Video signal processing method and device
US17/716,301 US20220272390A1 (en) 2016-06-24 2022-04-08 Video signal decoding/encoding method and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160079137A KR20180000886A (en) 2016-06-24 2016-06-24 Method and apparatus for processing a video signal

Publications (1)

Publication Number Publication Date
KR20180000886A true KR20180000886A (en) 2018-01-04

Family

ID=60998008

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160079137A KR20180000886A (en) 2016-06-24 2016-06-24 Method and apparatus for processing a video signal

Country Status (1)

Country Link
KR (1) KR20180000886A (en)

Similar Documents

Publication Publication Date Title
KR101883932B1 (en) Intra prediction method and apparatus using the method
JP7416781B2 (en) Video signal encoding/decoding method and equipment
KR20170026276A (en) Method and apparatus for processing a video signal
KR20170108367A (en) Method and apparatus for processing a video signal based on intra prediction
KR20170116850A (en) Method and apparatus for processing a video signal based on intra prediction
JP2024045337A (en) Video signal encoding/decoding method and apparatus for said method
JP7449279B2 (en) Video signal encoding/decoding method and equipment therefor
KR20200028860A (en) Method and apparatus for encoding/decoding an image using intra prediction
KR20230054805A (en) A method of decoding a video signal and an apparatus having the same
KR20200078391A (en) Method for encodign/decodign video signal and apparatus therefor
KR20180032775A (en) Method and apparatus for processing a video signal based on adaptive block patitioning
KR101802375B1 (en) Methods of derivation of temporal motion vector predictor and appratuses using the same
KR101743665B1 (en) Method and apparatus for processing a video signal based on intra prediction
KR20180096194A (en) Apparatus for coding and decoding a transform coefficient, and coding device and decoding device for the same
KR102525555B1 (en) A method and an apparatus for encoding/decoding a residual block based on quantization parameter
KR102523384B1 (en) A method of decoding a video signal and an apparatus having the same
KR20170125297A (en) Method and apparatus for coding image compensation information and decoding using the same
KR20180000886A (en) Method and apparatus for processing a video signal
KR102410326B1 (en) Method and apparatus for encoding/decoding a video signal
KR101981687B1 (en) Method and apparatus for coding offset information and decoding using the same
KR102125969B1 (en) Intra prediction method and apparatus using the method
KR20210118768A (en) Method of processing a video and device therefor
KR101348566B1 (en) Methods of decision of candidate block on inter prediction and appratuses using the same
KR20130139811A (en) Methods of decision of candidate block on inter prediction and appratuses using the same
KR20120100742A (en) Methods of coding usnig skip mode and apparatuses for using the same

Legal Events

Date Code Title Description
A201 Request for examination