KR20220130067A - Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same - Google Patents

Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same Download PDF

Info

Publication number
KR20220130067A
KR20220130067A KR1020220115953A KR20220115953A KR20220130067A KR 20220130067 A KR20220130067 A KR 20220130067A KR 1020220115953 A KR1020220115953 A KR 1020220115953A KR 20220115953 A KR20220115953 A KR 20220115953A KR 20220130067 A KR20220130067 A KR 20220130067A
Authority
KR
South Korea
Prior art keywords
sample
samples
filtering
block
sides
Prior art date
Application number
KR1020220115953A
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
Priority claimed from KR1020120039422A external-priority patent/KR20120125160A/en
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Publication of KR20220130067A publication Critical patent/KR20220130067A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop
    • 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/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for 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/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/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Landscapes

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

Abstract

The present invention relates to a video encoding/decoding method and, more specifically, to a method of performing error-resilient in-loop filtering and a signaling method for the same. According to one embodiment of the present invention, the video decoding method comprises: a step of determining whether a constrained intra prediction (CIP) mode is used; a step of determining decoding parameters of blocks positioned on both sides of a boundary to be filtered; and a step of determining whether to apply an in-loop filter to samples positioned on both sides of the boundary to be filtered based on the decoding parameters of the blocks positioned on both sides of the boundary to be filtered and whether the constrained intra prediction mode is used.

Description

에러에 강인한 인-루프 필터를 이용하는 영상 부호화/복호화 방법과 그에 관한 시그널링 방법{VIDEO ENCODING/DECODING METHOD USING ERROR-RESILIENT IN-LOOP FILTER AND SIGNALING METHOD RELATING TO THE SAME}A video encoding/decoding method using an error-tolerant in-loop filter and a signaling method related thereto

본 발명은 영상 부호화/복호화 방법에 관한 것으로, 더욱 자세하게는 에러에 강인한 인-루프 필터링을 수행하는 방법과 이를 위한 시그널링 방법에 관한 것이다.The present invention relates to an image encoding/decoding method, and more particularly, to a method for performing in-loop filtering that is robust against errors and a signaling method therefor.

최근 HD(High Definition) 해상도를 지원하는 방송 시스템이 국내뿐만 아니라 세계적으로 확대되면서, 많은 사용자가 고해상도, 고화질의 영상에 익숙해지고 있으며, 이에 따라 많은 기관들이 차세대 영상기기에 대한 개발에 박차를 가하고 있다. 또한, HDTV와 더불어 HDTV의 4배 이상의 해상도를 지원하는 UHD(Ultra High Definition)에 대한 관심이 증대되면서, 더욱 높은 해상도, 고화질의 영상에 대한 압축 기술이 요구되고 있다.Recently, as broadcasting systems supporting HD (High Definition) resolution have been expanded not only in Korea but also worldwide, many users are getting used to high-resolution and high-definition video, and accordingly, many organizations are spurring the development of next-generation video equipment. . In addition, as interest in Ultra High Definition (UHD), which supports a resolution four times higher than that of HDTV along with HDTV, increases, a compression technology for higher resolution and high-definition images is required.

영상의 압축을 위해, 선행하는 픽쳐 및/또는 뒤에 나오는 픽쳐로부터 현재 픽쳐에 포함된 픽셀 값을 예측하는 인터(inter) 예측 기술, 픽쳐 내의 픽셀 정보를 이용하여 픽셀 값을 예측하는 인트라(intra) 예측 기술, 출현 빈도가 높은 심볼(symbol)에 짧은 부호를 할당하고 출현 빈도가 낮은 심볼에 긴 부호를 할당하는 엔트로피 부호화 기술 등이 사용될 수 있다.For image compression, an inter prediction technique that predicts a pixel value included in a current picture from a preceding picture and/or a subsequent picture, and intra prediction that predicts a pixel value using pixel information in a picture technology, an entropy encoding technique in which a short code is assigned to a symbol having a high frequency of occurrence and a long code is assigned to a symbol having a low frequency of occurrence, or the like may be used.

본 발명의 목적은 에러에 강인한 인-루프 필터링을 이용한 영상 부호화/복호화 방법 및 그 장치를 제공함에 있다.An object of the present invention is to provide a method and apparatus for encoding/decoding an image using in-loop filtering that is robust against errors.

본 발명의 다른 목적은 제한된 인트라 예측(Constrained Intra Prediction: CIP) 모드의 사용 여부와 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반하여 인-루프 필터링을 수행하는 방법을 제공함에 있다.Another object of the present invention is to provide a method of performing in-loop filtering based on whether a constrained intra prediction (CIP) mode is used and encoding parameters of blocks located on both sides of a filtering target boundary.

[1] 본 발명의 일 실시예에 따르면 영상 부호화 방법이 제공된다. 상기 영상 부호화 방법은 제한된 인트라 예측(Constrained Intra Prediction: CIP) 모드의 사용 여부를 판별하는 단계, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들을 판별하는 단계 및 제한된 인트라 예측 모드의 사용 여부와 부호화 파라미터들에 기반하여 필터링 대상 경계의 양측에 위치하는 샘플들에 대한 인-루프 필터의 적용 여부를 결정하는 단계를 포함한다.[1] According to an embodiment of the present invention, an image encoding method is provided. The video encoding method includes determining whether a constrained intra prediction (CIP) mode is used, determining encoding parameters of blocks located on both sides of a filtering target boundary, and whether to use and encoding a constrained intra prediction mode and determining whether to apply the in-loop filter to samples located on both sides of a filtering target boundary based on the parameters.

[2] [1]에 있어서, 인-루프 필터는 디블록킹 필터일 수 있다.[2] The in-loop filter of [1] may be a deblocking filter.

[3] [2]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용하지 않을 수 있다.[3] In [2], when the encoding parameters of blocks located on both sides of the boundary to be filtered indicate that all blocks located on both sides of the boundary to be filtered are blocks coded in the inter prediction mode, on both sides of the boundary to be filtered A deblocking filter may not be applied to located samples.

[4] [2]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들 중 인트라 예측 모드로 부호화된 블록에 속하는 샘플들에 디블록킹 필터를 적용하지 않고, 필터링 대상 경계의 양측에 위치하는 샘플들 중 인터 예측 모드로 부호화된 블록에 속하는 샘플들에 디블록킹 필터를 적용할 수 있다.[4] The filtering target according to [2], when the encoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks coded in the intra prediction mode and the inter prediction mode, respectively A sample belonging to a block encoded in the inter prediction mode among samples located on both sides of the boundary to be filtered without applying a deblocking filter to samples belonging to the block encoded in the intra prediction mode among samples located on both sides of the boundary A deblocking filter can be applied to

[5] [2]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용하지 않을 수 있다.[5] The filtering target according to [2], when the encoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks coded in the intra prediction mode and the inter prediction mode, respectively The deblocking filter may not be applied to samples located on both sides of the boundary.

[6] 본 발명의 다른 일 실시예에 따르면 영상 복호화 방법이 제공된다. 상기 영상 복호화 방법은 제한된 인트라 예측(Constrained Intra Prediction: CIP) 모드의 사용 여부를 판별하는 단계, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들을 판별하는 단계 및 제한된 인트라 예측 모드의 사용 여부와 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들에 기반하여 필터링 대상 경계의 양측에 위치하는 샘플들에 대한 인-루프 필터의 적용 여부를 결정하는 단계를 포함한다.[6] According to another embodiment of the present invention, an image decoding method is provided. The image decoding method includes the steps of determining whether to use a constrained intra prediction (CIP) mode, determining decoding parameters of blocks located on both sides of a filtering target boundary, and whether to use and filtering the constrained intra prediction mode and determining whether to apply the in-loop filter to samples located on both sides of the filtering target boundary based on the decoding parameters of blocks located on both sides of the target boundary.

[7] [6]에 있어서, 인-루프 필터는 디블록킹 필터일 수 있다.[7] In [6], the in-loop filter may be a deblocking filter.

*[8] [7]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인트라 예측 모드로 복호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용할 수 있다.* [8] In [7], when the decoding parameters of blocks located on both sides of the boundary to be filtered indicate that all blocks located on both sides of the boundary to be filtered are blocks decoded in the intra prediction mode, both sides of the boundary to be filtered A deblocking filter may be applied to samples located in .

[9] [7]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용하지 않을 수 있다.[9] In [7], when the decoding parameters of blocks located on both sides of the boundary to be filtered indicate that all blocks located on both sides of the boundary to be filtered are blocks decoded in the inter prediction mode, on both sides of the boundary to be filtered A deblocking filter may not be applied to located samples.

[10] [7]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용할 수 있다.[10] In [7], when the decoding parameters of blocks located on both sides of the filtering target boundary indicate that all blocks located on both sides of the filtering target boundary are blocks decoded in the inter prediction mode, on both sides of the filtering target boundary A deblocking filter may be applied to located samples.

[11] [7]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들 중 인트라 예측 모드로 복호화된 블록에 속하는 샘플들에 디블록킹 필터를 적용하지 않고, 필터링 대상 경계의 양측에 위치하는 샘플들 중 인터 예측 모드로 복호화된 블록에 속하는 샘플들에 디블록킹 필터를 적용할 수 있다.[11] The filtering target according to [7], when the decoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks decoded in the intra prediction mode and the inter prediction mode, respectively A sample belonging to a block decoded in inter prediction mode among samples located on both sides of a filtering target boundary without applying a deblocking filter to samples belonging to a block decoded in the intra prediction mode among samples located on both sides of the boundary A deblocking filter can be applied to

[12] [7]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용할 수 않을 수 있다.[12] The filtering target according to [7], when the decoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks decoded in the intra prediction mode and the inter prediction mode, respectively The deblocking filter may not be applied to samples located on both sides of the boundary.

[13] 본 발명의 또 다른 일 실시예에 따르면 영상 복호화 방법이 제공된다. 상기 영상 복호화 방법은 제한된 디블록킹 필터의 사용 여부를 나타내는 지시자를 파싱하는 단계, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들을 판별하는 단계 및 제한된 디블록킹 필터의 사용 여부를 나타내는 지시자와 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들에 기반하여 필터링 대상 경계의 양측에 위치하는 샘플들에 대한 디블록킹 필터의 적용 여부를 결정하는 단계를 포함한다.[13] Another embodiment of the present invention provides a video decoding method. The image decoding method includes parsing an indicator indicating whether a restricted deblocking filter is used or not, determining decoding parameters of blocks located on both sides of a filtering target boundary, and an indicator indicating whether to use a restricted deblocking filter and a filtering target and determining whether to apply a deblocking filter to samples located on both sides of a filtering target boundary based on decoding parameters of blocks located on both sides of the boundary.

[14] [13]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들 중 인트라 예측 모드로 복호화된 블록에 속하는 샘플들에 디블록킹 필터를 적용하지 않고, 필터링 대상 경계의 양측에 위치하는 샘플들 중 인터 예측 모드로 복호화된 블록에 속하는 샘플들에 디블록킹 필터를 적용할 수 있다.[14] The filtering target according to [13], when the decoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks decoded in the intra prediction mode and the inter prediction mode, respectively A sample belonging to a block decoded in inter prediction mode among samples located on both sides of a filtering target boundary without applying a deblocking filter to samples belonging to a block decoded in the intra prediction mode among samples located on both sides of the boundary A deblocking filter can be applied to

[15] [13]에 있어서, 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용할 수 않을 수 있다.[15] The filtering target according to [13], when the decoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks decoded in the intra prediction mode and the inter prediction mode, respectively The deblocking filter may not be applied to samples located on both sides of the boundary.

본 발명에 따르면, 에러에 강인한 인-루프 필터링을 수행할 수 있다.According to the present invention, it is possible to perform error-tolerant in-loop filtering.

본 발명에 따르면, 인터 예측 모드로 부호화된 영역을 정상적으로 복원할 수 없는 경우에도, 인트라 예측 모드로 부호화된 블록을 정상적으로 복호화할 수 있다.According to the present invention, even when a region coded in the inter prediction mode cannot be normally reconstructed, a block coded in the intra prediction mode can be normally decoded.

본 발명에 따르면, 인트라 예측 모드로 부호화된 영역의 복원 결과가 부호화기 및 복호화기에서 동일하도록 유지할 수 있다.According to the present invention, it is possible to maintain the same restoration result of the region coded in the intra prediction mode in the encoder and the decoder.

도 1은 영상 부호화기의 구조의 일 예를 나타내는 블록도이다.
도 2는 영상 복호화기의 구조의 일 예를 나타내는 블록도이다.
도 3은 본 발명의 일 실시예에 따른 인-루프 필터링 방법(부호화)을 나타낸 흐름도이다.
도 4는 제한된 인트라 예측이 수행되는 일 예를 나타내는 개념도이다.
도 5는 제한된 인트라 예측 모드로 부호화된 블록에 대한 인-루프 필터링을 수행하는 방법을 나타낸 흐름도이다.
도 6은 필터링 대상 경계의 양측에 위치하는 블록이 모두 인트라 예측 모드로 부호화된 일 예를 나타낸다.
도 7은 필터링 대상 경계의 양측에 위치하는 블록이 모두 인터 예측 모드로 부호화된 일 예를 나타낸다.
도 8 및 도 9는 필터링 대상 경계의 양측에 위치하는 블록이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 일 예를 나타낸다.
도 10은 CIP 모드 및 PCM 모드의 사용 여부와 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반한 디블록킹 필터링을 수행하는 방법을 나타낸 흐름도이다.
도 11은 본 발명의 일 실시예에 따른 인-루프 필터링 방법(복호화)을 나타낸 흐름도이다.
도 12는 본 발명의 일 실시예에 따른 영상 부호화 방법을 나타낸 흐름도이다.
도 13은 본 발명의 일 실시예에 따른 영상 복호화 방법을 나타낸 흐름도이다.
1 is a block diagram illustrating an example of the structure of an image encoder.
2 is a block diagram illustrating an example of the structure of an image decoder.
3 is a flowchart illustrating an in-loop filtering method (coding) according to an embodiment of the present invention.
4 is a conceptual diagram illustrating an example in which limited intra prediction is performed.
5 is a flowchart illustrating a method of performing in-loop filtering on a block coded in a restricted intra prediction mode.
6 shows an example in which blocks located on both sides of a filtering target boundary are encoded in the intra prediction mode.
7 illustrates an example in which blocks located on both sides of a filtering target boundary are encoded in the inter prediction mode.
8 and 9 show an example in which blocks located on both sides of a filtering target boundary are encoded in an intra prediction mode and an inter prediction mode, respectively.
10 is a flowchart illustrating a method of performing deblocking filtering based on whether CIP mode and PCM mode are used and encoding parameters of blocks located on both sides of a filtering target boundary.
11 is a flowchart illustrating an in-loop filtering method (decoding) according to an embodiment of the present invention.
12 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.
13 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명하기로 한다. 단, 본 발명의 실시예를 설명함에 있어서, 공지의 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. However, in describing the embodiment of the present invention, if it is determined that a detailed description of a well-known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.

어떤 구성 요소가 다른 구성 요소에 "연결되어" 있거나 "접속되어" 있다고 서술되어 있는 경우, 다른 구성 요소에 직접 연결되어 있거나, 접속되어 있을 수 있으나, 또 다른 구성요소가 중간에 존재할 수도 있다. 또한, 본 발명에서 특정 구성 요소를 "포함"한다고 서술되어 있는 경우, 해당 구성 요소 이외의 구성 요소를 배제하는 것이 아니라, 추가적인 구성 요소가 본 발명의 실시예 또는 기술적 사상의 범위에 포함될 수 있음을 의미한다.When a component is described as being “connected” or “connected” to another component, it may be directly connected or connected to the other component, but another component may exist in the middle. In addition, when it is stated that a specific component is "included" in the present invention, it does not exclude components other than the corresponding component, but additional components may be included in the scope of the embodiment or technical spirit of the present invention. it means.

"제 1", "제 2" 등의 용어는 다양한 구성 요소들을 설명하는데 사용될 수 있지만, 상기 구성 요소들은 상기 용어들에 의해 한정되지 않는다. 즉, 상기 용어 들은 하나의 구성 요소를 다른 구성 요소로부터 구별하는 목적으로만 사용된다. 따라서, 제 1 구성 요소는 제 2 구성 요소로 명명될 수 있고, 마찬가지로 제 2 구성요소도 제 1 구성 요소로 명명될 수 있다.Terms such as “first” and “second” may be used to describe various elements, but the elements are not limited by the terms. That is, the above terms are used only for the purpose of distinguishing one component from another component. Accordingly, a first component may be termed a second component, and likewise the second component may also be termed a first component.

또한, 본 발명의 실시예에 나타나는 구성 요소는 서로 다른 특징적인 기능을 수행하는 것을 나타내기 위해 독립적으로 도시될 뿐, 각 구성 요소가 하나의 하드웨어 또는 소프트웨어로 구현될 수 없음을 의미하는 것은 아니다. 즉, 각 구성 요소는 설명의 편의상 구분된 것으로, 복수의 구성 요소가 합쳐져 하나의 구성 요소로 동작하거나, 하나의 구성 요소가 복수의 구성 요소로 나뉘어져 동작할 수 있고, 이는 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리 범위로 포함된다.In addition, the components shown in the embodiment of the present invention are shown independently to indicate that they perform different characteristic functions, and it does not mean that each component cannot be implemented as one piece of hardware or software. That is, each component is divided for convenience of description, and a plurality of components may be combined to operate as one component, or one component may be divided into a plurality of components to operate, which does not deviate from the essence of the present invention. Unless otherwise specified, it is included within the scope of the present invention.

또한, 일부 구성 요소는 본 발명의 본질적인 기능을 수행하는 필수 구성 요소가 아닌 성능의 향상을 위한 선택적 구성 요소일 수 있다. 본 발명은 선택적 구성 요소를 제외하고 필수 구성 요소만을 포함한 구조로도 구현될 수 있으며, 필수 구성 요소만을 포함한 구조 역시 본 발명의 권리 범위에 포함된다.In addition, some components may be optional components for improving performance rather than essential components performing essential functions of the present invention. The present invention may be implemented as a structure including only essential components except for optional components, and a structure including only essential components is also included in the scope of the present invention.

도 1은 영상 부호화기의 구조의 일 예를 나타내는 블록도이다.1 is a block diagram illustrating an example of the structure of an image encoder.

영상 부호화기(100)는 움직임 예측부(111), 움직임 보상부(112), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽쳐 버퍼(190)를 포함한다.The video encoder 100 includes a motion prediction unit 111 , a motion compensation unit 112 , an intra prediction unit 120 , a switch 115 , a subtractor 125 , a transform unit 130 , a quantization unit 140 , and entropy. It includes an encoder 150 , an inverse quantizer 160 , an inverse transform unit 170 , an adder 175 , a filter unit 180 , and a reference picture buffer 190 .

영상 부호화기(100)는 입력 영상을 인트라 예측 모드(intra prediction mode) 또는 인터 예측 모드(inter prediction mode)로 부호화하여 비트스트림(bitstream)을 출력한다. 인트라 예측은 화면 내 예측, 인터 예측은 화면 간 예측을 의미한다. 영상 부호화기(100)는 스위치(115)의 전환을 통해 인트라 예측 모드와 인터 예측 모드 사이를 천이한다. 영상 부호화기(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성한 후, 입력 블록과 예측 블록의 차분(residual)을 부호화한다.The image encoder 100 encodes an input image in an intra prediction mode or an inter prediction mode and outputs a bitstream. Intra prediction refers to intra prediction, and inter prediction refers to inter prediction. The video encoder 100 transitions between the intra prediction mode and the inter prediction mode by switching the switch 115 . The image encoder 100 generates a prediction block for an input block of an input image, and then encodes a residual between the input block and the prediction block.

인트라 예측 모드의 경우, 인트라 예측부(120)는 부호화 대상 블록 주변의 이미 부호화된 블록의 픽셀 값을 이용한 공간적 예측을 수행하여 예측 블록을 생성한다.In the intra prediction mode, the intra prediction unit 120 generates a prediction block by performing spatial prediction using pixel values of an already encoded block around the encoding object block.

인터 예측 모드의 경우, 움직임 예측부(111)는 참조 픽쳐 버퍼(190)에 저장되어 있는 참조 픽쳐 내에서 입력 블록과 가장 매칭이 잘 되는 참조 블록을 찾아서 움직임 벡터를 구한다. 움직임 보상부(112)는 상기 움직임 벡터를 이용하여 움직임 보상을 수행하고 예측 블록을 생성한다. 여기서, 움직임 벡터는 인터 예측에 사용되는 2차원 벡터이며, 현재 부호화/복호화의 대상 블록과 참조 블록 사이의 오프셋을 나타낸다.In the inter prediction mode, the motion prediction unit 111 finds a reference block that best matches the input block in the reference picture stored in the reference picture buffer 190 to obtain a motion vector. The motion compensator 112 performs motion compensation using the motion vector and generates a prediction block. Here, the motion vector is a two-dimensional vector used for inter prediction, and represents an offset between a current encoding/decoding target block and a reference block.

감산기(125)는 입력 블록과 예측 블록의 차분에 기반하여 차분 블록(residual block)을 생성하고, 변환부(130)는 상기 차분 블록을 변환(transform)하여 변환 계수(transform coefficient)를 출력한다. 양자화부(140)는 상기 변환 계수를 양자화하여 양자화된 계수(quantized coefficient)를 출력한다.The subtractor 125 generates a residual block based on the difference between the input block and the prediction block, and the transform unit 130 transforms the residual block to output a transform coefficient. The quantization unit 140 quantizes the transform coefficient and outputs a quantized coefficient.

엔트로피 부호화부(150)는 부호화/양자화 과정에서 획득한 정보에 기반한 엔트로피 부호화를 수행하여 비트스트림을 출력한다. 엔트로피 부호화는 빈번하게 발생되는 심볼(symbol)을 적은 수의 비트로 표현함으로써 부호화의 대상 심볼에 대한 비트열의 크기를 감소시킨다. 따라서, 엔트로피 부호화를 통해 영상의 압축 성능의 향상을 기대할 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수 골룸(exponential golomb), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다.The entropy encoding unit 150 outputs a bitstream by performing entropy encoding based on information obtained in the encoding/quantization process. Entropy encoding reduces the size of a bit stream of a symbol to be encoded by expressing frequently occurring symbols with a small number of bits. Therefore, it is expected that the compression performance of the image can be improved through entropy encoding. The entropy encoder 150 may use an encoding method such as exponential golomb or CABAC (Context-Adaptive Binary Arithmetic Coding) for entropy encoding.

한편, 부호화된 픽쳐는 인터 예측을 수행하기 위한 참조 픽쳐로 사용되기 위해 다시 복호화되어 저장될 필요가 있다. 따라서, 역양자화부(160)는 양자화된 계수를 역양자화하고, 역변화부(170)는 역양자화된 계수를 역변환(inverse transform)하여 복원된 차분 블록을 출력한다. 가산기(175)는 예측 블록에 복원된 차분 블록을 더하여 복원 블록을 생성한다.Meanwhile, the coded picture needs to be decoded and stored again in order to be used as a reference picture for performing inter prediction. Accordingly, the inverse quantization unit 160 inversely quantizes the quantized coefficient, and the inverse transformation unit 170 inverse transforms the inverse quantized coefficient to output a reconstructed residual block. The adder 175 generates a reconstructed block by adding the reconstructed residual block to the prediction block.

필터부(180)는 적응적 인-루프(in-loop) 필터로도 불리며, 복원 블록에 디블록킹 필터링(deblocking filtering), SAO(Sample Adaptive Offset) 보상, ALF(Adaptive Loop Filtering) 중 적어도 하나 이상을 수행한다. 디블록킹 필터링은 블록 간 경계에 생긴 블록 왜곡을 제거하는 것을 의미하고, SAO 보상은 코딩 에러를 보상하기 위해 픽셀 값에 적정 오프셋(offset)을 더해주는 것을 의미한다. 또한, ALF는 복원된 영상과 원래의 영상을 비교한 값에 기반하여 필터링을 수행하는 것을 의미한다.The filter unit 180 is also referred to as an adaptive in-loop filter, and includes at least one of deblocking filtering, sample adaptive offset (SAO) compensation, and adaptive loop filtering (ALF) on the reconstructed block. carry out Deblocking filtering means removing block distortion caused at the boundary between blocks, and SAO compensation means adding an appropriate offset to a pixel value to compensate for a coding error. In addition, ALF means performing filtering based on a comparison value between the reconstructed image and the original image.

도 2는 영상 복호화기의 구조의 일 예를 나타내는 블록도이다.2 is a block diagram illustrating an example of the structure of an image decoder.

영상 복호화기(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 가산기(255), 필터부(260) 및 참조 픽쳐 버퍼(270)를 포함한다.The image decoder 200 includes an entropy decoding unit 210 , an inverse quantization unit 220 , an inverse transform unit 230 , an intra prediction unit 240 , a motion compensator 250 , an adder 255 , and a filter unit 260 . ) and a reference picture buffer 270 .

영상 복호화기(200)는 비트스트림을 인트라 예측 모드 또는 인터 예측 모드로 복호화하여 복원 영상을 출력한다. 영상 복호화기(200)는 스위치의 전환을 통해 인트라 예측 모드와 인터 예측 모드 사이를 천이한다. 영상 복호화기(200)는 비트스트림으로부터 차분 블록을 획득하여 예측 블록을 생성한 후, 차분 블록을 더하여 복원 블록을 생성한다.The image decoder 200 decodes the bitstream in the intra prediction mode or the inter prediction mode to output a reconstructed image. The image decoder 200 transitions between the intra prediction mode and the inter prediction mode by switching the switch. The image decoder 200 obtains a residual block from a bitstream to generate a prediction block, and then adds the residual block to generate a reconstructed block.

엔트로피 복호화부(210)는 확률 분포에 기반한 엔트로피 복호화를 수행한다. 엔트로피 복호화 과정은 상술한 엔트로피 부호화 과정의 반대과정이다. 즉, 엔트로피 복호화부(210)는 빈번하게 발생되는 심볼을 적은 수의 비트로 표현한 비트스트림으로부터 양자화된 계수를 포함하는 심볼을 생성한다.The entropy decoding unit 210 performs entropy decoding based on a probability distribution. The entropy decoding process is the opposite of the entropy encoding process described above. That is, the entropy decoding unit 210 generates a symbol including a quantized coefficient from a bitstream in which frequently generated symbols are expressed by a small number of bits.

역양자화부(220)는 양자화된 계수를 역양자화하고, 역변환부(230)는 역양자화된 계수를 역변환하여 차분 블록을 생성한다.The inverse quantization unit 220 inverse quantizes the quantized coefficient, and the inverse transform unit 230 inversely transforms the inverse quantized coefficient to generate a differential block.

인트라 예측 모드의 경우, 인트라 예측부(240)는 복호화 대상 블록 주변의 이미 복호화된 블록의 픽셀 값을 이용한 공간적 예측을 수행하여 예측 블록을 생성한다.In the intra prediction mode, the intra prediction unit 240 generates a prediction block by performing spatial prediction using pixel values of an already decoded block around the decoding object block.

인터 예측 모드의 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 픽쳐 버퍼(270)에 저장된 참조 픽쳐를 이용한 움직임 보상을 수행하여 예측 블록을 생성한다.In the inter prediction mode, the motion compensator 250 generates a prediction block by performing motion compensation using a motion vector and a reference picture stored in the reference picture buffer 270 .

가산기(255)는 차분 블록에 예측 블록을 더하고, 필터부(260)는 가산기를 거친 블록에 디블록킹 필터링, SAO 보상, ALF 중 적어도 하나 이상을 수행하여 복원 영상을 출력한다.The adder 255 adds the prediction block to the residual block, and the filter unit 260 outputs a reconstructed image by performing at least one of deblocking filtering, SAO compensation, and ALF on the block that has been subjected to the adder.

이하, 블록은 부호화/복호화의 단위를 의미한다. 부호화/복호화 과정에서, 영상은 소정의 크기로 분할되어 부호화/복호화된다. 따라서, 블록은 매크로 블록(Macro Block: MB), 부호화 유닛(Coding Unit: CU), 예측 유닛(Prediction Unit: PU), 변환 유닛(Transform Unit: TU) 등으로도 불릴 수도 있으며, 하나의 블록은 더 작은 크기의 하위 블록으로 분할될 수도 있다.Hereinafter, a block means a unit of encoding/decoding. In the encoding/decoding process, an image is divided into predetermined sizes and encoded/decoded. Accordingly, a block may also be called a macro block (MB), a coding unit (CU), a prediction unit (PU), a transform unit (TU), etc., and one block is It may be divided into smaller sub-blocks.

여기서, 예측 유닛은 예측 및/또는 움직임 보상 수행의 기본 단위를 의미한다. 예측 유닛은 복수의 파티션(partition)으로 분할될 수 있으며, 각각의 파티션은 예측 유닛 파티션(prediction unit partition)으로 불린다. 예측 유닛이 복수의 파티션으로 분할된 경우, 예측 유닛 파티션은 예측 및/또는 움직임 보상 수행의 기본 단위가 될 수 있다. 이하, 본 발명의 실시예에서는 예측 유닛은 예측 유닛 파티션을 의미할 수도 있다.Here, the prediction unit means a basic unit for performing prediction and/or motion compensation. A prediction unit may be divided into a plurality of partitions, and each partition is called a prediction unit partition. When the prediction unit is divided into a plurality of partitions, the prediction unit partition may be a basic unit for performing prediction and/or motion compensation. Hereinafter, in an embodiment of the present invention, a prediction unit may mean a prediction unit partition.

또한, 본 명세서에서 샘플을 이용한다는 것은 해당 샘플의 정보, 예를 들어 픽셀 값 등을 이용한다는 것을 의미할 수 있다. 다만, 설명의 편의를 위해, "샘플 정보를 이용한다" 또는 "픽셀 값을 이용한다"는 표현을 "샘플을 이용한다"고 간단하게 나타낼 수도 있음에 유의한다.Also, in the present specification, using a sample may mean using information of the corresponding sample, for example, a pixel value. However, for convenience of description, it should be noted that the expression “using sample information” or “using pixel values” may be simply expressed as “using a sample”.

한편, 에러가 발생하기 쉬운 네트워크 채널로 비트스트림을 전송하는 경우, 복원된 픽쳐 내에 에러가 발생할 확률이 높다. 제한된 인트라 예측(Constrained Intra Prediction: CIP)는 인트라 예측 모드로 부호화되지 않은 블록에 속하는(covered) 주변 샘플들(neighbouring samples)을 참조하지 않고, 인트라 예측 모드로 부호화된 블록에 속하는 주변 샘플들만을 참조하여, 현재 블록(current block)에 대한 예측 블록을 생성하는 예측 방법이다. 여기서, 현재 블록은 부호화 대상 블록 또는 복호화 대상 블록을 의미한다. CIP 모드를 사용하는 경우, 참조하는 픽쳐가 손실되어 인터 예측 모드로 부호화된 블록이 정상적으로 복원되지 않아도, 인트라 예측 블록의 생성에는 영향이 없다. 따라서, 인터 예측 모드로 부호화된 블록을 정상적으로 복원할 수 없는 경우에도, 인트라 예측 모드로 부호화된 블록을 정상적으로 복호화할 수 있다.On the other hand, when the bitstream is transmitted through a network channel that is prone to errors, there is a high probability that an error will occur in the reconstructed picture. Constrained Intra Prediction (CIP) does not refer to neighboring samples belonging to a block not coded in the intra prediction mode, but only the neighboring samples belonging to the block coded in the intra prediction mode. Thus, it is a prediction method for generating a prediction block for the current block. Here, the current block means an encoding object block or a decoding object block. In the case of using the CIP mode, even if a block coded in the inter prediction mode is not normally reconstructed due to loss of a referenced picture, the generation of the intra prediction block is not affected. Accordingly, even when the block coded in the inter prediction mode cannot be normally reconstructed, the block coded in the intra prediction mode can be normally decoded.

하지만, 인-루프 필터링은 CIP 모드의 사용 여부에 관계없이 수행되므로, 압축된 영상 비트스트림 내에서 에러가 발생한 경우, 복원된 영상의 에러가 인-루프 필터링이 수행되는 과정에서 에러가 발생하지 않은 다른 영역으로 전파될 수 있다.However, since in-loop filtering is performed regardless of whether the CIP mode is used, if an error occurs in the compressed image bitstream, the error in the reconstructed image is not generated during the in-loop filtering process. It can spread to other areas.

상술한 문제점을 해결하기 위해, 본 발명에서는 CIP 모드의 사용 여부와 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반하여 인-루프 필터링의 수행 여부를 결정한다.In order to solve the above-described problem, in the present invention, whether to perform in-loop filtering is determined based on whether the CIP mode is used and the coding parameters of blocks located on both sides of the filtering target boundary.

도 3은 본 발명의 일 실시예에 따른 인-루프 필터링 방법(부호화)을 나타낸 흐름도이다.3 is a flowchart illustrating an in-loop filtering method (coding) according to an embodiment of the present invention.

영상 부호화기는 CIP 모드의 사용 여부를 판별한다(S310).The video encoder determines whether the CIP mode is used (S310).

부호화기와 복호화기는 CIP 모드의 사용 여부를 판별하기 위한 정보를 시그널링(signaling)할 수 있다. 예를 들어, CIP 모드의 사용 여부를 판별하기 위한 정보를 SPS(Sequence Parameter Set), PPS(Picture Parameter Set) 또는 슬라이스 헤더(slice header) 등을 통해 시그널링한다.The encoder and the decoder may signal information for determining whether to use the CIP mode. For example, information for determining whether to use the CIP mode is signaled through a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header.

이때, CIP 모드의 사용 여부를 판별하기 위한 정보를 시그널링한다는 것은 부호화기(encoder)에서 CIP 모드의 사용 여부를 나타내는 플래그(flag)와 같은 지시자(indicator)를 비트스트림(bitstram)에 삽입하고, 복호화기(decoder)에서 파싱(parsing)하는 것을 의미한다. 지시자는 부호화기에서 산술 부호화(arithmetic coding) 등의 엔트로피 부호화 과정을 통해 비트스트림에 삽입되며, 복호화기에서 해당 엔트로피 부호화 과정에 상응하는 복호화 과정을 통해 추출될 수 있다.In this case, signaling information for determining whether to use the CIP mode means inserting an indicator such as a flag indicating whether or not the CIP mode is used in the encoder into the bitstream, and the decoder (decoder) means parsing. The indicator is inserted into the bitstream through an entropy encoding process such as arithmetic coding in the encoder, and may be extracted in the decoder through a decoding process corresponding to the entropy encoding process.

예를 들어, 부호화 대상 시퀀스에서 CIP 모드를 사용하는지를 판별하기 위해, 표 1과 같이 constrained_intra_pred_flag 가 전송될 수 있다. 상기 플래그 값이 '0'인 경우, CIP 모드가 사용되지 않는 것으로 판별하고, 상기 플래그 값이 '1'인 경우, CIP 모드가 사용되는 것으로 판별할 수 있다.For example, in order to determine whether the CIP mode is used in the encoding target sequence, constrained_intra_pred_flag may be transmitted as shown in Table 1. When the flag value is '0', it may be determined that the CIP mode is not used, and if the flag value is '1', it may be determined that the CIP mode is used.

Figure pat00001
Figure pat00001

예를 들어, 부호화 대상 픽쳐에서 CIP 모드를 사용하는지를 판별하기 위해, 표 2와 같이 constrained_intra_pred_flag 가 전송될 수 있다. SPS를 통해 시그널링하는 경우와 마찬가지로, 플래그 값이 '0'인 경우, CIP 모드가 사용되지 않은 것으로 판별하고, 플래그 값이 '1'인 경우, CIP 모드가 사용되는 것으로 판별할 수 있다.For example, in order to determine whether the CIP mode is used in the encoding target picture, constrained_intra_pred_flag may be transmitted as shown in Table 2. As in the case of signaling through SPS, when the flag value is '0', it is determined that the CIP mode is not used, and when the flag value is '1', it can be determined that the CIP mode is used.

Figure pat00002
Figure pat00002

한편, 에러가 발생하기 쉬운 네트워크 환경에서 사용되는 특수한 목적의 부호화기와 복호화기는 CIP 모드의 사용 여부를 판별하기 위한 정보를 별도로 시그널링(signaling)하지 않고, CIP 모드를 기본적으로 사용할 수도 있다.On the other hand, a special purpose encoder and decoder used in an error prone network environment may basically use the CIP mode without separately signaling information for determining whether to use the CIP mode.

도 4는 제한된 인트라 예측이 수행되는 일 예를 나타내는 개념도이다.4 is a conceptual diagram illustrating an example in which limited intra prediction is performed.

이하, 설명의 편의를 위해, 부호화 대상 블록(400)의 좌상단 샘플을 기준([0, 0])으로 우하단 방향으로 좌표 값이 증가하는 [x, y] 좌표를 설정한다. 또한, p[a, b]는 [a, b]의 위치를 가지는 샘플의 픽셀 값을 나타낸다. 예를 들어, 부호화 대상 블록(400)의 좌상단 샘플의 픽셀 값은 p[0, 0]으로 나타낼 수 있다.Hereinafter, for convenience of description, [x, y] coordinates in which the coordinate values increase in the lower right direction based on the upper left sample of the encoding object block 400 as a reference ([0, 0]) are set. In addition, p[a, b] represents the pixel value of the sample having the position of [a, b]. For example, the pixel value of the upper left sample of the encoding object block 400 may be expressed as p[0, 0].

부호화 대상 블록(400)의 크기가 8x8인 경우, 부호화 대상 블록(400)의 상단과 좌측에 위치하는 참조 샘플, 즉 상단 참조 샘플(p[-1...15, -1])과 좌측 참조 샘플(p[-1, 0...15])을 이용하여 부호화 대상 블록에 대한 예측 블록을 생성한다.When the size of the encoding object block 400 is 8x8, reference samples located on the upper and left sides of the encoding object block 400, that is, the upper reference samples (p[-1...15, -1]) and the left reference A prediction block for the encoding object block is generated by using the sample (p[-1, 0...15]).

그러나, CIP 모드가 사용되는 경우, 상술한 바와 같이, 인트라 예측 모드로 부호화되지 않은 블록에 속하는 주변 샘플들은 인트라 예측에 사용될 수 없으므로(not available for intra prediction), 참조 샘플을 대체하는 과정(reference sample substitution process)이 필요하다. 예를 들어, 도 4에서 [x = -1, y = 4...11], [x = -1...5, y = -1], [x = 8...15, y = -1]의 위치를 가지는 샘플들은 제한된 인트라 예측에 사용될 수 있는 다른 샘플들로 대체해야 한다.However, when the CIP mode is used, as described above, since neighboring samples belonging to a block not coded in the intra prediction mode cannot be used for intra prediction (not available for intra prediction), a process of replacing the reference sample (reference sample) substitution process) is required. For example, in Fig. 4, [x = -1, y = 4...11], [x = -1...5, y = -1], [x = 8...15, y = - 1] should be replaced with other samples that can be used for limited intra prediction.

인트라 예측에 사용할 수 없는 주변 샘플을 대체하여, 참조 샘플을 구성하는 예는 다음과 같다.An example of constructing a reference sample by substituting a neighboring sample that cannot be used for intra prediction is as follows.

예 1) 인트라 예측에 사용할 수 없는 주변 샘플들을 인트라 예측에 사용할 수 있는 주변 샘플들 중 하나의 값으로 대체한다.Example 1) Neighboring samples that cannot be used for intra prediction are replaced with a value of one of neighboring samples that can be used for intra prediction.

예를 들어, 도 4의 경우에 있어서, [x = -1, y = 15]의 위치를 가지는 샘플이 인트라 예측에 사용할 수 없는 샘플이라면, [x = -1, y = 15]에서 [x = -1, y = -1]까지, 그 다음 [x = 0, y = -1]에서 [x = 15, y = -1]까지 순차적으로 검색한다. 인트라 예측에 사용할 수 있는 샘플이 발견되는 대로, 검색은 종료되며, 해당 샘플의 픽셀 값(p[x = -1, y = 15])에 검색된 샘플의 픽셀 값이 할당된다.For example, in the case of FIG. 4 , if a sample having a position of [x = -1, y = 15] is a sample that cannot be used for intra prediction, [x = -1, y = 15] to [x = -1, y = -1], then [x = 0, y = -1] to [x = 15, y = -1] sequentially. As soon as a sample usable for intra prediction is found, the search ends, and the pixel value of the sample (p[x = -1, y = 15]) is assigned the pixel value of the searched sample.

예를 들어, 도 4의 경우에 있어서, [x = -1, y = 4...11], [x = -1, y = -1]의 위치를 가지는 샘플이 인트라 예측에 사용할 수 없는 샘플이라면, 수학식 1 및 수학식 2와 같이, 해당 샘플의 픽셀 값(p[x, y])에 해당 샘플의 하단에 위치하는 샘플의 픽셀 값(p[x, y+1])이 할당된다.For example, in the case of FIG. 4 , samples having positions of [x = -1, y = 4...11] and [x = -1, y = -1] cannot be used for intra prediction. , the pixel value (p[x, y+1]) of the sample located at the bottom of the sample is assigned to the pixel value (p[x, y]) of the corresponding sample as in Equations 1 and 2 .

Figure pat00003
Figure pat00003

Figure pat00004
Figure pat00004

예를 들어, 도 4의 경우에 있어서, [x = 0...5, y = -1], [x = 8...15, y = -1]의 위치를 가지는 샘플이 인트라 예측에 사용할 수 없는 샘플이라면, 수학식 3 및 수학식 4와 같이, 해당 샘플의 픽셀 값(p[x, y])에 해당 샘플의 좌측에 위치하는 샘플의 픽셀 값(p[x-1, y])이 할당된다.For example, in the case of FIG. 4 , samples having positions of [x = 0...5, y = -1] and [x = 8...15, y = -1] are used for intra prediction. If the sample cannot be, as shown in Equations 3 and 4, the pixel value (p[x-1, y]) of the sample located to the left of the sample in the pixel value (p[x, y]) of the corresponding sample. is assigned

Figure pat00005
Figure pat00005

Figure pat00006
Figure pat00006

예 2) 인트라 예측에 사용할 수 없는 참조 샘플(들)을 해당 참조 샘플(들)의 양측에 위치하는 인트라 예측에 사용할 수 있는 참조 샘플들의 평균값으로 대체한다.Example 2) The reference sample(s) that cannot be used for intra prediction is replaced with an average value of reference samples that can be used for intra prediction located on both sides of the reference sample(s).

예를 들어, 도 4의 경우에 있어서, 인터 예측 모드로 부호화된 블록에 속하는 주변 샘플들은 수학식 5 내지 수학식 7과 같이 대체된다.For example, in the case of FIG. 4 , neighboring samples belonging to a block coded in the inter prediction mode are replaced as in Equations 5 to 7.

Figure pat00007
Figure pat00007

Figure pat00008
Figure pat00008

Figure pat00009
Figure pat00009

예 3) 인트라 예측에 사용할 수 없는 참조 샘플(들)을 해당 참조 샘플(들)의 양측에 위치하는 인트라 예측에 사용할 수 있는 참조 샘플들을 선형 보간(linear interpolation)한 값으로 대체한다.Example 3) Reference sample(s) that cannot be used for intra prediction are replaced with reference samples that can be used for intra prediction located on both sides of the reference sample(s) with values obtained by linear interpolation.

예를 들어, 도 4의 경우에 있어서, 인터 예측 모드로 부호화된 블록에 속하는 주변 샘플들은 수학식 8 내지 수학식 10과 같이 대체된다.For example, in the case of FIG. 4 , neighboring samples belonging to a block encoded in the inter prediction mode are replaced as in Equations 8 to 10.

Figure pat00010
Figure pat00010

Figure pat00011
Figure pat00011

Figure pat00012
Figure pat00012

한편, 부호화 대상 블록이 인트라 예측 모드로 부호화되는 경우, 부호화 성능을 높이기 위해, 참조 샘플들 및 예측 샘플들(predicted samples)에 대해 필터링을 수행할 수 있다. 여기서, 예측 샘플은 부호화 대상 블록에 속하는 샘플의 예측 값을 의미한다.Meanwhile, when the encoding object block is encoded in the intra prediction mode, in order to improve encoding performance, filtering may be performed on reference samples and predicted samples. Here, the prediction sample means a prediction value of a sample belonging to an encoding object block.

예를 들어, 참조 샘플에 필터 계수가 [1 2 1]인 3-탭 저역통과 필터 또는 필터 계수가 [1 1]인 2-탭 평균 필터를 적용할 수 있다.For example, a 3-tap low-pass filter having a filter coefficient of [1 2 1] or a 2-tap average filter having a filter coefficient of [1 1] may be applied to the reference sample.

예를 들어, Intra_Vertical 예측 모드, Intra_Horizontal 예측 모드, Intra_DC 예측 모드와 같은 특정 인트라 모드에서, 부호화 대상 블록의 경계에 해당하는 샘플의 예측 값을 해당 샘플에 인접하는 참조 샘플에 기반하여 도출(derivation)할 수 있다.For example, in a specific intra mode such as an Intra_Vertical prediction mode, an Intra_Horizontal prediction mode, or an Intra_DC prediction mode, a prediction value of a sample corresponding to a boundary of an encoding object block may be derived based on a reference sample adjacent to the corresponding sample. can

그러나, CIP 모드가 사용되는 경우, 인트라 예측 모드로 부호화되지 않은 주변 샘플들이 인트라 예측 모드로 부호화된 주변 샘플들로 대체되므로, 참조 샘플들의 픽셀 값은 서로 유사하거나 동일할 확률이 높다. 따라서, CIP 모드가 사용되지 않는 경우와 달리, 제한된 인트라 예측 모드에서는 참조 샘플들에 대한 필터링을 수행하지 않는 것이 계산 복잡도의 감소와 부호화 성능의 향상 측면에서 바람직할 수 있다. 마찬가지로, 서로 유사하거나 동일한 픽셀 값을 가지는 참조 샘플들에 기반하여 도출되는 예측 샘플들의 픽셀 값도 서로 유사하거나 동일할 확률이 높으므로, 예측 샘플에 대한 필터링을 수행하지 않는 것이 바람직할 수 있다.However, when the CIP mode is used, since neighboring samples not coded in the intra prediction mode are replaced with neighboring samples coded in the intra prediction mode, there is a high probability that pixel values of the reference samples are similar to or identical to each other. Therefore, unlike the case in which the CIP mode is not used, it may be preferable not to perform filtering on reference samples in the restricted intra prediction mode in terms of reduction of computational complexity and improvement of encoding performance. Similarly, since pixel values of prediction samples derived based on reference samples having similar or identical pixel values are highly likely to be similar or identical to each other, it may be preferable not to perform filtering on the prediction samples.

따라서, [1] CIP 모드의 사용 여부, [2] 참조 샘플이 속하는 블록의 이용 가능 여부, [3] 참조 샘플의 픽셀 값, [4] 참조 샘플이 속하는 블록의 부호화 파라미터 등에 기반하여 참조 샘플 및/또는 예측 샘플에 대한 필터링의 수행 여부를 적응적으로 결정할 수 있다.Therefore, based on [1] whether the CIP mode is used, [2] whether the block to which the reference sample belongs is available, [3] the pixel value of the reference sample, [4] the encoding parameters of the block to which the reference sample belongs, the reference sample and / or whether to perform filtering on the prediction sample may be adaptively determined.

예 1) CIP 모드의 사용 여부에 기반하여 참조 샘플 및/또는 예측 샘플에 대한 필터링의 수행 여부를 결정한다.Example 1) It is determined whether filtering is performed on a reference sample and/or a prediction sample based on whether the CIP mode is used.

예를 들어, CIP 모드가 사용되는 환경에서 참조 샘플에 대해 필터를 적용하는 경우, 인터 슬라이스(P slice or B slice)에서는 참조 샘플에 대해 필터링을 수행하지 않을 수 있다.For example, when a filter is applied to a reference sample in an environment in which the CIP mode is used, filtering may not be performed on the reference sample in an inter slice (P slice or B slice).

예를 들어, CIP 모드가 사용되는 환경에서 예측 샘플에 대해 필터를 적용하는 경우, 인터 슬라이스(P slice or B slice)에서는 예측 샘플에 대해 필터링을 수행하지 않을 수 있다. For example, when a filter is applied to a prediction sample in an environment in which the CIP mode is used, filtering may not be performed on the prediction sample in an inter slice (P slice or B slice).

예 2) 참조 샘플이 속하는 블록의 이용 가능 여부에 기반하여 참조 샘플 및/ 또는 예측 샘플에 대한 필터링의 수행 여부를 적응적으로 결정한다.Example 2) Whether to perform filtering on the reference sample and/or the prediction sample is adaptively determined based on availability of a block to which the reference sample belongs.

예를 들어, 참조 샘플에 대해 필터를 적용하는 경우, 이용 가능하지 않은 블록에 속하는 샘플에 해당하여 인트라 예측에 사용할 수 있는 샘플로 대체되는 참조 샘플에 대해 필터링을 수행하지 않을 수 있다.For example, when a filter is applied to a reference sample, filtering may not be performed on a reference sample that corresponds to a sample belonging to an unavailable block and is replaced with a sample that can be used for intra prediction.

예를 들어, 예측 샘플에 대해 필터를 적용하는 경우, 이용 가능하지 않은 블록에 속하는 샘플에 해당하여 인트라 예측에 사용할 수 있는 샘플로 대체되는 참조 샘플에 기반하여 도출되는 예측 샘플에 대해 필터링을 수행하지 않을 수 있다.For example, if a filter is applied to a prediction sample, filtering is not performed on the prediction sample derived based on a reference sample that is replaced by a sample that corresponds to a sample belonging to an unavailable block and can be used for intra prediction. it may not be

예 3) 참조 샘플의 픽셀 값에 기반하여 참조 샘플 및/또는 예측 샘플에 대한 필터링의 수행 여부를 결정한다. 이때, 참조 샘플들의 픽셀 값들의 평균, 분산, 샘플 값이 서로 동일한지 등에 기반하여 측정되는 픽셀 값의 유사도 등을 이용할 수 있다.Example 3) It is determined whether filtering is performed on the reference sample and/or the prediction sample based on the pixel value of the reference sample. In this case, the similarity of pixel values measured based on the average, variance, and sample values of the reference samples, and whether the sample values are the same may be used.

예를 들어, 참조 샘플들에 대해 필터를 적용하는 경우, 픽셀 값이 서로 유사하거나 동일한 참조 샘플들에 대해 필터링을 수행하지 않을 수 있다.For example, when a filter is applied to reference samples, filtering may not be performed to reference samples having similar or identical pixel values.

예를 들어, 예측 샘플들에 대해 필터를 적용하는 경우, 픽셀 값이 서로 유사하거나 동일한 참조 샘플들에 기반하여 도출되는 예측 샘플들에 대해 필터링을 수행하지 않을 수 있다.For example, when a filter is applied to prediction samples, filtering may not be performed on prediction samples derived based on reference samples having similar or identical pixel values.

예 4) 참조 샘플이 속하는 블록의 부호화 파라미터에 기반하여 참조 샘플 및/또는 예측 샘플에 대한 필터링의 수행 여부를 결정한다. 이때, 인트라 예측 모드(intra prediction mode), MPM (Most Probable Mode) 플래그, 인터 예측 모드(inter prediction mode), 움직임 벡터(motion vector), 참조 픽쳐 인덱스(reference picture index), 양자화 매개변수(quantization parameter), 부호화 블록 플래그(coded block flag), 부호화 대상 블록이 인트라 예측 모드로 부호화되었는지 인터 예측 모드로 부호화되었는지를 나타내는 부호화 모드(coding mode) 등과 같은 부호화 파라미터들 중에서 적어도 하나 이상을 이용할 수 있다.Example 4) Whether to perform filtering on the reference sample and/or the prediction sample is determined based on the encoding parameter of the block to which the reference sample belongs. In this case, an intra prediction mode, a Most Probable Mode (MPM) flag, an inter prediction mode, a motion vector, a reference picture index, a quantization parameter ), a coded block flag, and at least one of coding parameters such as a coding mode indicating whether the encoding object block is encoded in the intra prediction mode or the inter prediction mode, and the like may be used.

예를 들어, 참조 샘플에 대해 필터를 적용하는 경우, 인트라 예측 모드로 부호화되지 않은 블록에 속하는 샘플에 해당하여 인트라 예측 모드로 부호화된 블록에 속하는 샘플로 대체되는 참조 샘플에 대해 필터링을 수행하지 않을 수 있다.For example, when a filter is applied to a reference sample, filtering is not performed on a reference sample that corresponds to a sample belonging to a block that is not encoded in the intra prediction mode and is replaced with a sample that belongs to a block that is encoded in the intra prediction mode. can

예를 들어, 예측 샘플에 대해 필터를 적용하는 경우, 인트라 예측 모드로 부호화되지 않은 블록에 속하는 샘플에 해당하여 인트라 예측 모드로 부호화된 블록에 속하는 샘플로 대체되는 참조 샘플에 기반하여 도출되는 예측 샘플에 대해 필터링을 수행하지 않을 수 있다.For example, when a filter is applied to a prediction sample, a prediction sample derived based on a reference sample corresponding to a sample belonging to a block not coded in the intra prediction mode and replaced with a sample belonging to a block coded in the intra prediction mode filtering may not be performed.

한편, Intra_Vertical 예측 모드, Intra_Horizontal 예측 모드, Intra_DC 예측 모드와 같은 특정 인트라 모드의 경우, 상술한 바와 같이, 예측 샘플들 중에서 부호화 대상 블록의 경계에 해당하는 예측 샘플들에 대해서만 필터를 적용할 수 있다. 상기 경우에도, [1] CIP 모드의 사용 여부, [2] 참조 샘플이 속하는 블록의 이용 가능 여부, [3] 참조 샘플의 픽셀 값, [4] 참조 샘플이 속하는 블록의 부호화 파라미터 등에 기반하여 예측 샘플들 중에서 부호화 대상 블록의 경계에 해당하는 예측 샘플들에 대한 필터링의 수행 여부를 적응적으로 결정할 수 있다. 다시 도 4를 참조하면, [0...5, 0], [0, 4...7]의 위치를 가지는 예측 샘플(410, 420)에 대해 필터링을 수행하지 않을 수 있다.Meanwhile, in the case of a specific intra mode such as the Intra_Vertical prediction mode, the Intra_Horizontal prediction mode, and the Intra_DC prediction mode, as described above, the filter may be applied only to prediction samples corresponding to the boundary of the encoding object block among the prediction samples. Even in the above case, [1] whether the CIP mode is used, [2] whether the block to which the reference sample belongs is available, [3] the pixel value of the reference sample, [4] prediction based on the coding parameters of the block to which the reference sample belongs Whether to perform filtering on prediction samples corresponding to a boundary of an encoding object block among samples may be adaptively determined. Referring back to FIG. 4 , filtering may not be performed on the prediction samples 410 and 420 having positions of [0...5, 0], [0, 4...7].

도 5는 제한된 인트라 예측 모드로 부호화된 블록에 대한 인-루프 필터링을 수행하는 방법을 나타낸 흐름도이다.5 is a flowchart illustrating a method of performing in-loop filtering on a block coded in a restricted intra prediction mode.

이하, 설명의 편의를 위해, 인-루프 필터링을 디블록킹 필터링의 예를 들어 설명하기로 한다. 그러나, 본 발명은 디블록킹 필터링에만 적용될 수 있는 것이 아니고, 비-디블록킹 필터링, SAO(Sample Adaptive Offset) 보상 또는 적응적 루프 필터(Adaptive Loop Filter: ALF)에도 적용될 수 있다.Hereinafter, for convenience of description, in-loop filtering will be described as an example of deblocking filtering. However, the present invention is not applicable only to deblocking filtering, but may also be applied to non-deblocking filtering, sample adaptive offset (SAO) compensation, or adaptive loop filter (ALF).

부호화기는 필터링 대상 경계를 판별한다(S510). 일반적으로, 영상의 분할 단위의 경계가 필터링 대상 경계로 판단된다. 예를 들어 부호화 유닛(Coding Unit: CU)의 경계, 예측 유닛(Prediction Unit: PU)의 경계, 변환 유닛(Transform Unit: TU)의 경계가 필터링 대상 경계로 판단될 수 있다. 따라서, 필터링 대상 경계의 판별은 부호화 유닛(Coding Unit: CU), LCU(Largest Coding Unit), 슬라이스(slice) 단위 또는 픽쳐(picture) 단위로 수행된다.The encoder determines a filtering target boundary (S510). In general, a boundary of a division unit of an image is determined as a boundary to be filtered. For example, a boundary of a coding unit (CU), a boundary of a prediction unit (PU), and a boundary of a transform unit (TU) may be determined as the filtering target boundary. Accordingly, the determination of the filtering target boundary is performed in units of coding units (CUs), largest coding units (LCUs), slices, or pictures.

부호화기는 필터링 경계 판별 단계(S510)를 통해 결정된 필터링 대상 경계의 주변 픽셀 값과 필터링 강도 중 적어도 하나 이상에 기반하여 필터링의 수행 여부 및 필터의 종류를 결정한다(S520). 예를 들어, 필터링 대상 경계의 주변 픽셀 값에 기반하여, 필터링 대상 경계가 변환(transform) 및 양자화(quantization)로 인한 블록킹 현상(blocking artifact)인지 아니면 픽쳐 내에 존재하는 실제 에지(edge)인지를 판별하고, 필터링의 수행 여부를 결정할 수 있다. 예를 들어, 필터 강도는 저역 통과 필터(low pass filter)의 입력 샘플 수를 나타내는 탭 크기(tap size), 저역 통과 필터의 계수(coefficient) 등을 나타낼 수 있다.The encoder determines whether to perform filtering and the type of filter based on at least one of the filtering intensity and neighboring pixel values of the filtering target boundary determined through the filtering boundary determination step ( S510 ) ( S520 ). For example, it is determined whether the filtering target boundary is a blocking artifact due to transform and quantization or an actual edge existing in the picture based on the surrounding pixel values of the filtering target boundary and whether to perform filtering may be determined. For example, the filter strength may indicate a tap size indicating the number of input samples of the low-pass filter, a coefficient of the low-pass filter, and the like.

부호화기는 필터링 대상 경계 판별 단계(S510), 필터링의 수행 여부 및 필터의 종류 결정 단계(S520)를 통해 결정된 필터링 대상 경계 및 필터의 종류에 기반하여 필터링을 수행한다. 이때, 블록 사이의 경계의 부드러운 처리를 위해 필터링 대상 경계의 주변 픽셀 값의 변화량 등에 따라 저역 통과 필터를 사용하거나, 원래의 영상과의 왜곡을 최소화하기 위해 위너 필터(Wiener filter)를 적용할 수 있다. 또한, 필터링 대상 경계에 따라 1차원 필터 또는 2차원 이상의 다차원 필터를 적용할 수 있다. 예를 들어, 사각형, 원형, 직사각형 등의 필터의 모양(shape), 수평 대칭, 수직 대칭, 대각석 대칭 등의 필터 계수의 구조(structure)를 가지는 2차원 이상의 다차원 필터를 적용할 수 있다. 또한, 필터링의 수행 여부 및 필터의 종류 결정 단계(S520)를 통해 결정된 필터링 강도에 기반하여, 다양한 필터를 적용할 수 있다.The encoder performs filtering based on the filtering target boundary and the filter type determined through the filtering target boundary determination step S510, whether filtering is performed, and the filter type determination step S520. In this case, for smooth processing of the boundary between blocks, a low-pass filter may be used according to the amount of change in pixel values around the boundary to be filtered, or a Wiener filter may be applied to minimize distortion from the original image. . In addition, a one-dimensional filter or a two-dimensional or more multi-dimensional filter may be applied according to the boundary of the filtering target. For example, a two-dimensional or more multidimensional filter having a filter shape such as a quadrangle, a circle, a rectangle, and a structure of filter coefficients such as horizontal symmetry, vertical symmetry, and diagonal symmetry may be applied. In addition, various filters may be applied based on the filtering strength determined through the determination of whether filtering is performed and the type of filter ( S520 ).

다시 도 3을 참조하면, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터를 판별한다(S320).Referring back to FIG. 3 , the video encoder determines encoding parameters of blocks located on both sides of the filtering target boundary ( S320 ).

영상 부호화기는 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반하여 필터링의 수행 여부 및 필터의 종류를 결정할 수 있다. 이때, 인트라 예측 모드(intra prediction mode), 인터 예측 모드(inter prediction mode), 움직임 벡터(motion vector), 참조 픽쳐 인덱스(reference picture index), 양자화 매개변수(quantization parameter), 부호화 블록 플래그(coded block flag), 부호화 대상 블록이 인트라 예측 모드로 부호화되었는지 인터 예측 모드로 부호화되었는지를 나타내는 부호화 모드(coding mode) 등과 같은 부호화 파라미터들 중에서 적어도 하나 이상을 이용할 수 있다.The video encoder may determine whether to perform filtering and the type of filter based on encoding parameters of blocks located on both sides of the filtering target boundary. In this case, an intra prediction mode, an inter prediction mode, a motion vector, a reference picture index, a quantization parameter, a coded block flag flag) and at least one of encoding parameters such as a coding mode indicating whether the encoding object block is encoded in the intra prediction mode or the inter prediction mode.

예를 들어, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 블록이 인트라 예측 모드로 부호화되었는지 또는 인터 예측 모드로 부호화되었는지를 판별할 수 있다. 이때, 어떤 블록이 인트라 예측 모드로 부호화되었다면, 해당 블록을 인트라 모드로 부호화되었다고 하거나, 인트라 부호화되었다고 할 수 있다. 마찬가지로, 어떤 블록이 인터 예측 모드로 부호화되었다면, 해당 블록을 인터 모드로 부호화되었다고 하거나 인터 부호화되었다고 할 수 있다.For example, the image encoder may determine whether blocks located on both sides of the filtering target boundary are encoded in the intra prediction mode or the inter prediction mode. In this case, if a block is encoded in the intra prediction mode, the block may be said to be encoded in the intra mode or may be said to be intra-coded. Similarly, if a block is encoded in the inter prediction mode, the block may be said to be encoded in the inter mode or may be said to be inter-coded.

예를 들어, 필터링 대상 경계의 양측에 위치하는 블록이 인터 예측 모드로 부호화된 경우, 영상 부호화기는 부호화 블록 플래그(Coded Block Flag: CBF), 스킵 모드(skip mode)와 같은 잔차 신호(residual signal)에 대한 변환 계수의 존재 여부를 판별하고, 이에 기반하여 디블록킹 필터의 처리 방법을 다르게 할 수 있다.For example, when blocks located on both sides of the boundary to be filtered are encoded in the inter prediction mode, the video encoder uses a residual signal such as a coded block flag (CBF) and a skip mode. It is determined whether there is a transform coefficient for , and a processing method of the deblocking filter can be different based on this.

예를 들어, 필터링 대상 경계의 양측에 위치하는 블록이 PCM(Pulse Coded Modulation) 모드로 부호화된 경우, 영상 부호화기는 해당 블록을 인트라 예측 모드로 부호화되었다고 판별할 수 있다.For example, when blocks located on both sides of the filtering target boundary are encoded in the pulse coded modulation (PCM) mode, the video encoder may determine that the corresponding block is encoded in the intra prediction mode.

또한, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터와 함께 필터링 대상 경계의 주변 픽셀 값에 기반하여 필터링의 수행 여부 및 필터의 종류를 결정할 수 있다. 이때, 필터링 대상 경계의 주변 픽셀 값들의 차이(difference), 기울기(gradient), 분산(variance), 평균(average) 등을 이용할 수 있다.In addition, the image encoder may determine whether to perform filtering and the type of filter based on the values of pixels surrounding the boundary of the filtering object together with encoding parameters of blocks located on both sides of the boundary of the filtering object. In this case, a difference, a gradient, a variance, an average, and the like between pixel values surrounding the boundary of the filtering target may be used.

영상 부호화기는 CIP 모드의 사용 여부와 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반하여 인-루프 필터의 적용 여부를 결정한다.The video encoder determines whether to apply the in-loop filter based on whether the CIP mode is used and the encoding parameters of blocks located on both sides of the filtering target boundary.

CIP 모드가 사용되지 않는 경우, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 샘플에 대해 필터링을 수행한다(S330).When the CIP mode is not used, the video encoder performs filtering on samples located on both sides of the filtering target boundary (S330).

CIP 모드가 사용되고, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인트라 예측 모드로 부호화된 블록임을 나타내는 경우, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 필터링을 수행한다(S331).When the CIP mode is used and the encoding parameters of blocks located on both sides of the filtering target boundary indicate that all blocks located on both sides of the filtering target boundary are blocks coded in the intra prediction mode, the video encoder is located on both sides of the filtering target boundary Filtering is performed on the samples to be used (S331).

도 6은 필터링 대상 경계의 양측에 위치하는 블록이 모두 인트라 예측 모드로 부호화된 일 예를 나타낸다. 양측 블록이 모두 인트라 부호화된 경우, 양측 블륵에 속하는 샘플들은 에러가 발생할 수 있는 인터 예측 모드로 부호화된 블록으로부터 아무런 영향을 받지 않는다. 따라서, constrained_intra_pred_flag가 1이고, 필터링 대상 경계의 양측에 위치하는 블록이 모두 인트라 예측 모드로 부호화된 경우, 필터링 대상 경계에 대해 디블록킹 필터링을 수행할 수 있다.6 illustrates an example in which blocks located on both sides of a filtering target boundary are encoded in the intra prediction mode. When both blocks are intra-coded, samples belonging to both blocks are not affected by the block coded in the inter prediction mode in which an error may occur. Accordingly, when constrained_intra_pred_flag is 1 and all blocks located on both sides of the filtering target boundary are coded in the intra prediction mode, deblocking filtering may be performed on the filtering target boundary.

CIP 모드가 사용되고, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용하지 않을 수 있다(S333[1]).When the CIP mode is used and the encoding parameters of blocks located on both sides of the filtering target boundary indicate that all blocks located on both sides of the filtering target boundary are blocks coded in the inter prediction mode, the video encoder is located on both sides of the filtering target boundary The deblocking filter may not be applied to the samples to be used (S333[1]).

도 7은 필터링 대상 경계의 양측에 위치하는 블록이 모두 인터 예측 모드로 부호화된 일 예를 나타낸다. 양측 블록이 모두 인터 부호화(머지 모드, 스킵 모드, PU_2Nx2N/PU_2NxN/PU_Nx2N/PU_NxN 모드)된 경우, 양측 블록에 속하는 샘플들에 에러가 발생할 수 있다. 따라서, constrained_intra_pred_flag가 1이고, 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터가 모두 인터 예측 모드인 경우, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 샘플에 대해 필터링을 수행하지 않을 수 있다.7 illustrates an example in which blocks located on both sides of a filtering target boundary are encoded in the inter prediction mode. When both blocks are inter-coded (merge mode, skip mode, PU_2Nx2N/PU_2NxN/PU_Nx2N/PU_NxN mode), errors may occur in samples belonging to both blocks. Accordingly, when constrained_intra_pred_flag is 1 and all encoding parameters of blocks located on both sides of the filtering target boundary are inter prediction modes, the video encoder may not perform filtering on samples located on both sides of the filtering target boundary.

또한, constrained_intra_pred_flag가 1이고, 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터가 모두 인터 예측 모드인 경우, 영상 부호화기는 필터링을 수행하지 않은 것과 같이 필터링 강도를 '0'으로 결정할 수도 있다. 수학식 11은 필터링 강도를 '0'으로 결정하는 일 예를 나타낸다.In addition, when constrained_intra_pred_flag is 1 and all encoding parameters of blocks located on both sides of the filtering target boundary are inter prediction modes, the video encoder may determine the filtering strength to be '0' as if filtering is not performed. Equation 11 shows an example of determining the filtering strength as '0'.

Figure pat00013
Figure pat00013

여기서, bS는 필터링 강도, filterDir는 1차원 필터의 적용 방향(수직/수평), xEk와 yEj는 필터링 대상 경계의 위치를 나타낸다.Here, bS is the filtering strength, filterDir is the application direction of the one-dimensional filter (vertical/horizontal), and xEk and yEj are the positions of the filtering target boundary.

또한, constrained_intra_pred_flag가 1이고, 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터가 모두 인터 예측 모드인 경우, 양측 블록에 속하는 샘플들에 에러가 발생할 수 있지만, 해당 샘플들에 디블록킹 필터링을 수행함으로써 발생되는 문제는 아니라고 볼 수도 있다. 따라서, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 샘플에 대해 필터링을 수행할 수도 있다(S333[2]).In addition, when constrained_intra_pred_flag is 1 and coding parameters of blocks located on both sides of the filtering target boundary are all inter prediction modes, errors may occur in samples belonging to both blocks, but by performing deblocking filtering on the samples It may not seem like a problem. Accordingly, the video encoder may perform filtering on samples located on both sides of the filtering target boundary (S333[2]).

CIP 모드가 사용되고, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 샘플들 중 인터 예측 모드로 부호화된 블록에 속하는 샘플들에 대해서만 필터링을 수행할 수 있다(S332[1]).When the CIP mode is used and the encoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks coded in the intra prediction mode and the inter prediction mode, respectively, the video encoder performs the filtering target boundary Filtering may be performed only on samples belonging to a block coded in the inter prediction mode among samples located on both sides of (S332[1]).

도 8 및 도 9는 필터링 대상 경계의 양측에 위치하는 블록이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 일 예를 나타낸다. 필터링 대상 경계의 양측에 인트라 예측 모드로 부호화된 블록과 인터 예측 모드로 부호화된 블록이 위치하는 경우, 인터 예측 모드로 부호화된 블록에 속하는 복원된 샘플에 발생한 에러가 인트라 예측 모드로 부호화된 블록에 속하는 복원된 샘플에 영향을 줄 수 있다. 따라서. 필터링 대상 경계 양측 샘플들 중 인트라 예측 모드로 부호화된 블록에 속하는 샘플들에 대해 필터링을 수행하지 않고, 필터링 대상 경계 양측 샘플들 중 인터 예측 모드로 부호화된 블록에 속하는 샘플들에 대해서만 필터링을 수행함으로써, 에러의 전파를 방지할 수 있다.8 and 9 show an example in which blocks located on both sides of a filtering target boundary are encoded in an intra prediction mode and an inter prediction mode, respectively. When the block coded in the intra prediction mode and the block coded in the inter prediction mode are located on both sides of the boundary to be filtered, an error occurring in the reconstructed sample belonging to the block coded in the inter prediction mode is transmitted to the block coded in the intra prediction mode. It may affect the reconstructed sample to which it belongs. therefore. By performing filtering on only samples belonging to a block encoded in the inter prediction mode among samples on both sides of the filtering target boundary, without performing filtering on samples belonging to the block encoded in the intra prediction mode among samples on both sides of the filtering target boundary , it is possible to prevent the propagation of errors.

필터링 대상 경계 양측 샘플들 중 인터 예측 모드로 부호화된 블록에 속하는 샘플들에 대해서만 필터링을 수행하는 경우, 다음과 같은 디블록킹 필터링 과정이 수행된다.When filtering is performed only on samples belonging to blocks encoded in the inter prediction mode among samples on both sides of the filtering target boundary, the following deblocking filtering process is performed.

<휘도(luma) 샘플에 대한 디블록킹 필터링 수행 과정 1><Process of performing deblocking filtering on luminance (luma) samples 1>

- 입력- input

(1) 샘플 값: pi, qi (i = 0...3)(1) Sample values: pi, qi (i = 0...3)

(2) p1과 q1 각각의 샘플들에 대한 필터 적용 여부: dEp1, dEq1(2) Whether to apply a filter to each of p1 and q1 samples: dEp1, dEq1

(3) 필터를 적용하기 위한 임계치: tc(3) Threshold for applying the filter: tc

- 출력- Print

(1) 필터링된 샘플 수: nDp, nDq(1) Number of filtered samples: nDp, nDq

(2) 필터링된 샘플 값: pi', qj'(i = 0...nDp -1, j = 0...nDq - 1)(2) Filtered sample values: pi', qj' (i = 0...nDp -1, j = 0...nDq - 1)

- [1] pi가 I_PCM 블록의 샘플이 아니거나, pcm_loop_filter_disable_flag가 0이고, [2] pi가 인터 예측 모드로 부호화된 블록에 속하고, [3] qi가 인트라 예측 모드로 부호화된 블록에 속하고, [4] dE가 2인 경우, nDp를 3으로 하고 pi에 다음과 같은 강한 필터를 적용한다.- [1] pi is not a sample of the I_PCM block, pcm_loop_filter_disable_flag is 0, [2] pi belongs to a block coded in inter prediction mode, [3] qi belongs to a block coded in intra prediction mode, and , [4] When dE is 2, nDp is set to 3 and the following strong filter is applied to pi.

Figure pat00014
Figure pat00014

Figure pat00015
Figure pat00015

Figure pat00016
Figure pat00016

여기서, Clip3(a, b, c)는 a와 b의 범위 내로 c를 클립핑(clipping)하는 것을 나타낸다.Here, Clip3(a, b, c) represents clipping c within the range of a and b.

- [1] pi가 I_PCM 블록의 샘플이 아니거나, pcm_loop_filter_disable_flag가 0이고, [2] pi가 인터 예측 모드로 부호화된 블록에 속하고, [3] qi가 인트라 예측 모드로 부호화된 블록에 속하고, [4] dE가 2가 아닌 경우, nDp를 1로 하고 pi에 약한 필터를 적용한다.- [1] pi is not a sample of the I_PCM block, pcm_loop_filter_disable_flag is 0, [2] pi belongs to a block coded in inter prediction mode, [3] qi belongs to a block coded in intra prediction mode, and , [4] When dE is not 2, nDp is set to 1 and a weak filter is applied to pi.

Figure pat00017
Figure pat00017

abs(Δ)가 tc*10보다 작으면, 다음과 같은 단계가 적용된다.If abs(Δ) is less than tc*10, the following steps are applied.

(1) p0'가 다음과 같이 구해진다.(1) p0' is obtained as follows.

Figure pat00018
Figure pat00018

Figure pat00019
Figure pat00019

여기서, Clip1Y(x)는 수학식 18과 같이 정의된다.Here, Clip1Y(x) is defined as in Equation (18).

Figure pat00020
Figure pat00020

여기서, BitDepthY는 휘도 성분의 비트 깊이(bit depth)를 나타낸다.Here, BitDepthY represents the bit depth of the luminance component.

(2) dEp1이 1이면, pi'가 다음과 같이 구해진다.(2) If dEp1 is 1, pi' is obtained as follows.

Figure pat00021
Figure pat00021

Figure pat00022
Figure pat00022

(3) nDp 는 dEp1+1이 된다.(3) nDp becomes dEp1+1.

- [1] qi가 I_PCM 블록의 샘플이 아니거나, pcm_loop_filter_disable_flag가 0이고, [2] qi가 인터 예측 모드로 부호화된 블록에 속하고, [3] pi가 인트라 예측 모드로 부호화된 블록에 속하고, [4] dE가 2인 경우, nDq를 3으로 하고 qi에 다음과 같은 강한 필터를 적용한다.- [1] qi is not a sample of the I_PCM block, pcm_loop_filter_disable_flag is 0, [2] qi belongs to a block coded in inter prediction mode, [3] pi belongs to a block coded in intra prediction mode, and , [4] When dE is 2, nDq is set to 3 and the following strong filter is applied to qi.

Figure pat00023
Figure pat00023

Figure pat00024
Figure pat00024

Figure pat00025
Figure pat00025

여기서, Clip3(a, b, c)는 a와 b의 범위 내로 c를 클립핑(clipping)하는 것을 나타낸다.Here, Clip3(a, b, c) represents clipping c within the range of a and b.

- [1] qi가 I_PCM 블록의 샘플이 아니거나, pcm_loop_filter_disable_flag가 0이고, [2] qi가 인터 예측 모드로 부호화된 블록에 속하고, [3] pi가 인트라 예측 모드로 부호화된 블록에 속하고, [4] dE가 2가 아닌 경우, nDq를 1로 하고 qi에 약한 필터를 적용한다.- [1] qi is not a sample of the I_PCM block, pcm_loop_filter_disable_flag is 0, [2] qi belongs to a block coded in inter prediction mode, [3] pi belongs to a block coded in intra prediction mode, and , [4] If dE is not 2, nDq is set to 1 and a weak filter is applied to qi.

Figure pat00026
Figure pat00026

abs(Δ)가 tc*10보다 작으면, 다음과 같은 단계가 적용된다.If abs(Δ) is less than tc*10, the following steps are applied.

(1) q0'가 다음과 같이 구해진다.(1) q0' is obtained as follows.

Figure pat00027
Figure pat00027

Figure pat00028
Figure pat00028

여기서, Clip1Y(x)는 수학식 27과 같이 정의된다.Here, Clip1Y(x) is defined as in Equation 27.

Figure pat00029
Figure pat00029

여기서, BitDepthY는 휘도 성분의 비트 깊이(bit depth)를 나타낸다.Here, BitDepthY represents the bit depth of the luminance component.

(2) dEq1이 1이면, qi'가 다음과 같이 구해진다.(2) If dEq1 is 1, qi' is obtained as follows.

Figure pat00030
Figure pat00030

Figure pat00031
Figure pat00031

(3) nDq 는 dEq1+1이 된다.(3) nDq becomes dEq1+1.

한편, 휘도(luma) 샘플에 대해 디블록킹 필터링을 다음과 같이 수행할 수도 있다.Meanwhile, deblocking filtering may be performed on the luma sample as follows.

<휘도(luma) 샘플에 대한 디블록킹 필터링 수행 과정 2><Process of performing deblocking filtering on luminance (luma) samples 2>

- 입력- input

(1) 샘플 값: pi, qi (i = 0...3)(1) Sample values: pi, qi (i = 0...3)

(2) p1과 q1 각각의 샘플들에 대한 필터 적용 여부: dEp1, dEq1(2) Whether to apply a filter to each of p1 and q1 samples: dEp1, dEq1

(3) 필터를 적용하기 위한 임계치: tc(3) Threshold for applying the filter: tc

*- 출력*- Print

(1) 필터링된 샘플 수: nDp, nDq(1) Number of filtered samples: nDp, nDq

(2) 필터링된 샘플 값: pi', qj'(i = 0...nDp -1, j = 0...nDq - 1)(2) Filtered sample values: pi', qj' (i = 0...nDp -1, j = 0...nDq - 1)

- dE가 2이면, nDp 와 nDq를 3으로 하고, 강한 필터를 적용한다.- If dE is 2, set nDp and nDq to 3, and apply a strong filter.

Figure pat00032
Figure pat00032

Figure pat00033
Figure pat00033

Figure pat00034
Figure pat00034

Figure pat00035
Figure pat00035

Figure pat00036
Figure pat00036

Figure pat00037
Figure pat00037

여기서, Clip3(a, b, c)는 a와 b의 범위 내로 c를 클립핑(clipping)하는 것을 나타낸다.Here, Clip3(a, b, c) represents clipping c within the range of a and b.

- dE가 2가 아니면, nDp 와 nDq를 1로 하고 약한 필터를 적용한다.- If dE is not 2, set nDp and nDq to 1 and apply a weak filter.

Figure pat00038
Figure pat00038

abs(Δ)가 tc*10보다 작으면, 다음과 같은 단계가 적용된다.If abs(Δ) is less than tc*10, the following steps are applied.

(1) p0' 와 q0'가 다음과 같이 구해진다.(1) p0' and q0' are obtained as follows.

Figure pat00039
Figure pat00039

Figure pat00040
Figure pat00040

Figure pat00041
Figure pat00041

여기서, Clip1Y(x)는 수학식 40과 같이 정의된다.Here, Clip1Y(x) is defined as in Equation (40).

Figure pat00042
Figure pat00042

여기서, BitDepthY는 휘도 성분의 비트 깊이(bit depth)를 나타낸다.Here, BitDepthY represents the bit depth of the luminance component.

(2) dEp1이 1이면, pi'가 다음과 같이 구해진다.(2) If dEp1 is 1, pi' is obtained as follows.

Figure pat00043
Figure pat00043

Figure pat00044
Figure pat00044

(3) dEq1이 1이면, qi'가 다음과 같이 구해진다.(3) If dEq1 is 1, qi' is obtained as follows.

Figure pat00045
Figure pat00045

Figure pat00046
Figure pat00046

(4) nDp는 dEp1+1이 되고, nDq는 dEq1+1이 된다.(4) nDp becomes dEp1+1, and nDq becomes dEq1+1.

- 다음의 두 조건 중 적어도 하나 이상을 만족하는 경우, pi'(i = 0...nDp-1)는 입력 샘플 pi로 변경된다.- If at least one of the following two conditions is satisfied, pi' (i = 0...nDp-1) is changed to the input sample pi.

(1) pi가 I_PCM 블록의 샘플이고, pcm_loop_filter_disable_flag가 1이다.(1) pi is a sample of the I_PCM block, and pcm_loop_filter_disable_flag is 1.

(2) pi는 인트라 예측 모드로 부호화된 블록에 속하고, qi는 인터 예측 모드로 부호화된 블록에 속한다.(2) pi belongs to a block coded in the intra prediction mode, and qi belongs to a block coded in the inter prediction mode.

- 다음의 두 조건 중 적어도 하나 이상을 만족하는 경우, qj' (j = 0...nDq-1) 는 입력 샘플 qj로 변경된다.- If at least one of the following two conditions is satisfied, qj' (j = 0...nDq-1) is changed to the input sample qj.

(1) qj가 I_PCM 블록의 샘플이고, pcm_loop_filter_disable_flag가 1이다.(1) qj is a sample of an I_PCM block, and pcm_loop_filter_disable_flag is 1.

(2) qj는 인트라 예측 모드로 부호화된 블록에 속하고, pj는 인터 예측 모드로 부호화된 블록에 속한다.(2) qj belongs to a block coded in the intra prediction mode, and pj belongs to a block coded in the inter prediction mode.

한편, 색차(chroma) 샘플에 대해 디블록킹 필터링을 다음과 같이 수행할 수 있다.Meanwhile, deblocking filtering may be performed on a chroma sample as follows.

<색차(chroma) 샘플에 대한 디블록킹 필터링 수행 과정 1><Process of performing deblocking filtering on chroma samples 1>

- 입력- input

(1) 샘플 값: pi, qi (i = 0, 1)(1) Sample values: pi, qi (i = 0, 1)

(2) 필터를 적용하기 위한 임계치: tc(2) Threshold for applying the filter: tc

- 출력- Print

*(1) 필터링된 샘플 값: p0', q0'*(1) Filtered sample values: p0', q0'

- [1] pi가 I_PCM 블록의 샘플이 아니거나, pcm_loop_filter_disable_flag가 0이고, [2] pi가 인터 예측 모드로 부호화된 블록에 속하고, [3] qi가 인트라 예측 모드로 부호화된 블록에 속하는 경우, 다음과 같은 필터를 적용한다.- [1] pi is not a sample of the I_PCM block, pcm_loop_filter_disable_flag is 0, [2] pi belongs to a block coded in inter prediction mode, and [3] qi belongs to a block coded in intra prediction mode , apply the following filter.

Figure pat00047
Figure pat00047

Figure pat00048
Figure pat00048

- [1] qi가 I_PCM 블록의 샘플이 아니거나, pcm_loop_filter_disable_flag가 0이고, [2] qi가 인터 예측 모드로 부호화된 블록에 속하고, [3] pi가 인트라 예측 모드로 부호화된 블록에 속하는 경우, 다음과 같은 필터를 적용한다.- [1] When qi is not a sample of the I_PCM block, pcm_loop_filter_disable_flag is 0, [2] qi belongs to a block coded in inter prediction mode, and [3] pi belongs to a block coded in intra prediction mode , apply the following filter.

Figure pat00049
Figure pat00049

Figure pat00050
Figure pat00050

한편, 색차(chroma) 샘플에 대해 디블록킹 필터링을 다음과 같이 수행할 수도 있다.Meanwhile, deblocking filtering may be performed on a chroma sample as follows.

<색차(chroma) 샘플에 대한 디블록킹 필터링 수행 과정 2><Process of performing deblocking filtering on chroma samples 2>

- 입력- input

(1) 샘플 값: pi, qi (i = 0, 1)(1) Sample values: pi, qi (i = 0, 1)

(2) 필터를 적용하기 위한 임계치: tc(2) Threshold for applying the filter: tc

- 출력- Print

(1) 필터링된 샘플 값: p0', q0'(1) Filtered sample values: p0', q0'

- 다음의 필터를 적용한다.- Apply the following filters.

Figure pat00051
Figure pat00051

Figure pat00052
Figure pat00052

Figure pat00053
Figure pat00053

- 다음의 두 조건 중 적어도 하나 이상을 만족하는 경우, p0'는 입력 샘플 p0로 변경된다.- If at least one of the following two conditions is satisfied, p0' is changed to the input sample p0.

(1) p0가 I_PCM 블록의 샘플이고, pcm_loop_filter_disable_flag가 1이다.(1) p0 is a sample of the I_PCM block, and pcm_loop_filter_disable_flag is 1.

(2) p0는 인트라 예측 모드로 부호화된 블록에 속하고, q0는 인터 예측 모드로 부호화된 블록에 속한다.(2) p0 belongs to a block coded in the intra prediction mode, and q0 belongs to a block coded in the inter prediction mode.

- 다음의 두 조건 중 적어도 하나 이상을 만족하는 경우, q0'는 입력 샘플 q0로 변경된다.- If at least one of the following two conditions is satisfied, q0' is changed to the input sample q0.

(1) q0가 I_PCM 블록의 샘플이고, pcm_loop_filter_disable_flag가 1이다.(1) q0 is a sample of an I_PCM block, and pcm_loop_filter_disable_flag is 1.

(2) q0는 인트라 예측 모드로 부호화된 블록에 속하고, p0는 인터 예측 모드로 부호화된 블록에 속한다.(2) q0 belongs to a block coded in the intra prediction mode, and p0 belongs to a block coded in the inter prediction mode.

한편, CIP 모드가 사용되고, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 샘플에 대해 필터링을 수행하지 않을 수 있다(S332[2]).On the other hand, when the CIP mode is used and the encoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks coded in the intra prediction mode and the inter prediction mode, respectively, the video encoder performs filtering Filtering may not be performed on samples located on both sides of the target boundary (S332[2]).

예를 들어, 필터링 대상 경계의 양측에 위치하는 블록들 중 하나의 블록이 인트라 예측 모드(PU_2Nx2N 또는 PU_NxN)로 부호화된 경우, 필터링 강도를 결정하지 않고, 필터링을 수행하지 않을 수 있다.For example, when one of blocks located on both sides of the filtering target boundary is encoded in the intra prediction mode (PU_2Nx2N or PU_NxN), filtering strength may not be determined and filtering may not be performed.

또한, CIP 모드가 사용되고, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 영상 부호화기는 필터링을 수행하지 않은 것과 같이 필터링 강도를 '0'으로 결정할 수도 있다. 수학식 52는 필터링 강도를 '0'으로 결정하는 일 예를 나타낸다.In addition, when the CIP mode is used and the encoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks coded in the intra prediction mode and the inter prediction mode, respectively, the video encoder performs filtering It may be determined that the filtering strength is '0' as in not performing . Equation 52 shows an example of determining the filtering strength as '0'.

Figure pat00054
Figure pat00054

여기서, bS는 필터링 강도, filterDir는 1차원 필터의 적용 방향(수직/수평), xEk와 yEj는 필터링 대상 경계의 위치를 나타낸다.Here, bS is the filtering strength, filterDir is the application direction of the one-dimensional filter (vertical/horizontal), and xEk and yEj are the positions of the filtering target boundary.

한편, 필터링 대상 블록이 I_PCM 블록이고, pcm_loop_filter_disable_flag가 '1'이면, 디블록킹 필터링을 수행하지 않는다. 여기서, I_PCM 블록은 필터링 대상 블록이 압축되지 않은 원본 샘플을 이용하는 PCM 모드로 부호화된 블록임을 의미하고, pcm_loop_filter_disable_flag는 I_PCM 블록의 복원된 픽셀에 루프 필터 과정이 수행되는지를 나타내기 위한 플래그이다. 따라서, 필터링 대상 블록이 I_PCM 블록인 경우도 포함하여, 필터링의 수행 여부를 결정할 수 있다.On the other hand, if the filtering target block is an I_PCM block and pcm_loop_filter_disable_flag is '1', deblocking filtering is not performed. Here, the I_PCM block means that the block to be filtered is a block coded in the PCM mode using the uncompressed original sample, and the pcm_loop_filter_disable_flag is a flag for indicating whether a loop filter process is performed on reconstructed pixels of the I_PCM block. Accordingly, it is possible to determine whether to perform filtering, including when the filtering target block is an I_PCM block.

도 10은 CIP 모드 및 PCM 모드의 사용 여부와 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반한 디블록킹 필터링을 수행하는 방법을 나타낸 흐름도이다.10 is a flowchart illustrating a method of performing deblocking filtering based on whether CIP mode and PCM mode are used and encoding parameters of blocks located on both sides of a filtering target boundary.

CIP 모드가 사용되는 경우, 즉 constrained_intra_pred_flag가 '1'인 경우, 필터링 대상 경계의 양측에 위치하는 블록 P와 Q의 부호화 모드를 판별한다.When the CIP mode is used, that is, when constrained_intra_pred_flag is '1', the encoding modes of blocks P and Q located on both sides of the filtering target boundary are determined.

필터링 대상 경계의 양측에 위치하는 블록이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 경우, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 샘플들 중 인트라 예측 모드로 부호화된 블록에 속하는 샘플들에 대해 필터링을 수행하지 않는다.When blocks located on both sides of the boundary to be filtered are coded in the intra prediction mode and the inter prediction mode, respectively, the image encoder performs analysis on samples belonging to the block coded in the intra prediction mode among samples located on both sides of the boundary to be filtered. No filtering is performed.

필터링 대상 경계의 양측에 위치하는 블록이 모두 인트라 예측 모드로 부호화된 경우, 또는 필터링 대상 경계의 양측에 위치하는 블록이 모두 인터 예측 모드로 부호화된 경우, 영상 부호화기는 pcm_loop_filter_disable_flag를 판별한다.When all blocks located on both sides of the filtering target boundary are coded in the intra prediction mode, or when all blocks located on both sides of the filtering target boundary are coded in the inter prediction mode, the video encoder determines pcm_loop_filter_disable_flag.

pcm_loop_filter_disable_flag가 '1'인 경우, 필터링 대상 경계의 양측에 위치하는 블록 P와 Q가 각각 I_PCM 블록인지 판별하고, I_PCM 블록인 블록에 대해 필러링을 수행하지 않는다.When pcm_loop_filter_disable_flag is '1', it is determined whether blocks P and Q located on both sides of the filtering target boundary are I_PCM blocks, respectively, and filtering is not performed on blocks that are I_PCM blocks.

CIP 모드가 사용되지 않는 경우, 즉 constrained_intra_pred_flag가 '0'인 경우, 영상 부호화기는 pcm_loop_filter_disable_flag를 판별한다.When the CIP mode is not used, that is, when constrained_intra_pred_flag is '0', the video encoder determines pcm_loop_filter_disable_flag.

pcm_loop_filter_disable_flag가 '1'인 경우, 필터링 대상 경계의 양측에 위치하는 블록 P와 Q가 각각 I_PCM 블록인지 판별하고, I_PCM 블록인 블록에 대해 필러링을 수행하지 않는다.When pcm_loop_filter_disable_flag is '1', it is determined whether blocks P and Q located on both sides of the filtering target boundary are I_PCM blocks, respectively, and filtering is not performed on blocks that are I_PCM blocks.

도 11은 본 발명의 일 실시예에 따른 인-루프 필터링 방법(복호화)을 나타낸 흐름도이다.11 is a flowchart illustrating an in-loop filtering method (decoding) according to an embodiment of the present invention.

복호화기는 부호화기와 동일한 방법으로 인-루프 필터링의 수행 여부를 결정할 수 있다. 즉, 영상 복호화기는 CIP 모드의 사용 여부를 판별한다(S1110).The decoder may determine whether to perform in-loop filtering in the same way as the encoder. That is, the video decoder determines whether the CIP mode is used (S1110).

CIP 모드가 사용되는 경우, 영상 복호화기는 복호화 대상 블록의 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들을 판별한다(S1120).When the CIP mode is used, the video decoder determines decoding parameters of blocks located on both sides of the filtering target boundary of the decoding target block (S1120).

영상 복호화기는 CIP 모드의 사용 여부와 필터링 대상 경계의 양측에 위치하는 블록의 복호화 파라미터에 기반하여 인-루프 필터의 적용 여부를 결정한다.The video decoder determines whether to apply the in-loop filter based on whether the CIP mode is used and the decoding parameters of blocks located on both sides of the filtering target boundary.

예를 들어, CIP 모드가 사용되지 않는 경우, 영상 복호화기는 필터링 대상 경계의 양측에 위치하는 샘플에 대해 필터링을 수행한다(S1130).For example, when the CIP mode is not used, the image decoder performs filtering on samples located on both sides of the filtering target boundary ( S1130 ).

예를 들어, CIP 모드가 사용되고 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인트라 예측 모드로 복호화된 블록임을 나타내는 경우, 영상 복호화기는 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 필터링을 수행한다(S1131). For example, when the CIP mode is used and the decoding parameters of blocks located on both sides of the filtering target boundary indicate that all blocks located on both sides of the filtering target boundary are blocks decoded in the intra prediction mode, the video decoder Filtering is performed on samples located on both sides (S1131).

예를 들어, CIP 모드가 사용되고 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 영상 복호화기는 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 디블록킹 필터를 적용하지 않을 수 있다(S1133[1]).For example, when the CIP mode is used and decoding parameters of blocks located on both sides of the filtering target boundary indicate that all blocks located on both sides of the filtering target boundary are blocks decoded in the inter prediction mode, the video decoder The deblocking filter may not be applied to the samples located on both sides (S1133[1]).

예를 들어, CIP 모드가 사용되고 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 영상 복호화기는 필터링 대상 경계의 양측에 위치하는 샘플에 대해 필터링을 수행할 수도 있다(S1133[2]).For example, when the CIP mode is used and decoding parameters of blocks located on both sides of the filtering target boundary indicate that all blocks located on both sides of the filtering target boundary are blocks decoded in the inter prediction mode, the video decoder Filtering may be performed on samples located on both sides (S1133[2]).

예를 들어, CIP 모드가 사용되고 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 영상 복호화기는 필터링 대상 경계의 양측에 위치하는 샘플들 중 인터 예측 모드로 복호화된 블록에 속하는 샘플들에 대해서만 필터링을 수행할 수 있다(S1132[1]).For example, when the CIP mode is used and the decoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks decoded in the intra prediction mode and the inter prediction mode, respectively, the video decoder Filtering may be performed only on samples belonging to a block decoded in the inter prediction mode among samples located on both sides of the filtering target boundary (S1132[1]).

예를 들어, CIP 모드가 사용되고 필터링 대상 경계의 양측에 위치하는 블록들의 복호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 복호화된 블록임을 나타내는 경우, 영상 복호화기는 필터링 대상 경계의 양측에 위치하는 샘플에 대해 필터링을 수행하지 않을 수 있다(S1132[2]).For example, when the CIP mode is used and the decoding parameters of blocks located on both sides of the filtering target boundary indicate that blocks located on both sides of the filtering target boundary are blocks decoded in the intra prediction mode and the inter prediction mode, respectively, the video decoder Filtering may not be performed on samples located on both sides of the filtering target boundary (S1132[2]).

도 12는 본 발명의 일 실시예에 따른 영상 부호화 방법을 나타낸 흐름도이다.12 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

영상 부호화기는 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링한다(S1210). 여기서, 제한된 인-루프 필터는 CIP 모드의 사용 여부와 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반하여 적용되는 인-루프 필터를 의미하고, 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링한다는 것은 부호화기(encoder)에서 제한된 인-루프 필터의 사용 여부를 나타내는 플래그(flag)와 같은 지시자(indicator)를 비트스트림(bitstram)에 삽입하고, 복호화기(decoder)에서 파싱(parsing)하는 것을 의미한다.The video encoder signals information for determining whether to use the limited in-loop filter (S1210). Here, the restricted in-loop filter refers to an in-loop filter applied based on whether the CIP mode is used and the coding parameters of blocks located on both sides of the filtering target boundary, and to determine whether to use the restricted in-loop filter Signaling information for this means inserting an indicator such as a flag indicating whether to use a restricted in-loop filter in the encoder into the bitstream, and parsing it in the decoder. ) means to

제한된 인-루프 필터가 사용되는 경우, [1] 필터링 대상 경계의 양측에 위치하는 샘플들 중 인터 예측 모드로 부호화된 블록에 속하는 샘플들에 대해서만 필터링을 수행하거나, [2] 필터링 대상 경계의 양측에 위치하는 샘플들에 필터링을 수행하지 않거나, [3] 필터링 대상 경계의 양측에 위치하는 샘플들에 필터링을 수행할 수 있다.When the limited in-loop filter is used, [1] filtering is performed only on samples belonging to blocks encoded in the inter prediction mode among samples located on both sides of the boundary to be filtered, or [2] from both sides of the boundary to be filtered Filtering may not be performed on samples located in [3], or filtering may be performed on samples located on both sides of the filtering target boundary.

예를 들어, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 각각 인트라 예측 모드와 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들 중 인터 예측 모드로 부호화된 블록에 속하는 샘플들에 대해서만 필터링을 수행할 수 있다.For example, when the encoding parameters of blocks located on both sides of the filtering object boundary indicate that blocks located on both sides of the filtering object boundary are blocks encoded in the intra prediction mode and the inter prediction mode, respectively, located on both sides of the filtering object boundary Filtering may be performed only on samples belonging to blocks encoded in the inter prediction mode among the samples to be used.

예를 들어, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인터 예측 모드로 부호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 필터링을 수행하지 않을 수 있다.For example, when the encoding parameters of blocks located on both sides of the boundary to be filtered indicate that all blocks located on both sides of the boundary to be filtered are blocks coded in the inter prediction mode, samples located on both sides of the boundary to be filtered are Filtering may not be performed.

예를 들어, 필터링 대상 경계의 양측에 위치하는 블록들의 부호화 파라미터들이 필터링 대상 경계의 양측에 위치하는 블록들이 모두 인트라 예측 모드로 부호화된 블록임을 나타내는 경우, 필터링 대상 경계의 양측에 위치하는 샘플들에 대해 필터링을 수행할 수 있다.For example, when the encoding parameters of blocks located on both sides of the boundary to be filtered indicate that all blocks located on both sides of the boundary to be filtered are blocks coded in the intra prediction mode, samples located on both sides of the boundary to be filtered are filtering can be performed.

부호화기는 상기 예들 중 적어도 하나 이상이 적용됨을 나타내는 정보, 즉 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링할 수 있다. 이때, 시그널링은 부호화 유닛(Coding Unit: CU), 예측 유닛(Prediction Unit: PU), 변환 유닛(Transform Unit: TU), LCU(Largest Coding Unit), 슬라이스(slice) 단위 또는 픽쳐(picture) 단위로 수행될 수 있다.The encoder may signal information indicating that at least one of the above examples is applied, that is, information for determining whether to use a limited in-loop filter. In this case, the signaling is performed in a coding unit (CU), a prediction unit (PU), a transform unit (TU), a largest coding unit (LCU), a slice unit, or a picture unit. can be performed.

예를 들어, 제한된 인-루프 필터의 사용 여부를 나타내는 정보를 PPS를 통해 시그널링하는 경우, 표 3과 같이 constrained_in_loop_filter_flag를 전송할 수 있다.For example, when information indicating whether the restricted in-loop filter is used or not is signaled through the PPS, constrained_in_loop_filter_flag may be transmitted as shown in Table 3.

Figure pat00055
Figure pat00055

이때, constrained_in_loop_filter_flag가 '1'인 경우, 제한된 인-루프 필터를 사용하고, constrained_in_loop_filter_flag가 '0'인 경우, 제한된 인-루프 필터를 사용하지 않을 수 있다.In this case, when constrained_in_loop_filter_flag is '1', the restricted in-loop filter may be used, and when constrained_in_loop_filter_flag is '0', the restricted in-loop filter may not be used.

한편, 영상 부호화기는 CIP 모드의 사용 여부에 기반하여 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링할 것인지 결정할 수 있다.Meanwhile, the video encoder may determine whether to signal information for determining whether to use the restricted in-loop filter based on whether the CIP mode is used.

예를 들어, CIP 모드가 사용되는 경우(constrained_intra_pred_flag = 1), 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링하고, CIP 모드가 사용되지 않는 경우(constrained_intra_pred_flag = 0), 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링하지 않을 수 있다.For example, when the CIP mode is used (constrained_intra_pred_flag = 1), information for determining whether to use a restricted in-loop filter is signaled, and when the CIP mode is not used (constrained_intra_pred_flag = 0), the restricted in-loop Information for determining whether to use a filter may not be signaled.

또한, 영상 부호화기는 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반하여 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링할 것인지 결정할 수 있다.Also, the video encoder may determine whether to signal information for determining whether to use the restricted in-loop filter based on the encoding parameters of blocks located on both sides of the filtering target boundary.

예를 들어, 필터링 대상 경계의 양측에 위치하는 블록들 중에서 하나 이상의 블록이 인터 예측 모드로 부호화된 경우, 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링할 수 있다.For example, when one or more blocks among blocks located on both sides of a filtering target boundary are encoded in the inter prediction mode, information for determining whether to use a restricted in-loop filter may be signaled.

표 4는 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반하여 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 시그널링할 것인지 결정하는 일 예를 나타낸다.Table 4 shows an example of determining whether to signal information for determining whether to use a restricted in-loop filter based on encoding parameters of blocks located on both sides of a filtering target boundary.

Figure pat00056
Figure pat00056

또한, 영상 부호화기는 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 기본적으로 시그널링할 수도 있다.Also, the video encoder may basically signal information for determining whether to use the limited in-loop filter.

영상 부호화기는 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터를 판별한다(S1220). 이때, 영상 부호화기는 도 3의 "필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터를 판별하는 단계(S320)"와 같은 방법으로 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터를 판별할 수 있다.The video encoder determines encoding parameters of blocks located on both sides of the filtering target boundary (S1220). At this time, the video encoder may determine the encoding parameters of the blocks located on both sides of the filtering target boundary in the same way as in the “step of determining the encoding parameters of the blocks located on both sides of the filtering target boundary ( S320 )” of FIG. 3 . .

영상 부호화기는 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보 및 필터링 대상 경계의 양측에 위치하는 블록의 부호화 파라미터에 기반하여 인-루프 필터의 적용 여부를 결정한다(S1230).The video encoder determines whether to apply the in-loop filter based on the information for determining whether to use the restricted in-loop filter and the encoding parameters of blocks located on both sides of the filtering target boundary (S1230).

도 13은 본 발명의 일 실시예에 따른 영상 복호화 방법을 나타낸 흐름도이다.13 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

복호화기는 부호화기와 상응하는 방법으로 제한된 인-루프 필터의 사용 여부를 결정할 수 있다. 즉, 영상 복호화기는 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보를 파싱한다(S1310). The decoder may determine whether to use the restricted in-loop filter in a method corresponding to that of the encoder. That is, the image decoder parses information for determining whether to use the limited in-loop filter (S1310).

영상 복호화기는 필터링 대상 경계의 양측에 위치하는 블록의 복호화 파라미터를 판별한다(S1320).The image decoder determines decoding parameters of blocks located on both sides of the filtering target boundary (S1320).

영상 복호화기는 제한된 인-루프 필터의 사용 여부를 판별하기 위한 정보 및 필터링 대상 경계의 양측에 위치하는 블록의 복호화 파라미터에 기반하여 인-루프 필터의 적용 여부를 결정한다(S1330).The image decoder determines whether to apply the in-loop filter based on the information for determining whether to use the limited in-loop filter and the decoding parameters of blocks located on both sides of the filtering target boundary (S1330).

상술한 단계들의 순서에 한정되는 것은 아니며, 일부의 단계는 다른 단계와, 다른 순서 또는 동시에 발생할 수 있다. 또한, 본 발명이 속하는 기술 분야의 통상의 지식을 가진자라면 순서도에 나타낸 단계들은 배타적이지 않으며, 다른 단계가 포함되거나, 일부의 단계가 삭제될 수 있음을 이해할 수 있을 것이다.It is not limited to the order of the steps described above, and some steps may occur with other steps, in a different order, or at the same time. In addition, those of ordinary skill in the art to which the present invention pertains will understand that the steps shown in the flowchart are not exclusive, and other steps may be included or some steps may be deleted.

또한, 상술한 실시예들은 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위해, 모든 가능한 조합을 기술할 수는 없지만, 본 발명이 속하는 기술 분야의 통상의 지식을 가진자라면 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.In addition, the above-described embodiments include examples of various aspects. It is not possible to describe every possible combination in order to represent various aspects, but one of ordinary skill in the art will recognize that other combinations are possible. Accordingly, it is intended that the present invention cover all other substitutions, modifications and variations falling within the scope of the following claims.

Claims (5)

현재 블록의 주변 샘플들로부터 참조 샘플들을 구성하는 단계; 및
상기 참조 샘플들을 이용한 상기 현재 블록에 대한 예측에 기반하여 복원 블록을 생성하는 단계를 포함하고,
상기 참조 샘플들을 구성하는 단계는,
상기 현재 블록의 주변 샘플들 중 인트라 예측에 사용될 수 없는 비가용 샘플의 샘플값을 상기 현재 블록의 주변 샘플들 중 인트라 예측에 사용될 수 있는 가용 샘플의 샘플값으로 대체하는 단계를 포함하고,
상기 비가용 샘플이 상기 현재 블록의 좌측에 위치한 주변 샘플인 경우, 상기 가용 샘플은 상기 비가용 샘플의 하단에 위치한 샘플이고,
인트라 예측 모드로 부호화되지 않은 블록에 속하는 샘플이 상기 비가용 샘
플로 결정되는 영상 복호화 방법.
constructing reference samples from neighboring samples of the current block; and
generating a reconstructed block based on prediction of the current block using the reference samples;
The step of constructing the reference samples comprises:
Replacing sample values of unavailable samples that cannot be used for intra prediction among neighboring samples of the current block with sample values of available samples that can be used for intra prediction among neighboring samples of the current block;
When the unavailable sample is a neighboring sample located to the left of the current block, the available sample is a sample located at a lower end of the unavailable sample,
A sample belonging to a block not coded in the intra prediction mode is the unavailable sample.
Flow-determined video decoding method.
제1항에 있어서,
상기 비가용 샘플이 상기 현재 블록의 상단에 위치한 주변 샘플인 경우, 상기 가용 샘플은 상기 비가용 샘플의 좌측에 위치한 샘플인 영상 복호화 방법.
The method of claim 1,
When the unavailable sample is a neighboring sample located at the top of the current block, the available sample is a sample located to the left of the unavailable sample.
현재 블록의 주변 샘플들로부터 참조 샘플들을 구성하는 단계; 및
상기 참조 샘플들을 이용한 상기 현재 블록에 대한 예측에 기반하여 복원 블록을 생성하는 단계를 포함하고,
상기 참조 샘플들을 구성하는 단계는,
상기 현재 블록의 주변 샘플들 중 인트라 예측에 사용될 수 없는 비가용 샘플의 샘플값을 상기 현재 블록의 주변 샘플들 중 인트라 예측에 사용될 수 있는 가용 샘플의 샘플값으로 대체하는 단계를 포함하고,
상기 비가용 샘플이 상기 현재 블록의 좌측에 위치한 주변 샘플인 경우, 상기 가용 샘플은 상기 비가용 샘플의 하단에 위치한 샘플이고,
인트라 예측 모드로 부호화되지 않은 블록에 속하는 샘플이 상기 비가용 샘플로 결정되는 영상 부호화 방법.
constructing reference samples from neighboring samples of the current block; and
generating a reconstructed block based on prediction of the current block using the reference samples;
The step of constructing the reference samples comprises:
Replacing sample values of unavailable samples that cannot be used for intra prediction among neighboring samples of the current block with sample values of available samples that can be used for intra prediction among neighboring samples of the current block;
When the unavailable sample is a neighboring sample located to the left of the current block, the available sample is a sample located at a lower end of the unavailable sample,
An image encoding method in which a sample belonging to a block that is not encoded in the intra prediction mode is determined as the unusable sample.
제3항에 있어서,
상기 비가용 샘플이 상기 현재 블록의 상단에 위치한 주변 샘플인 경우, 상기 가용 샘플은 상기 비가용 샘플의 좌측에 위치한 샘플인 영상 부호화 방법.
4. The method of claim 3,
When the unavailable sample is a neighboring sample located at the top of the current block, the available sample is a sample located to the left of the unavailable sample.
영상 부호화 방법에 의해 생성된 비트스트림을 저장한 컴퓨터 판독가능한 기
록매체로서,
상기 영상 부호화 방법은,
현재 블록의 주변 샘플들로부터 참조 샘플들을 구성하는 단계; 및
상기 참조 샘플들을 이용한 상기 현재 블록에 대한 예측에 기반하여 복원 블록을 생성하는 단계를 포함하고,
상기 참조 샘플들을 구성하는 단계는,
상기 현재 블록의 주변 샘플들 중 인트라 예측에 사용될 수 없는 비가용 샘플의 샘플값을 상기 현재 블록의 주변 샘플들 중 인트라 예측에 사용될 수 있는 가용 샘플의 샘플값으로 대체하는 단계를 포함하고,
상기 비가용 샘플이 상기 현재 블록의 좌측에 위치한 주변 샘플인 경우, 상기 가용 샘플은 상기 비가용 샘플의 하단에 위치한 샘플이고,
인트라 예측 모드로 부호화되지 않은 블록에 속하는 샘플이 상기 비가용 샘플로 결정되는 기록매체.
A computer readable device storing a bitstream generated by an image encoding method
As a rock medium,
The video encoding method comprises:
constructing reference samples from neighboring samples of the current block; and
generating a reconstructed block based on prediction of the current block using the reference samples;
The step of constructing the reference samples comprises:
Replacing sample values of unavailable samples that cannot be used for intra prediction among neighboring samples of the current block with sample values of available samples that can be used for intra prediction among neighboring samples of the current block;
When the unavailable sample is a neighboring sample located to the left of the current block, the available sample is a sample located at a lower end of the unavailable sample,
A recording medium in which a sample belonging to a block not coded in the intra prediction mode is determined as the unusable sample.
KR1020220115953A 2011-05-04 2022-09-14 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same KR20220130067A (en)

Applications Claiming Priority (9)

Application Number Priority Date Filing Date Title
KR1020110042694 2011-05-04
KR20110042694 2011-05-04
KR1020110052610 2011-06-01
KR20110052610 2011-06-01
KR1020110065713 2011-07-01
KR20110065713 2011-07-01
KR1020120039422 2012-04-16
KR1020120039422A KR20120125160A (en) 2011-05-04 2012-04-16 Method and apparatus for video encoding and decoding using error resilient filtering
KR1020210006477A KR20210008558A (en) 2011-05-04 2021-01-18 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020210006477A Division KR20210008558A (en) 2011-05-04 2021-01-18 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same

Publications (1)

Publication Number Publication Date
KR20220130067A true KR20220130067A (en) 2022-09-26

Family

ID=66846855

Family Applications (5)

Application Number Title Priority Date Filing Date
KR1020190064413A KR102112264B1 (en) 2011-05-04 2019-05-31 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
KR1020190123933A KR102115822B1 (en) 2011-05-04 2019-10-07 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
KR1020200056585A KR102206225B1 (en) 2011-05-04 2020-05-12 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
KR1020210006477A KR20210008558A (en) 2011-05-04 2021-01-18 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
KR1020220115953A KR20220130067A (en) 2011-05-04 2022-09-14 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same

Family Applications Before (4)

Application Number Title Priority Date Filing Date
KR1020190064413A KR102112264B1 (en) 2011-05-04 2019-05-31 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
KR1020190123933A KR102115822B1 (en) 2011-05-04 2019-10-07 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
KR1020200056585A KR102206225B1 (en) 2011-05-04 2020-05-12 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
KR1020210006477A KR20210008558A (en) 2011-05-04 2021-01-18 Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same

Country Status (1)

Country Link
KR (5) KR102112264B1 (en)

Also Published As

Publication number Publication date
KR102112264B1 (en) 2020-05-18
KR20200053462A (en) 2020-05-18
KR20190116228A (en) 2019-10-14
KR102115822B1 (en) 2020-05-27
KR20190065213A (en) 2019-06-11
KR20210008558A (en) 2021-01-22
KR102206225B1 (en) 2021-01-22

Similar Documents

Publication Publication Date Title
RU2765234C1 (en) Method for internal prediction and the encoder and decoder using it
KR102229157B1 (en) Image information encoding and decoding method
KR102014177B1 (en) Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
EP2781095B1 (en) Adaptive overlapped block motion compensation
US9161046B2 (en) Determining quantization parameters for deblocking filtering for video coding
KR102219231B1 (en) Method and apparatus for encoding/decoding image information
US20150071357A1 (en) Partial intra block copying for video coding
JP2018507616A (en) Flexible segmentation of prediction units
EP3117615A1 (en) Deblock filtering using pixel distance
US20150098504A1 (en) Block vector coding for intra block copying
KR20230098714A (en) Image processing method and apparatus therefor
US20130170562A1 (en) Deblocking decision functions for video coding
KR102294016B1 (en) Video encoding and decoding method using deblocking fitering with transform skip and apparatus using the same
EP2936819B1 (en) Deblocking filter with reduced line buffer
KR102206225B1 (en) Video encoding/decoding method using error-resilient in-loop filter and signaling method relating to the same
KR101475286B1 (en) Method and apparatus for intra prediction, and apparatus for processing picture
KR102410326B1 (en) Method and apparatus for encoding/decoding a video signal
KR20130070215A (en) Method and apparatus for seletcing the adaptive depth information and processing deblocking filtering

Legal Events

Date Code Title Description
A107 Divisional application of patent
E902 Notification of reason for refusal
E90F Notification of reason for final refusal