KR102635240B1 - Method and apparatus for encoding/decoding an image - Google Patents

Method and apparatus for encoding/decoding an image Download PDF

Info

Publication number
KR102635240B1
KR102635240B1 KR1020210062095A KR20210062095A KR102635240B1 KR 102635240 B1 KR102635240 B1 KR 102635240B1 KR 1020210062095 A KR1020210062095 A KR 1020210062095A KR 20210062095 A KR20210062095 A KR 20210062095A KR 102635240 B1 KR102635240 B1 KR 102635240B1
Authority
KR
South Korea
Prior art keywords
prediction
reference pixel
block
intra
current block
Prior art date
Application number
KR1020210062095A
Other languages
Korean (ko)
Other versions
KR20210058782A (en
Inventor
문주희
임성원
원동재
Original Assignee
세종대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 세종대학교산학협력단 filed Critical 세종대학교산학협력단
Publication of KR20210058782A publication Critical patent/KR20210058782A/en
Application granted granted Critical
Publication of KR102635240B1 publication Critical patent/KR102635240B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/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/174Methods 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 slice, e.g. a line of blocks or a group of blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • 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/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

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

Abstract

본 발명에 따른 영상의 부호화/복호화 방법 및 장치는, 복수의 참조 화소 라인들 중 적어도 하나의 참조 화소 라인을 선택하고, 상기 선택된 적어도 하나의 참조 화소 라인에 포함된 적어도 하나의 화소 값에 기초하여 상기 현재 블록 내의 하나의 화소의 예측값을 유도하되, 상기 복수의 참조 화소 라인들 내의 적어도 하나의 참조 화소에 기반하여 상기 예측 블록 내의 하나 이상의 화소들에 대한 필터링을 수행할 수 있다.The video encoding/decoding method and device according to the present invention selects at least one reference pixel line from a plurality of reference pixel lines, and based on at least one pixel value included in the selected at least one reference pixel line, A predicted value of one pixel in the current block may be derived, and filtering may be performed on one or more pixels in the prediction block based on at least one reference pixel in the plurality of reference pixel lines.

Description

영상의 부호화/복호화 방법 및 장치{METHOD AND APPARATUS FOR ENCODING/DECODING AN IMAGE}Video encoding/decoding method and device {METHOD AND APPARATUS FOR ENCODING/DECODING AN IMAGE}

본 발명은 영상 신호 부호화/복호화 방법 및 장치에 관한 것으로서, 보다 구체적으로는 개선된 화면 내 예측을 이용한 영상 부호화/복호화 방법 및 장치에 관한 것이다.The present invention relates to a method and device for encoding/decoding video signals, and more specifically, to a method and device for encoding/decoding video signals using improved intra-prediction.

최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이러한 문제를 해결하기 위하여 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)에서는 꾸준히 공동 연구를 통하여 보다 향상된 동영상 압축 표준을 연구하는 중이다.Recently, demand for multimedia data such as video is rapidly increasing on the Internet. However, the speed at which channel bandwidth develops is difficult to keep up with the rapidly increasing amount of multimedia data. To solve this problem, ITU-T's VCEG (Video Coding Expert Group), an international standardization organization, and ISO/IEC's MPEG (Moving Picture Expert Group) are continuously researching improved video compression standards through joint research.

동영상 압축은 크게 화면 내 예측, 화면 간 예측, 변환, 양자화, 엔트로피(Entropy coding)부호화, 인루프 필터(In-loop filter)로 구성된다. 이 중, 화면 내 예측은 현재 블록주변에 존재하는 복원된 화소들을 이용하여 현재 블록을 위한 예측 블록을 생성하는 기술을 말한다. Video compression largely consists of intra-screen prediction, inter-screen prediction, transformation, quantization, entropy coding, and in-loop filter. Among these, intra-screen prediction refers to a technology that generates a prediction block for the current block using restored pixels existing around the current block.

종래의 화면 내 예측은, 정수 위치의 참조 화소들을 이용한 보간 과정을 통해 분수 위치의 화소들을 생성하고, 이렇게 생성된 분수 위치의 화소들을 이용하여 예측 블록을 생성한다. 이 때 어떤 정수 위치의 참조 화소들을 이용하느냐 여부와 어떤 보간 방식을 적용하였는지 여부에 따라 원래 화소값과 그 예측값 간의 오차에 영향을 주게된다.Conventional intra-screen prediction generates pixels at fractional positions through an interpolation process using reference pixels at integer positions, and generates a prediction block using the pixels at fractional positions thus generated. At this time, the error between the original pixel value and the predicted value is affected depending on which integer position reference pixels are used and which interpolation method is applied.

본 발명은 영상을 부호화/복호화함에 있어서, 복수의 참조 화소 라인들을 이용하여 인트라 예측을 수행함으로써, 인트라 예측의 효율을 향상시키는 것에 주된 목적이 있다.The main purpose of the present invention is to improve the efficiency of intra prediction by performing intra prediction using a plurality of reference pixel lines when encoding/decoding an image.

본 발명은 영상을 부호화/복호화함에 있어서, 복수의 보간 방식 중에서 선택된 보간 방식을 이용하여 인트라 예측 블록을 유도함으로써, 인트라 예측의 효율을 향상시키는 것에 주된 목적이 있다.The main purpose of the present invention is to improve the efficiency of intra prediction by deriving an intra prediction block using an interpolation method selected from a plurality of interpolation methods when encoding/decoding an image.

본 발명은 영상을 부호화/복호화함에 있어서, 복수의 참조 화소 라인들을 이용하여 인트라 예측을 수행한 경우, 인트라 예측 블록과 주변 영역 간의 불연속성을 감소시킬 수 있는 필터링 방법을 제공하는데 주된 목적이 있다.The main purpose of the present invention is to provide a filtering method that can reduce discontinuity between an intra prediction block and a surrounding area when intra prediction is performed using a plurality of reference pixel lines when encoding/decoding an image.

본 발명에 따른 영상의 복호화 방법 및 장치는, 복수의 참조 화소 라인들 중 적어도 하나의 참조 화소 라인을 선택하고, 상기 선택된 적어도 하나의 참조 화소 라인에 포함된 적어도 하나의 화소 값에 기초하여 상기 현재 블록 내의 하나의 화소의 예측값을 유도할 수 있다.The method and device for decoding an image according to the present invention include selecting at least one reference pixel line from among a plurality of reference pixel lines, and decoding the current image based on at least one pixel value included in the selected at least one reference pixel line. The predicted value of one pixel within a block can be derived.

본 발명에 따른 영상의 복호화 방법 및 장치는, 입력 비트스트림으로부터 참조 화소 라인 인덱스 정보를 얻어, 상기 참조 화소 라인 인덱스 정보에 기초하여, 상기 복수의 참조 화소 라인들 중에서 상기 적어도 하나의 참조 화소 라인을 선택할 수 있다.The method and device for decoding an image according to the present invention obtains reference pixel line index information from an input bitstream and, based on the reference pixel line index information, selects the at least one reference pixel line from among the plurality of reference pixel lines. You can choose.

*본 발명에 따른 영상의 복호화 방법 및 장치는, 상기 현재 블록 내의 각 화소의 위치에 기초하여 상기 현재 블록 내의 각 화소마다 적어도 하나의 참조 화소 라인을 선택할 수 있다. *The video decoding method and device according to the present invention can select at least one reference pixel line for each pixel in the current block based on the position of each pixel in the current block.

본 발명에 따른 영상의 복호화 방법 및 장치는, 복수의 보간 방식 중 하나를 선택하고, 상기 선택된 보간 방식을 이용하여, 상기 선택된 적어도 하나의 참조 화소 라인에 포함된 적어도 하나의 화소를 이용하여 보간을 수행하여 상기 예측값을 얻을 수 있다. 상기 선택된 보간 방식은, 복수의 보간 방식 중 하나를 나타내는 인덱스 정보에 기초하여 선택될 수 있다.The video decoding method and device according to the present invention select one of a plurality of interpolation methods, and perform interpolation using the selected interpolation method and at least one pixel included in the selected at least one reference pixel line. The above predicted value can be obtained by performing: The selected interpolation method may be selected based on index information indicating one of a plurality of interpolation methods.

본 발명에 따른 영상의 복호화 방법 및 장치는, 상기 현재 블록의 모든 화소들의 예측값을 유도하여 상기 현재 블록의 예측 블록을 얻고, 상기 예측 블록을 필터링할 수 있다.The method and device for decoding an image according to the present invention can obtain a prediction block of the current block by deriving predicted values of all pixels of the current block, and filter the prediction block.

본 발명에 따른 영상의 복호화 방법 및 장치는, 상기 현재 블록의 크기 또는 상기 현재 블록의 인트라 예측 모드에 따라 상기 현재 블록의 소정 영역을 필터링할 수 있다. The video decoding method and device according to the present invention can filter a predetermined area of the current block according to the size of the current block or the intra prediction mode of the current block.

본 발명에 따른 영상의 부호화 방법 및 장치는, 복수의 참조 화소 라인들 중 적어도 하나의 참조 화소 라인을 선택하고, 상기 선택된 적어도 하나의 참조 화소 라인에 포함된 적어도 하나의 화소 값에 기초하여 상기 현재 블록 내의 하나의 화소의 예측값을 얻을 수 있다.The method and device for encoding an image according to the present invention include selecting at least one reference pixel line from a plurality of reference pixel lines, and encoding the current image based on at least one pixel value included in the selected at least one reference pixel line. The predicted value of one pixel within a block can be obtained.

*본 발명에 따른 영상의 부호화 방법 및 장치는, 상기 선택된 적어도 하나의 참조 화소 라인을 지시하는 참조 화소 라인 인덱스 정보를 부호화하고, 상기 부호화된 참조 화소 라인 인덱스 정보를 비트스트림에 포함시킬 수 있다.*The video encoding method and device according to the present invention can encode reference pixel line index information indicating the selected at least one reference pixel line, and include the encoded reference pixel line index information in a bitstream.

본 발명에 따른 영상의 부호화 방법 및 장치는, 상기 현재 블록 내의 각 화소의 위치에 기초하여 상기 현재 블록 내의 각 화소마다 적어도 하나의 참조 화소 라인을 선택할 수 있다.The video encoding method and device according to the present invention can select at least one reference pixel line for each pixel in the current block based on the position of each pixel in the current block.

본 발명에 따른 영상의 부호화 방법 및 장치는, 상기 현재 블록의 인트라 예측 모드에 기초하여 상기 현재 블록 내의 각 화소마다 적어도 하나의 참조 화소 라인을 선택할 수 있다. The video encoding method and device according to the present invention can select at least one reference pixel line for each pixel in the current block based on the intra prediction mode of the current block.

본 발명에 따른 영상의 부호화 방법 및 장치는, 복수의 보간 방식 중 하나를 선택하고, 상기 선택된 보간 방식을 이용하여, 상기 선택된 적어도 하나의 참조 화소 라인에 포함된 적어도 하나의 화소를 이용하여 보간을 수행하여 상기 예측값을 얻을 수 있다.The video encoding method and device according to the present invention select one of a plurality of interpolation methods and perform interpolation using the selected interpolation method and at least one pixel included in the selected at least one reference pixel line. The above predicted value can be obtained by performing:

본 발명에 따른 영상의 부호화 방법 및 장치는, 상기 복수의 보간 방식 중 하나를 나타내는 인덱스 정보를 부호화하여 비트스트림에 포함시킬 수 있다. The video encoding method and device according to the present invention, Index information representing one of the plurality of interpolation methods can be encoded and included in the bitstream.

본 발명에 따른 영상의 부호화 방법 및 장치는, 상기 현재 블록의 모든 화소들의 예측값을 유도하여 상기 현재 블록의 예측 블록을 얻은 후 상기 예측 블록을 필터링할 수 있다.The video encoding method and device according to the present invention can obtain a prediction block of the current block by deriving the prediction values of all pixels of the current block, and then filter the prediction block.

본 발명에 따른 영상의 부호화 방법 및 장치는, 상기 현재 블록의 크기 또는 상기 현재 블록의 인트라 예측 모드에 따라 상기 현재 블록의 소정 영역을 필터링할 수 있다.The video encoding method and device according to the present invention can filter a predetermined area of the current block according to the size of the current block or the intra prediction mode of the current block.

본 발명에 따르면, 보다 효과적인 인트라 예측 기술을 적용함으로써, 영상의 압축 효율과 재생된 영상의 화질을 향상시킬 수 있다. 또한, 본 발명에 따른, 인트라 예측 블록과 주변 영역 간의 불연속성을 감소시킬 수 있는 필터링 방법을 적용함으로써 재생된 영상의 화질을 향상시킬 수 있다.According to the present invention, by applying a more effective intra prediction technology, the compression efficiency of the video and the quality of the reproduced video can be improved. In addition, the image quality of the reproduced image can be improved by applying a filtering method that can reduce discontinuity between the intra prediction block and the surrounding area according to the present invention.

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다.
도 3은 평면 모드를 설명하기 위한 도면이다.
도 4는 DC 모드를 설명하기 위한 도면이다.
도 5는 예측 블록을 생성하는 일 예를 설명하기 위한 도면이다.
도 6은 본 발명의 일 실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 7a 및 도 7b는 보간을 이용하여 화면 내 예측 화소를 유도하는 방법을 설명하기 위한 도면이다.
도 8은 보간 방법 또는 보간 계수들을 선택하는 묵시적인 방법을 설명하기 위한 도면이다.
도 9는 영상 부호화 장치에 의해 화면 내 예측 모드가 선택되는 과정을 설명하기 위한 순서도이다.
도 10은 영상 부호화 장치에 의해 복수의 보간 방식들 중 하나가 선택되는 과정을 설명하기 위한 순서도이다.
도 11은 영상 부호화 장치에 의해 보간 방식 인덱스 정보를 부호화하는 과정을 설명하는 순서도이다.
도 12는 영상 복호화 장치에 의해 보간 방식 인덱스 정보가 복호화되는 과정을 설명하는 순서도이다.
도 13은 본 발명의 일 실시예에 따른, 복수의 참조 화소 라인들을 이용한 화면 내 예측 화소의 유도를 설명하기 위한 도면이다.
도 14는 본 발명의 일 실시예에 따른, 화면 내 예측 화소값을 유도하는 과정을 설명하기 위한 흐름도이다.
도 15는 예측 블록마다 인트라 예측에 이용될 참조 화소 라인을 적응적으로 결정하는 과정을 설명하기 위한 흐름도이다.
도 16은 참조 화소 라인 인덱스 정보가 영상 부호화 장치에 의해 부호화되는 과정을 나타낸 흐름도이다.
도 17은 참조 화소 라인 인덱스 정보가 영상 복호화 장치에 의해 복호화되는 과정을 나타낸 흐름도이다.
도 18 및 도 19는 참조 화소 라인 인덱스의 전송 없이 참조 화소 라인을 결정하는 방법을 설명하기 위한 도면이다.
도 20은 예측 블록과 참조 화소 라인간의 스무딩을 설명하기 위한 도면이다.
도 21은 공통의 참조 화소 라인을 현재 블록 내의 모든 변환 블록들에 이용되는 경우를 도시한다.
도 22a 내지 22d는 각 변환 블록 마다 참조 화소 라인을 선택하여 인트라 예측에 이용되는 경우를 도시한다.
Figure 1 is a block diagram showing a video encoding device according to an embodiment of the present invention.
Figure 2 is a diagram for explaining an example of an intra prediction mode.
Figure 3 is a diagram for explaining the planar mode.
Figure 4 is a diagram for explaining DC mode.
Figure 5 is a diagram for explaining an example of generating a prediction block.
Figure 6 is a block diagram showing an image decoding device according to an embodiment of the present invention.
FIGS. 7A and 7B are diagrams for explaining a method of deriving predicted pixels within a screen using interpolation.
Figure 8 is a diagram for explaining an interpolation method or an implicit method of selecting interpolation coefficients.
Figure 9 is a flowchart explaining the process of selecting an intra-prediction mode by a video encoding device.
FIG. 10 is a flowchart illustrating a process in which one of a plurality of interpolation methods is selected by a video encoding device.
Figure 11 is a flowchart explaining the process of encoding interpolation method index information by a video encoding device.
Figure 12 is a flowchart explaining the process of decoding interpolation method index information by a video decoding device.
FIG. 13 is a diagram illustrating the derivation of a prediction pixel within a screen using a plurality of reference pixel lines, according to an embodiment of the present invention.
Figure 14 is a flowchart for explaining the process of deriving the predicted pixel value within the screen, according to an embodiment of the present invention.
FIG. 15 is a flowchart illustrating a process for adaptively determining a reference pixel line to be used for intra prediction for each prediction block.
Figure 16 is a flowchart showing a process in which reference pixel line index information is encoded by an image encoding device.
Figure 17 is a flowchart showing the process of decoding reference pixel line index information by an image decoding device.
18 and 19 are diagrams for explaining a method of determining a reference pixel line without transmitting a reference pixel line index.
Figure 20 is a diagram for explaining smoothing between a prediction block and a reference pixel line.
Figure 21 shows a case where a common reference pixel line is used for all transform blocks within the current block.
Figures 22a to 22d show a case where a reference pixel line is selected for each transform block and used for intra prediction.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다. Since the present invention can make various changes and have various embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, and should be understood to include all changes, equivalents, and substitutes included in the spirit and technical scope of the present invention. While describing each drawing, similar reference numerals are used for similar components.

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

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

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in this application are only used to describe specific embodiments and are not intended to limit the invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, terms such as “comprise” or “have” are intended to designate the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, but are not intended to indicate the presence of one or more other features. It should be understood that this does not exclude in advance the possibility of the existence or addition of elements, numbers, steps, operations, components, parts, or combinations thereof.

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

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

도 1을 참조하면, 영상 부호화 장치(100)는 영상 분할부(101),화면 내 예측부(102), 화면 간 예측부(103), 감산부(104), 변환부(105), 양자화부(106), 엔트로피 부호화부(107), 역양자화부(108), 역변환부(109), 증산부(110), 필터부(111) 및 메모리(112)를 포함할 수 있다.Referring to FIG. 1, the image encoding device 100 includes an image segmentation unit 101, an intra-screen prediction unit 102, an inter-screen prediction unit 103, a subtraction unit 104, a transformation unit 105, and a quantization unit. (106), it may include an entropy encoding unit 107, an inverse quantization unit 108, an inverse transform unit 109, a multiplication unit 110, a filter unit 111, and a memory 112.

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

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

영상 분할부(100)는 입력된 영상을 적어도 하나의 블록으로 분할할 수 있다. 이 때, 입력된 영상은 픽처, 슬라이스, 타일, 세그먼트 등 다양한 형태와 크기를 가질 수 있다. 블록은 부호화 단위(CU), 예측 단위(PU) 또는 변환 단위(TU)를 의미할 수 있다. 상기 분할은 쿼드 트리(Quadtree) 또는 바이너리 트리(Biniary tree) 중 적어도 하나에 기반하여 수행될 수 있다. 쿼드 트리는 상위 블록을 너비와 높이가 상위 블록의 절반인 하위 블록으로 사분할하는 방식이다. 바이너리 트리는 상위 블록을 너비 또는 높이 중 어느 하나가 상위 블록의 절반인 하위 블록으로 이분할하는 방식이다. 전술한 바이너리 트리 기반의 분할을 통해, 블록은 정방형뿐만 아니라 비정방형의 형태를 가질 수 있다.The image segmentation unit 100 may divide the input image into at least one block. At this time, the input image may have various shapes and sizes, such as pictures, slices, tiles, and segments. A block may refer to a coding unit (CU), prediction unit (PU), or transformation unit (TU). The division may be performed based on at least one of a quadtree or binary tree. The quad tree is a method of dividing a parent block into four child blocks whose width and height are half that of the parent block. A binary tree is a method of dividing a parent block into child blocks whose width or height is half that of the parent block. Through the above-described binary tree-based division, blocks can have a non-square shape as well as a square shape.

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

예측부(102, 103)는 인터 예측을 수행하는 화면 간 예측부(103)와 인트라 예측을 수행하는 화면 내 예측부(102)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다.The prediction units 102 and 103 may include an inter prediction unit 103 that performs inter prediction and an intra prediction unit 102 that performs intra prediction. It is possible to determine whether to use inter prediction or intra prediction for a prediction unit, and determine specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode are determined in prediction units, and prediction may be performed in transformation units.

생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(105)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(107)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(102, 103)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit 105. Additionally, prediction mode information, motion vector information, etc. used for prediction may be encoded in the entropy encoder 107 together with the residual value and transmitted to the decoder. When using a specific encoding mode, it is possible to encode the original block as is and transmit it to the decoder without generating a prediction block through the prediction units 102 and 103.

화면 내 예측부(102)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 인트라 예측이 수행될 현재 블록의 주변 블록의 예측 모드가 인터 예측인 경우, 인터 예측이 적용된 주변 블록에 포함되는 참조 픽셀을, 인트라 예측이 적용된 주변의 다른 블록 내의 참조 픽셀로 대체될 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를, 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra-screen prediction unit 102 may generate a prediction block based on reference pixel information around the current block, which is pixel information in the current picture. If the prediction mode of the neighboring block of the current block to which intra prediction is to be performed is inter prediction, the reference pixel included in the neighboring block to which inter prediction has been applied may be replaced with a reference pixel in another neighboring block to which intra prediction has been applied. That is, when the reference pixel is not available, the unavailable reference pixel information can be used by replacing at least one reference pixel among the available reference pixels.

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

화면 내 예측부(102)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra-screen prediction unit 102 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a filter that performs filtering on the reference pixels of the current block, and can adaptively determine whether to apply the filter depending on the prediction mode of the current prediction unit. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

화면 내 예측부(102)의 참조 화소 보간부는 예측 단위의 인트라 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.If the intra prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value by interpolating the reference pixel, the reference pixel interpolation unit of the intra-screen prediction unit 102 interpolates the reference pixel to obtain the reference pixel at the fractional position. can be created. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.

예측부(102, 103)에서 생성된 예측 단위와 예측 단위의 원본 블록 간의 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력되어 변환될 수 있다. A residual block containing residual information, which is a difference value between the prediction unit generated in the prediction units 102 and 103 and the original block of the prediction unit, may be generated. The generated residual block may be input to the conversion unit 130 and converted.

도 2는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다. 도 2에 도시된 인트라 예측 모드는 총 35가지의 모드를 가지고 있다. 0번 모드는 평면 모드(Planar mode), 1번 모드는 DC 모드, 2 내지 34번 모드는 각도 모드(Angular mode)를 나타낸다. Figure 2 is a diagram for explaining an example of an intra prediction mode. The intra prediction mode shown in Figure 2 has a total of 35 modes. Mode 0 represents planar mode, mode 1 represents DC mode, and modes 2 to 34 represent angular mode.

도 3은 평면 모드를 설명하기 위한 도면이다. 현재 블록 내의 첫 번째 화소 P1의 예측값을 생성하기 위해 Y축으로 같은 위치에 있는 복원된 화소와 현재 블록의 우측 상단에 존재하는 복원된 화소 T를 도시된 바와 같이 선형 보간 하여 생성한다. 마찬가지로 두 번째 화소 P2의 예측값을 생성하기 위해 X축으로 같은 위치에 있는 복원된 화소와 현재 블록의 좌측 하단에 존재하는 복원된 화소 L을 도시된 바와 같이 선형 보간 하여 생성한다. 두 개의 예측 화소 P1과 P2를 평균한 값이 최종적인 예측 화소가 된다. 평면 모드에서는 위와 같은 방식으로 예측 화소들을 유도하여 현재 블록의 예측 블록을 생성한다. Figure 3 is a diagram for explaining the planar mode. To generate the predicted value of the first pixel P1 in the current block, the restored pixel located at the same position on the Y-axis and the restored pixel T located in the upper right corner of the current block are linearly interpolated as shown. Similarly, to generate the predicted value of the second pixel P2, the restored pixel located at the same position on the The average value of the two prediction pixels P1 and P2 becomes the final prediction pixel. In planar mode, the prediction block of the current block is generated by deriving prediction pixels in the same manner as above.

도 4는 DC 모드를 설명하기 위한 도면이다. 현재 블록 주변의 복원된 화소들의 평균을 계산한 다음, 그 평균 값을 현재 블록 내의 모든 화소들의 예측값으로 이용한다. Figure 4 is a diagram for explaining DC mode. The average of the reconstructed pixels around the current block is calculated, and then the average value is used as the predicted value for all pixels in the current block.

도 5는 도 2의 10번 모드(수평 모드)와 26번 모드(수직 모드)를 이용하여 예측 블록을 생성하는 일 예를 설명하기 위한 도면이다. 10번 모드를 이용하는 경우, 현재 블록의 좌측에 접하는 각 참조화소를 오른쪽 방향으로 복사하여 현재 블록의 예측 블록을 생성한다. 마찬가지로 26번 모드는, 현재 블록의 상측에 접하는 각 참조 화소를 아래쪽 방향으로 복사하여 현재 블록의 예측 블록을 생성한다.FIG. 5 is a diagram illustrating an example of generating a prediction block using mode 10 (horizontal mode) and mode 26 (vertical mode) of FIG. 2 . When using mode 10, each reference pixel adjacent to the left side of the current block is copied to the right to generate a prediction block of the current block. Likewise, mode 26 generates a prediction block of the current block by copying each reference pixel adjacent to the upper side of the current block in the downward direction.

다시 도 1을 참조하면, 화면 간 예측부(103)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 화면 간 예측부(103)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. Referring again to FIG. 1, the inter-screen prediction unit 103 may predict a prediction unit based on information on at least one of the pictures before or after the current picture, and in some cases, the prediction unit 103 may predict a prediction unit after the encoding in the current picture has been completed. The prediction unit can also be predicted based on information in some areas. The inter-screen prediction unit 103 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

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

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

감산부(104)는, 현재 부호화하려는 블록과 화면 내 예측부(102) 혹은 화면 간 예측부(103)에서 생성된 예측 블록을 감산하여 현재 블록의 잔차 블록을 생성한다.The subtraction unit 104 generates a residual block of the current block by subtracting the block to be currently encoded from the prediction block generated in the intra prediction unit 102 or the inter-screen prediction unit 103.

변환부(105)에서는 잔차 데이터를 포함한 잔차 블록을 DCT, DST, KLT(Karhunen Loeve Transform) 등과 같은 변환 방법을 사용하여 변환시킬 수 있다. 이때 변환 방법은 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드에 기반하여 결정될 수 있다. 예를 들어, 인트라 예측 모드에 따라, 가로 방향으로는 DCT를 사용하고, 세로 방향으로는 DST를 사용할 수도 있다.The transform unit 105 can transform a residual block including residual data using a transform method such as DCT, DST, or KLT (Karhunen Loeve Transform). At this time, the conversion method may be determined based on the intra prediction mode of the prediction unit used to generate the residual block. For example, depending on the intra prediction mode, DCT may be used in the horizontal direction and DST may be used in the vertical direction.

양자화부(106)는 변환부(105)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(106)에서 산출된 값은 역양자화부(108)와 엔트로피 부호화부(107)에 제공될 수 있다.The quantization unit 106 may quantize the values converted to the frequency domain by the conversion unit 105. The quantization coefficient may change depending on the block or the importance of the image. The value calculated by the quantization unit 106 may be provided to the inverse quantization unit 108 and the entropy encoding unit 107.

상기 변환부(105) 및/또는 양자화부(106)는, 영상 부호화 장치(100)에 선택적으로 포함될 수 있다. 즉, 영상 부호화 장치(100)는, 잔차 블록의 잔차 데이터에 대해 변환 또는 양자화 중 적어도 하나를 수행하거나, 변환 및 양자화를 모두 스킵하여 잔차 블록을 부호화할 수 있다. 영상 부호화 장치(100)에서 변환 또는 양자화 중 어느 하나가 수행되지 않거나, 변환 및 양자화 모두 수행되지 않더라도, 엔트로피 부호화부(107)의 입력으로 들어가는 블록을 통상적으로 변환 블록이라 일컫는다. 엔트로피 부호화부(107)는 입력 데이터를 엔트로피 부호화한다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The transform unit 105 and/or the quantization unit 106 may be optionally included in the image encoding device 100. That is, the image encoding apparatus 100 may perform at least one of transformation or quantization on the residual data of the residual block, or may skip both transformation and quantization to encode the residual block. Even if either transformation or quantization is not performed in the image encoding device 100, or both transformation and quantization are not performed, the block that enters the input of the entropy encoding unit 107 is generally referred to as a transformation block. The entropy encoding unit 107 entropy encodes the input data. Entropy coding can use various coding methods, such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).

엔트로피 부호화부(107)는 예측부(102, 103)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. 엔트로피 부호화부(107)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로, 0이 아닌 계수, 절대값이 1 또는 2보다 큰 계수, 그리고 계수의 부호 등을 나타내는 여러 종류의 플래그를 부호화될 수 있다. 상기 플래그만으로 부호화되지 않는 계수는, 플래그를 통해 부호화된 계수와 실제 변환 블록의 계수 간의 차이의 절대값을 통해 부호화될 수 있다. 역양자화부(108) 및 역변환부(109)에서는 양자화부(106)에서 양자화된 값들을 역양자화하고 변환부(105)에서 변환된 값들을 역변환한다. 역양자화부(108) 및 역변환부(109)에서 생성된 잔차값(Residual)은 예측부(102, 103)에 포함된 움직임 추정부, 움직임 보상부 및 화면 내 예측부(102)를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. 증산기(110)는, 예측부(102, 103)에서 생성된 예측 블록과, 역 변환부(109)를 통해 생성된 잔차 블록을 증산하여 복원 블록을 생성한다.The entropy encoding unit 107 receives coding unit residual value coefficient information, block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, motion vector information, and reference frame information from the prediction units 102 and 103. , various information such as block interpolation information and filtering information can be encoded. In the entropy encoding unit 107, the coefficients of the transform block encode various types of flags indicating coefficients other than 0, coefficients whose absolute value is greater than 1 or 2, and signs of the coefficients, etc., in units of partial blocks within the transform block. It can be. Coefficients that are not encoded using only the flag may be encoded using the absolute value of the difference between the coefficient encoded through the flag and the coefficient of the actual transform block. The inverse quantization unit 108 and the inverse transformation unit 109 inversely quantize the values quantized in the quantization unit 106 and inversely transform the values transformed in the transformation unit 105. The residual value generated in the inverse quantization unit 108 and the inverse transform unit 109 is predicted through the motion estimation unit, motion compensation unit, and intra-screen prediction unit 102 included in the prediction units 102 and 103. It can be combined with a prediction unit to create a reconstructed block. The multiplier 110 multiplies the prediction block generated by the prediction units 102 and 103 and the residual block generated through the inverse transform unit 109 to generate a restored block.

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

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

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit may correct the offset of the deblocked image from the original image in pixel units. In order to perform offset correction for a specific picture, the pixels included in the image are divided into a certain number of areas, then the area to perform offset is determined and the offset is applied to that area, or the offset is performed by considering the edge information of each pixel. You can use the method of applying .

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

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

도 6은 본 발명의 일 실시예에 따른 영상 복호화 장치(600)를 나타낸 블록도이다. Figure 6 is a block diagram showing an image decoding device 600 according to an embodiment of the present invention.

도 6을 참조하면, 영상 복호화 장치(600)는 엔트로피 복호화부(601), 역양자화부(602), 역변환부(603), 증산부(604), 필터부(605), 메모리(606) 및 예측부(607, 608)를 포함할 수 있다.Referring to FIG. 6, the image decoding device 600 includes an entropy decoding unit 601, an inverse quantization unit 602, an inverse transform unit 603, a multiplication unit 604, a filter unit 605, a memory 606, and It may include prediction units 607 and 608.

영상 부호화 장치(100)에 의해 생성된 영상 비트스트림이 영상 복호화 장치(600)로 입력되는 경우, 입력된 비트스트림은 영상 부호화 장치(100)에서 수행된 과정과 반대의 과정에 따라 복호될 수 있다.When the video bitstream generated by the video encoding device 100 is input to the video decoding device 600, the input bitstream may be decoded according to a process opposite to the process performed in the video encoding device 100. .

엔트로피 복호화부(601)는 영상 부호화 장치(100)의 엔트로피 부호화부(107)에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. 엔트로피 복호화부(601)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로, 0이 아닌 계수, 절대값이 1 또는 2보다 큰 계수, 그리고 계수의 부호 등을 나타내는 여러 종류의 플래그를 기반으로 복호화될 수 있다. 상기 플래그만으로 표현되지 않는 계수는, 플래그를 통해 표현되는 계수와 시그날링된 계수의 합을 통해 복호화될 수 있다.The entropy decoding unit 601 may perform entropy decoding in a procedure opposite to that in which the entropy encoding unit 107 of the video encoding device 100 performs entropy encoding. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in response to the method performed in the image encoder. In the entropy decoding unit 601, the coefficients of the transform block are based on various types of flags indicating coefficients other than 0, coefficients whose absolute value is greater than 1 or 2, and signs of the coefficients, in units of partial blocks within the transform block. It can be decrypted. Coefficients that are not expressed only by the flag can be decoded through the sum of the coefficients expressed through the flag and the signaled coefficients.

엔트로피 복호화부(601)에서는 부호화기에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.역 양자화부(602)는 양자화된 변환 블록에 역 양자화를 수행하여 변환 블록을 생성한다. 도 1의 역 양자화부(108)와 실질적으로 동일하게 동작한다.The entropy decoder 601 can decode information related to intra-prediction and inter-prediction performed in the encoder. The inverse quantization unit 602 generates a transform block by performing inverse quantization on the quantized transform block. It operates substantially the same as the inverse quantization unit 108 of FIG. 1.

역 변환부(603)은 변환 블록에 역 변환을 수행하여 잔차 블록을 생성한다. 이때, 변환 방법은 예측 방법(인터 또는 인트라 예측), 블록의 크기 및/또는 형태, 인트라 예측 모드 등에 관한 정보를 기반으로 결정될 수 있다. 도 1의 역 변환부(109)와 실질적으로 동일하게 동작한다. The inverse transform unit 603 generates a residual block by performing inverse transform on the transform block. At this time, the transformation method may be determined based on information about the prediction method (inter or intra prediction), size and/or shape of the block, intra prediction mode, etc. It operates substantially the same as the inverse conversion unit 109 of FIG. 1.

증산부(604)는, 화면 내 예측부(607) 혹은 화면 간 예측부(608)에서 생성된 예측 블록과 역 변환부(603)를 통해 생성된 잔차 블록를 증산하여 복원 블록을 생성한다. 도 1의 증산부(110)과 실질적으로 동일하게 동작한다.The multiplication unit 604 generates a restored block by multiplying the prediction block generated by the intra-prediction unit 607 or the inter-screen prediction unit 608 and the residual block generated through the inverse transform unit 603. It operates substantially the same as the multiplier 110 of FIG. 1.

필터부(605)는, 복원된 블록들에 발생하는 여러 종류의 노이즈를 감소시킨다.The filter unit 605 reduces various types of noise occurring in restored blocks.

필터부(605)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The filter unit 605 may include a deblocking filter, an offset correction unit, and an ALF.

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

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

ALF는 영상 부호화 장치(100)로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라미터 셋에 포함되어 제공될 수 있다. 필터부(605)는 도 1의 필터부(111)와 실질적으로 동일하게 동작한다.ALF may be applied to the coding unit based on ALF application availability information, ALF coefficient information, etc. provided from the video encoding device 100. This ALF information may be included and provided in a specific parameter set. The filter unit 605 operates substantially the same as the filter unit 111 of FIG. 1.

메모리(606)는 증산부(604)에 의해 생성된 복원 블록을 저장한다. 도 1의 메모리(112)와 실질적으로 동일하게 동작한다.The memory 606 stores the restored block generated by the multiplication unit 604. It operates substantially the same as the memory 112 of FIG. 1.

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

예측부(607, 608)는 화면 내 예측부(607) 및 화면 간 예측부(608)를 포함할 수 있다. 별도로 도시되지는 아니하였으나, 예측부(607, 608)는 예측 단위 판별부를 더 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(601)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 화면 간 예측부(608)는 영상 부호화 장치(100)에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.The prediction units 607 and 608 may include an intra-screen prediction unit 607 and an inter-screen prediction unit 608. Although not shown separately, the prediction units 607 and 608 may further include a prediction unit determination unit. The prediction unit discriminator receives various information such as prediction unit information input from the entropy decoder 601, prediction mode information of the intra prediction method, and motion prediction-related information of the inter prediction method, distinguishes the prediction unit from the current coding unit, and makes predictions. It is possible to determine whether a unit performs inter-prediction or intra-prediction. The inter-prediction unit 608 uses the information required for inter prediction of the current prediction unit provided by the video encoding device 100 to predict information included in at least one of the pictures before or after the current picture including the current prediction unit. Based on , inter prediction for the current prediction unit can be performed. Alternatively, inter prediction may be performed based on information on a pre-restored partial region within the current picture including the current prediction unit.

화면 간 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode) 중 어떠한 방법인지 여부를 판단할 수 있다.To perform inter-screen prediction, based on the coding unit, whether the motion prediction method of the prediction unit included in the coding unit is Skip Mode, Merge Mode, or AMVP Mode. can be judged.

화면 내 예측부(607)는, 현재 부호화하려는 블록 주변에 위치한, 그리고 기 복원된 화소들을 이용하여 예측 블록을 생성한다. The intra-screen prediction unit 607 generates a prediction block using previously restored pixels located around the block to be currently encoded.

화면 내 예측부(607)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 영상 부호화 장치(100)에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra-screen prediction unit 607 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a filter that performs filtering on the reference pixels of the current block, and can adaptively determine whether to apply the filter depending on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode and AIS filter information of the prediction unit provided by the image encoding device 100. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

화면 내 예측부(607)의 참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 생성된 분수 단위 위치의 참조 화소가 현재 블록 내의 화소의 예측 화소로 이용될 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.If the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value by interpolating the reference pixel, the reference pixel interpolation unit of the intra-screen prediction unit 607 interpolates the reference pixel to obtain the reference pixel at the fractional position. can be created. The generated reference pixel at the fractional position can be used as a predicted pixel for the pixel in the current block. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.

화면 내 예측부(607)는 도 1의 화면 내 예측부(102)와 실질적으로 동일하게 동작한다.The intra-screen prediction unit 607 operates substantially the same as the intra-screen prediction unit 102 of FIG. 1 .

화면 간 예측부(608)는, 메모리(606)에 저장된 참조 픽처, , 움직임 정보를 이용하여 인터 예측 블록을 생성한다. 화면 간 예측부(608)는 도 1의 화면 간 예측부(103)와 실질적으로 동일하게 동작한다.The inter prediction unit 608 generates an inter prediction block using the reference picture and motion information stored in the memory 606. The inter-screen prediction unit 608 operates substantially the same as the inter-screen prediction unit 103 of FIG. 1 .

본 발명은 특히 인트라 예측에 관한 것으로서, 이하에 본 발명의 다양한 실시예들을 도면들을 참조하면서 보다 상세하게 설명한다.The present invention particularly relates to intra prediction, and various embodiments of the present invention will be described in more detail below with reference to the drawings.

<화면 내 예측을 위한 보간> < Interpolation for intra-screen prediction>

도 7a 및 도 7b는 보간을 이용하여 화면 내 예측 화소를 유도하는 방법을 설명하기 위한 도면이다. 도 2의 화면 내 예측 모드들 중 하나인 m번 모드의 예측 각도가 도 7a와 같다고 가정하면, m번 모드를 이용하여 화면 내 예측을 수행하는 경우 예측에 이용될 참조 화소 X는 정수 화소 위치에 존재하지 않는다. 따라서 참조 화소 X의 왼쪽과 오른쪽의 정수 화소 위치에 존재하는 참조 화소인 A와 B를 이용하여 보간을 수행하여 분수 화소 위치의 참조 화소 X를 생성한다. 생성된 참조 화소 X는 현재 블록 내의 P위치의 화소의 예측 화소로 이용된다. FIGS. 7A and 7B are diagrams for explaining a method of deriving predicted pixels within a screen using interpolation. Assuming that the prediction angle of mode m, which is one of the intra-prediction modes in FIG. 2, is the same as that in FIG. 7A, when intra-prediction is performed using mode m, the reference pixel X to be used for prediction is at an integer pixel position. does not exist. Therefore, interpolation is performed using reference pixels A and B that exist at integer pixel positions to the left and right of the reference pixel The generated reference pixel

도 7b는 화소 X, A, B 간의 관계를 설명하기 위한 도면이다. 도 7b를 참조하면, 화소 X와 A 간의 거리는 S1이고, 화소 B와 X 간의 거리는 S2이다. 거리 S1과 S2의 비율에 따라 다양한 보간 방법을 사용하여 화소 X 를 유도할 수 있다. 이때 사용되는 보간 방법에는 선형 보간(linear interpolation), 큐빅컨볼루션 보간(cubic convolution interpolation), B-spline 보간(B-spline interpolation) 등 다양한 보간 방법이 적용 될 수 있다. Figure 7b is a diagram for explaining the relationship between pixels X, A, and B. Referring to Figure 7b, the distance between pixels X and A is S1, and the distance between pixels B and X is S2. Depending on the ratio of distances S1 and S2, pixel X can be derived using various interpolation methods. At this time, various interpolation methods such as linear interpolation, cubic convolution interpolation, and B-spline interpolation can be applied.

영상 복호화 장치(100)가, 가용한 복수의 보간 방법들 중 어떤 보간 방법이 적용되었는지 또는 어떤 보간 계수 세트가 사용되었는지 여부를 알게 하기 위한 방법으로는 여러가지가 있다. 첫번째 방법은 영상 부호화 장치(100)가, 가용한 복수의 보간 방법들 중 어떤 보간 방법이 적용되었는지를 나타내는 인덱스 정보를 영상 복호화 장치(600)로 전송하는 방법이다. 이 때 영상 부호화 장치(100)는, 보간 방법을 지시하는 인덱스 정보를 블록 단위나 상위의 헤더를 통해 설정하는 것도 가능하다. 여기서 상위 헤더를 통해 설정한다는 것은 슬라이스 세크멘트 헤더(slice segment header), 픽처 파라메터 세트(picture parameter set), 시퀀스 파라메터 세트(sequence parameter set) 등 블록 단위보다 더 큰 단위의 헤더를 이용하여 설정한다는 것을 의미한다. 상위 헤더에 포함된, 보간 방법을 지시하는 인덱스 정보는 영상 부호화 장치(100)에 의해 부호화되어 영상 복호화 장치(600)로 전송될 수 있다.There are various methods for allowing the image decoding device 100 to know which interpolation method among a plurality of available interpolation methods has been applied or which set of interpolation coefficients has been used. The first method is a method in which the image encoding device 100 transmits index information indicating which interpolation method among a plurality of available interpolation methods has been applied to the image decoding device 600. At this time, the video encoding device 100 can also set index information indicating the interpolation method on a block basis or through a higher-level header. Here, setting through the upper header means setting using headers larger than the block unit, such as slice segment header, picture parameter set, and sequence parameter set. it means. Index information indicating the interpolation method included in the upper header may be encoded by the video encoding device 100 and transmitted to the video decoding device 600.

다른 방법으로는, 기 설정된 복수의 보간 계수 세트들을 부호화 장치(100)와 복호화 장치(600)가 동일하게 저장하고, 어떤 세트가 선택되어 부호화에 사용되었는지를 알려주는 보간 계수 인덱스 정보를 블록 단위나 상위 헤더를 통해 복호화 장치(600)로 알릴 수 있다. In another method, the encoding device 100 and the decoding device 600 store a plurality of preset interpolation coefficient sets in the same manner, and interpolation coefficient index information indicating which set was selected and used for encoding is stored in block units or blocks. It can be notified to the decoding device 600 through the upper header.

또 다른 방법으로는, 전술한 보간 방법을 지시하는 인덱스 정보 또는 어떠한 보간 계수 세트가 사용되는지를 지시하는 보간 계수 인덱스 정보를 영상 부호화 장치(100)가 영상 복호화 장치(600)로 전송하는 대신에, 영상 부호화 장치(100)와 영상 복호화 장치(600)가 묵시적인(implicit) 방식으로 동일하게 보간 계수들을 유도할 수 있다.In another method, instead of the video encoding device 100 transmitting index information indicating the above-described interpolation method or interpolation coefficient index information indicating which interpolation coefficient set is used to the video decoding device 600, The video encoding device 100 and the video decoding device 600 can derive interpolation coefficients in the same implicit manner.

구체적으로, 이미 복원된 화소들을 이용하여 영상 부호화 장치(100)와 영상 복호화 장치(600)가 동일한 방식을 통해 보간 계수들을 유도할 수 있다. 예를 들어, R개의 참조 화소들(즉, 이미 복원된 화소들)을 이용해서 R x K (K는 임의의 실수)배로 하나의 보간 필터를 이용하여 확대또는 축소한다. 그 후 동일한 보간 필터를 이용하여 역과정을 통해 원래 R개의 참조 화소들을 복원한다. 복원된 R개의 참조 화소들의 값과 원래 참조 화소들의 값 간의 차이가 얼마나 되는지에 따라 최적의 보간 필터를 결정할 수 있다. Specifically, the image encoding device 100 and the image decoding device 600 may derive interpolation coefficients through the same method using already restored pixels. For example, R reference pixels (i.e., pixels that have already been restored) are enlarged or reduced by a factor of R x K (K is an arbitrary real number) using an interpolation filter. Afterwards, the original R reference pixels are restored through the inverse process using the same interpolation filter. The optimal interpolation filter can be determined depending on the difference between the values of the restored R reference pixels and the values of the original reference pixels.

도 8은 영상 부호화 장치(100) 또는 영상 복호화 장치(600)가 묵시적인(implicit) 방식으로 보간 방법 및/또는 보간 계수들을 선택하는 다른 방법을 설명하기 위한 도면이다. 도 8을 참조하여 설명하면, 화소 P가 포함된 4x4 블록이, 인트라 예측을 통해 복호될 현재 블록에 해당한다. 현재 블록 주변에 위치한, 기 복원된 화소들로 이루어진 복수의 참조 화소 라인들이 보간 방법 내지 보간 계수 결정에 이용된다. 도 8에 도시된 바와 같이 각 참조 화소 라인은 수평 방향의 한 줄의 소정 개수의 화소들과 수직 방향의 한 줄의 소정 개수의 화소들을 포함할 수 있다. 또는, 참조 화소 라인은 수평 방향의 한 줄의 소정 개수의 화소들로 구성되거나, 수직 방향의 한 줄의 소정 개수의 화소들로 구성될 수도 있다.FIG. 8 is a diagram for explaining another method in which the video encoding apparatus 100 or the video decoding apparatus 600 selects an interpolation method and/or interpolation coefficients in an implicit manner. Referring to FIG. 8 , the 4x4 block containing the pixel P corresponds to the current block to be decoded through intra prediction. A plurality of reference pixel lines composed of previously restored pixels located around the current block are used to determine an interpolation method or interpolation coefficient. As shown in FIG. 8, each reference pixel line may include a predetermined number of pixels in one horizontal line and a predetermined number of pixels in one vertical line. Alternatively, the reference pixel line may be composed of a predetermined number of pixels in a horizontal line, or may be composed of a predetermined number of pixels in a vertical line.

도 8을 다시 참조하면, 참조 화소 라인 0 내의 화소들을 참조 화소 라인 1 내의 화소들을 이용하여 예측한다. 이 때 현재 블록의 인트라 예측 모드와 동일한 N번의 방향성 모드가 예측에 사용된다. 예컨대, 참조 화소 라인 0 내의 화소 R의 예측 화소에 해당하는 참조 화소 X는 정수 위치의 화소가 아니므로, 참조 화소 X는 도 7a 및 7b에서와 같이 두 개의 정수 위치 참조 화소들을 이용하여 보간을 통해 유도될 수 있다. 이 때 특정 보간 방식 및 보간 계수들이 사용된다. Referring again to FIG. 8, pixels in reference pixel line 0 are predicted using pixels in reference pixel line 1. At this time, N directional modes identical to the intra prediction mode of the current block are used for prediction. For example, the reference pixel can be induced. At this time, specific interpolation methods and interpolation coefficients are used.

이와 같은 방식으로, 참조 화소 라인 0 내의 화소들의 예측 값들을 생성한 후, 각 예측 값과 원래의 각 화소 값 간의 차분 값을 계산한 후 각 차분값들을 합산한다. 영상 부호화 장치(100) 또는 영상 복호화 장치(600)에서 가용한 보간 방식들 및 보간 계수들을 사용하여 위 과정을 반복하여 각 차분값들의 합산이 최소가 되는 때의 보간 방식 및/또는 보간 계수들을 최종적으로 선택한다.In this way, after generating predicted values of pixels in reference pixel line 0, a difference value between each predicted value and each original pixel value is calculated, and then the difference values are summed. The above process is repeated using the interpolation methods and interpolation coefficients available in the video encoding device 100 or the video decoding device 600, and the interpolation method and/or interpolation coefficients when the sum of each difference value becomes minimum are finally calculated. Select .

전술한 보간은, 영상 부호화 장치(100)의 화면 내 예측부(102) 및 영상 복호화 장치(600)의 화면 내 예측부(607)의 각각에 포함된 참조 화소 보간부에 의해 수행될 수 있다.The above-described interpolation may be performed by a reference pixel interpolation unit included in each of the intra-prediction unit 102 of the video encoding apparatus 100 and the intra-prediction unit 607 of the video decoding apparatus 600.

도 9는 영상 부호화 장치(100)에 의해 최적의 화면 내 예측 모드가 선택되는 과정을 설명하기 위한 순서도이다. 이 때 블록 단위 또는 상위 헤더 등에 의해 보간 방법은 설정되었다고 가정한다. FIG. 9 is a flow chart to explain the process of selecting the optimal intra-screen prediction mode by the video encoding device 100. At this time, it is assumed that the interpolation method is set on a block basis or upper header, etc.

도 9를 참조하여 설명하면, 화면 내 예측 모드 번호를 나타내는 변수 m은 0으로 초기화되고, 최적의 cost값을 저장할 변수인 COST_BEST = MAX_VALUE로 초기화된다 (S901). 여기서 MAX_VALUE는 COST_BEST 변수에 저장 가능한 최대 값이며, 실제로 cost계산시 나올 수 없는 아주 큰 값이다. 변수 M에는 기 설정된 화면 내 예측 모드의 총 개수가 설정된다 (S901). 현재 블록에 최적의 화면 내 예측 모드를 나타내는 BEST_INTRA_MODE는 0으로 초기화된다(S901). 9, the variable m representing the prediction mode number within the screen is initialized to 0, and the variable m to store the optimal cost value is initialized to COST_BEST = MAX_VALUE (S901). Here, MAX_VALUE is the maximum value that can be stored in the COST_BEST variable, and is a very large value that cannot actually be output when calculating cost. The total number of preset prediction modes within the screen is set to variable M (S901). BEST_INTRA_MODE, which indicates the optimal intra-screen prediction mode for the current block, is initialized to 0 (S901).

그 후 화면 내 예측 모드 m에 따라, 예측 블록의 각 화소 위치에 해당하는 보간 위치를 찾고, 기 설정된 보간 방식 혹은 상위 헤더에서 설정된 다수의 보간 방식 중 하나를 이용하여 보간 값을 생성한 후 예측 블록이 생성된다(S902). 그리고 생성된 예측 블록을 이용하여 m에 해당하는 cost값인 COST_m이 계산된다(S903). 여기서 COST_m은 화면 내 모드를 부호화 하는데 필요한 비트수, 예측 블록과 현재 블록과의 차이를 이용하여 계산될 수 있다. COST_m이 COST_BEST보다 작거나 같다면(S904), 최적의 화면 내 예측 모드를 저장하는 변수인 BEST_INTRA_MODE에 m을 저장하고, COST_BEST 변수엔 cost_m을 저장하며 m은 1증가시킨다(S905). 만약 COST_m이COST_BEST보다 크다면 m만 1 증가시킨다(S906). 마지막으로 m이 화면 내 예측 모드의 최대 개수에 도달 했다면 종료하며 그게 아니라면 S902로 돌아가 반복한다. 여기서 보간 방식이 영상 부호화 장치(100) 또는 영상 복호화 장치(600)에서 기 설정된 방식을 사용된다면, 도 7과 도 8의 방식을 이용하여 S1과 S2를 설정하고 기설정된 보간 방식을 이용하여 화소 X를 생성한다. 예측 블록안의 모든 화소에는 동일한 방식을 이용하여 예측 블록을 생성한다. 혹은, 다수의 보간 방식이 사용된다면 단계 S902의 내용이 변경될 수 있다. Then, according to the intra-screen prediction mode m, find the interpolation position corresponding to each pixel position in the prediction block, generate an interpolation value using a preset interpolation method or one of a number of interpolation methods set in the upper header, and then block the prediction block. is created (S902). And COST_m, the cost value corresponding to m, is calculated using the generated prediction block (S903). Here, COST_m can be calculated using the number of bits required to encode the mode within the screen and the difference between the prediction block and the current block. If COST_m is less than or equal to COST_BEST (S904), m is stored in BEST_INTRA_MODE, a variable that stores the optimal intra-screen prediction mode, cost_m is stored in the COST_BEST variable, and m is increased by 1 (S905). If COST_m is greater than COST_BEST, only m is increased by 1 (S906). Finally, if m reaches the maximum number of prediction modes in the screen, it terminates. Otherwise, it returns to S902 and repeats. Here, if the interpolation method is a preset method in the video encoding device 100 or the video decoding device 600, set S1 and S2 using the method of FIGS. 7 and 8, and use the preset interpolation method to obtain pixel creates . A prediction block is generated for all pixels in a prediction block using the same method. Alternatively, if multiple interpolation methods are used, the contents of step S902 may be changed.

또한 예측 블록마다 적응적으로 다수의 보간 방식을 적용 할 수도 있다. 이때 도 9에 도시된 단계들 중 단계 S902의 내용이 변경된다. Additionally, multiple interpolation methods can be adaptively applied to each prediction block. At this time, the contents of step S902 among the steps shown in FIG. 9 are changed.

도 10은 영상 부호화 장치(100)에 의해 복수의 보간 방식들 중 하나가 선택되는 과정을 설명하기 위한 순서도이다. FIG. 10 is a flowchart illustrating a process in which one of a plurality of interpolation methods is selected by the video encoding device 100.

도 10을 참조하여 설명하면, 영상 부호화 장치(100)는 보간 방식 인덱스를 나타내는 변수 i는 0으로 초기화하고, 최적의 cost값을 저장할 변수인 COST_BEST_i = MAX_VALUE로 초기화한다. 여기서 MAX_VALUE는 COST_BEST_i 변수에 저장 가능한 최대 값이며, 실제로 cost계산시 나올 수 없는 아주 큰 값이다. 변수 i에는 기 설정된, 사용 가능한 보간 방식의 총 개수를 설정한다. 현재 블록에 사용되는 최적의 보간 방식을 저장하는 변수인 BEST_INTERPOLATION에는 0으로 초기화한다(S1001). 그 후 보간 방식 인덱스 i에 따라, 예측 블록의 각 화소 위치에 해당하는 보간 값을 생성한 후 예측 블록을 생성한다(S1002). 그리고 생성된 예측 블록을 이용하여 i에 해당하는 cost값인COST_i을 계산한다(S1003). 여기서 COST_i은 보간 방식 인덱스를 부호화 하는데 필요한 비트수, 예측 블록과 현재 블록과의 차이를 이용하여 계산한다. COST_i가 COST_BEST_i보다 작거나 같다면(S1004) 최적의 보간 방식을 저장하는 변수인 BEST_INTERPOLATION에 i를 저장하고, COST_BEST_i 변수엔 cost_i를 저장하며 i는 1증가시킨다(S1005). 만약 COST_i가COST_BEST_i보다 크다면 i만 1 증가시킨다(S1006). 마지막으로 i가 사용 가능한 보간 방식의 최대 개수에 도달 했다면 종료하며 그게 아니라면 S1002로 돌아가 반복한다. 이러한 방식이 사용되는 경우, 도 9에 도시된 단계 S903에서 부호화 되는 화면 내 예측 모드의 비트 수에 추가적으로 보간 방식 인덱스를 부호화한 비트 수가 추가되어 COST_m이 계산된다.Referring to FIG. 10, the video encoding device 100 initializes the variable i representing the interpolation method index to 0 and initializes it to COST_BEST_i = MAX_VALUE, which is a variable to store the optimal cost value. Here, MAX_VALUE is the maximum value that can be stored in the COST_BEST_i variable, and is a very large value that cannot actually be output when calculating cost. The variable i is set to the total number of preset, available interpolation methods. BEST_INTERPOLATION, a variable that stores the optimal interpolation method used in the current block, is initialized to 0 (S1001). Afterwards, an interpolation value corresponding to each pixel position of the prediction block is generated according to the interpolation method index i, and then a prediction block is generated (S1002). Then, COST_i, the cost value corresponding to i, is calculated using the generated prediction block (S1003). Here, COST_i is calculated using the number of bits required to encode the interpolation method index and the difference between the prediction block and the current block. If COST_i is less than or equal to COST_BEST_i (S1004), i is stored in BEST_INTERPOLATION, a variable that stores the optimal interpolation method, cost_i is stored in the COST_BEST_i variable, and i is increased by 1 (S1005). If COST_i is greater than COST_BEST_i, only i is increased by 1 (S1006). Finally, if i has reached the maximum number of available interpolation methods, it terminates. Otherwise, it returns to S1002 and repeats. When this method is used, COST_m is calculated by adding the number of bits encoding the interpolation method index to the number of bits of the intra prediction mode encoded in step S903 shown in FIG. 9.

도 11은 영상 부호화 장치(100)에 의해 예측 블록마다 적응적으로 다수의 보간 방식이 적용되는 경우 보간 방식 인덱스 정보를 부호화하는 과정을 설명하는 순서도이다. 먼저, 예측 블록마다 화면 내 예측 모드의 예측 여부를 부호화한다(S1101). 그 후 예측이 되었는지 여부를 판단한 후(S1102) 만약 예측이 되었다면 주변 블록에서 생성된 화면 내 예측 모드의 예측 후보에서 어떤 후보가 선택되었는지를 알려주는 인덱스를 부호화한다(S1103). 그게 아니라면 주변 블록에서 생성된 화면 내 예측 모드의 예측 후보를 제외하고 나머지 모드를 재정렬하여 현재 선택된 화면 내 예측 모드를 이진화 후 부호화한다(S1104). 그 후 사용된 보간 방식 인덱스를 부호화하고(S1105) 종료한다.FIG. 11 is a flowchart explaining the process of encoding interpolation method index information when multiple interpolation methods are adaptively applied to each prediction block by the video encoding apparatus 100. First, whether the intra-screen prediction mode is predicted for each prediction block is encoded (S1101). After that, it is determined whether prediction has been made (S1102), and if prediction has been made, an index indicating which candidate was selected from the prediction candidates of the intra-screen prediction mode generated from the surrounding blocks is encoded (S1103). Otherwise, the prediction candidates of the intra-screen prediction mode generated from the surrounding blocks are excluded, the remaining modes are rearranged, and the currently selected intra-screen prediction mode is binarized and encoded (S1104). Afterwards, the used interpolation method index is encoded (S1105) and the process ends.

도 12는 영상 복호화 장치(600)에 의해 보간 방식 인덱스 정보가 복호화되는 과정을 설명하는 순서도이다. 먼저, 예측 블록마다 화면 내 예측 모드의 예측 여부를 복호화한다(S1201). 그 후 예측이 되었는지 여부를 판단한 후(S1202) 만약 예측이 되었다면 주변 블록에서 생성된 화면 내 예측 모드의 예측 후보에서 어떤 후보가 선택되었는지를 알려주는 인덱스를 복호화한다(S1203). 그게 아니라면 주변 블록에서 생성된 화면 내 예측 모드의 예측 후보를 제외하고 나머지 모드를 재정렬하여 현재 선택된 화면 내 예측 모드를 복호화한다(S2104). 그 후 부호화기에서 사용된 보간 방식 인덱스를 복호화하고(S1205) 종료한다.FIG. 12 is a flowchart explaining the process of decoding interpolation method index information by the video decoding device 600. First, whether the intra-screen prediction mode is predicted for each prediction block is decoded (S1201). After that, it is determined whether prediction has been made (S1202), and if prediction has been made, an index indicating which candidate was selected from the prediction candidates of the intra-screen prediction mode generated from the surrounding blocks is decoded (S1203). Otherwise, the currently selected intra-prediction mode is decoded by excluding prediction candidates of the intra-screen prediction mode generated from neighboring blocks and rearranging the remaining modes (S2104). Afterwards, the interpolation method index used in the encoder is decoded (S1205) and the process ends.

<복수의 참조 화소 라인들을 이용한 화면 내 예측 화소의 유도><Induction of predicted pixels within the screen using multiple reference pixel lines>

이하에서는, 본 발명의 다른 실시예에 따른, 복수의 참조 화소 라인들을 이용한 화면 내 예측 화소의 유도에 대해 설명한다.Below, the derivation of an intra-screen prediction pixel using a plurality of reference pixel lines according to another embodiment of the present invention will be described.

도 13은 본 발명의 일 실시예에 따른, 복수의 참조 화소 라인들을 이용한 화면 내 예측 화소의 유도를 설명하기 위한 도면이다. FIG. 13 is a diagram illustrating the derivation of a prediction pixel within a screen using a plurality of reference pixel lines, according to an embodiment of the present invention.

종래 인트라 예측에는 하나의 참조 화소 라인이 사용되었다. 도 13에 도시된 참조 화소 라인 0이 그것이다. 참조 화소 라인 0은, 현재 블록의 상단에 접하는 소정 개수의 참조 화소들과 현재 블록의 좌측에 접하는 소정 개수의 참조 화소들로 이루어진다. 본 발명은, 다양한 참조 화소 라인들 및 그 참조 화소 라인들에 속하는 참조 화소들을 이용하여 예측 화소 내지 예측 블록을 유도함으로써 인트라 예측의 정확성을 향상 시킬 수 있다. 본 실시예는, 영상 부호화 장치(100)의 화면 내 예측부(102) 및 영상 복호화 장치(600)의 화면 내 예측부(607) 각각에 의해 동일하게 수행될 수 있다.In conventional intra prediction, one reference pixel line is used. This is reference pixel line 0 shown in FIG. 13. Reference pixel line 0 is composed of a predetermined number of reference pixels in contact with the top of the current block and a predetermined number of reference pixels in contact with the left side of the current block. The present invention can improve the accuracy of intra prediction by deriving a prediction pixel or prediction block using various reference pixel lines and reference pixels belonging to the reference pixel lines. This embodiment can be equally performed by the intra-screen prediction unit 102 of the video encoding device 100 and the intra-screen prediction unit 607 of the video decoding device 600.

이하 설명을 위해 참조 화소 라인은 총 3개의 라인들이 사용된다고 가정하고 설명한다. 그러나 임의의 N개의 참조 화소 라인들을 이용할 수 있다. 여기서, 참조 화소 라인의 개수 N은 블록 단위 혹은 상위 헤더에 포함되어 복호화 장치(600)로 알려주는 것도 가능하다. 혹은 참조 화소 라인의 개수 N을 부호화하지 않고 부호화 장치(100)와 복호화 장치(600)가 기 설정된 N개의 참조 화소 라인들을 이용하는 것 또한 가능하다. For the following explanation, it is assumed that a total of three reference pixel lines are used. However, any number of N reference pixel lines can be used. Here, the number N of reference pixel lines can be informed to the decoding device 600 in block units or included in the upper header. Alternatively, it is also possible for the encoding device 100 and the decoding device 600 to use N preset reference pixel lines without encoding the number N of the reference pixel lines.

도 13을 참조하여 설명하면, 화소 P가 포함된 4x4 크기의 블록이 인트라 예측을 이용하여 부호화 또는 복호화될 현재 블록에 해당한다. 3개의 참조 화소 라인 0, 1 및 2가 현재 블록 주변에 위치한다.Referring to FIG. 13 , a 4x4 block containing a pixel P corresponds to a current block to be encoded or decoded using intra prediction. Three reference pixel lines 0, 1 and 2 are located around the current block.

현재 블록의 인트라 예측 모드가 m번 방향성 모드인 경우에 3개의 참조 화소 라인 0, 1 및 2를 사용하여 현재 화소 P의 예측 화소로 사용될 수 있는 예측 화소는 X, Y, Z가 될 수 있다. 이때 3개의 참조 화소 라인들의 각각을 사용하여 예측 블록을 생성해보고 최적의 참조 화소 라인을 결정할 수 있다. 이와 같이 결정된 최적의 참조 화소 라인을 지시하는 참조 화소 라인 인덱스 정보를 부호화장치(100)는 부호화할 수 있다. 참조 화소 라인 인덱스는, 예를 들면, 도 13에서와 같이 현재 블록에 가까운 참조 화소 라인에 낮은 인덱스 번호를 할당할 수 있다. When the intra prediction mode of the current block is the m directional mode, prediction pixels that can be used as prediction pixels of the current pixel P using the three reference pixel lines 0, 1, and 2 can be X, Y, and Z. At this time, a prediction block can be generated using each of the three reference pixel lines and the optimal reference pixel line can be determined. The encoding device 100 can encode reference pixel line index information indicating the optimal reference pixel line determined in this way. As for the reference pixel line index, for example, as shown in FIG. 13, a low index number may be assigned to a reference pixel line close to the current block.

도 14는 본 발명의 일 실시예에 따른, 화면 내 예측 화소값을 유도하는 과정을 설명하기 위한 흐름도이다. 도 14를 참조하면, 현재 블록의 인트라 예측을 위해 이용될 적어도 하나의 참조 화소 라인이 복수의 참조 화소 라인들 중에서 선택된다 (S1301). 상기 복수의 참조 화소 라인들은, 인트라 예측을 이용하여 복호화 될 현재 블록과 동일한 영상 내에 존재한다. 상기 선택되는 적어도 하나의 참조 화소 라인은, 전술한 참조 화소 라인 인덱스에 의해 지시될 수 있다. 다른 대안으로서, 후술될 묵시적 방법에 의해 영상 부호화 장치(100)와 영상 복호화 장치(600)에서 공통적인 방법을 이용하여, 현재 블록의 인트라 예측에 이용될 적어도 하나의 참조 화소 라인은 선택될 수도 있다. Figure 14 is a flowchart for explaining the process of deriving the predicted pixel value within the screen, according to an embodiment of the present invention. Referring to FIG. 14, at least one reference pixel line to be used for intra prediction of the current block is selected from a plurality of reference pixel lines (S1301). The plurality of reference pixel lines exist in the same image as the current block to be decoded using intra prediction. The selected at least one reference pixel line may be indicated by the reference pixel line index described above. As another alternative, at least one reference pixel line to be used for intra prediction of the current block may be selected using a method common to the image encoding apparatus 100 and the image decoding apparatus 600 by an implicit method to be described later. .

또한, 상기 선택되는 적어도 하나의 참조 화소 라인은, 예측 블록 마다 선택될 수 있다. 여기에 대해서는 도 15를 참조하면서 후술한다. 또는, 예측 블록 내의 각 화소 마다 적응적으로 선택될 수도 있다. 여기에 대해서는 도 18 및 19를 참조하면서 후술한다.Additionally, the selected at least one reference pixel line may be selected for each prediction block. This will be described later with reference to FIG. 15. Alternatively, it may be adaptively selected for each pixel in the prediction block. This will be described later with reference to FIGS. 18 and 19.

영상 부호화 장치(100) 또는 영상 복호화 장치(600)는 상기 선택된 적어도 하나의 참조 화소 라인에 포함된 적어도 하나의 화소 값에 기초하여 현재 블록 내의 하나의 화소의 예측값을 얻을 수 있다 (S1303). 영상 부호화 장치(100) 또는 영상 복호화 장치(600)는 단계 S1301 또는 S1303의 전부 또는 일부 단계를 반복하여 현재 블록의 예측 블록을 유도할 수 있다. The image encoding device 100 or the image decoding device 600 may obtain a predicted value of one pixel in the current block based on at least one pixel value included in the selected at least one reference pixel line (S1303). The video encoding apparatus 100 or the video decoding apparatus 600 may derive a prediction block of the current block by repeating all or part of steps S1301 or S1303.

도 15는 예측 블록마다 인트라 예측에 이용될 참조 화소 라인을 적응적으로 결정하는 과정을 설명하기 위한 흐름도이다. 이 때 도 9에 도시된 단계 S902가 도 15에 도시된 단계들로 대체될 수 있다. FIG. 15 is a flowchart illustrating a process for adaptively determining a reference pixel line to be used for intra prediction for each prediction block. At this time, step S902 shown in FIG. 9 may be replaced with the steps shown in FIG. 15.

도 15를 참조하면, 참조 화소 라인 인덱스를 나타내는 변수 n은 0으로 초기화하고, 최적의 cost값을 저장할 변수인 COST_BEST_n = MAX_VALUE로 초기화한다. 여기서 MAX_VALUE는 COST_BEST_n 변수에 저장 가능한 최대 값이며, 실제로 cost계산시 나올 수 없는 아주 큰 값이다. 변수 N에는 기 설정된 참조 화소 라인의 총 개수를 설정한다. 현재 블록에 최적의 참조 화소 라인 인덱스를 나타내는 BEST_n은 0으로 초기화한다(S1401). 그 후 참조 화소 라인 인덱스 n에 따라 예측 블록의 각 화소 위치에 해당하는 보간 위치를 찾고 예측 블록을 생성한다(S1402). 그리고 생성된 예측 블록을 이용하여 n에 해당하는 cost값인 COST_n을 계산한다(S1403). 여기서 COST_n은 참조 화소 라인 n을 부호화 하는데 필요한 비트수, 예측 블록과 현재 블록과의 차이를 이용하여 계산한다. COST_n이 COST_BEST_n보다 작거나 같다면(S1404) 최적의 참조 화소 라인을 저장하는 변수인 BEST_n에 n을 저장하고, COST_BEST_n 변수엔 cost_n을 저장하며 n은 1증가시킨다(S1405). 만약 COST_n이COST_BEST_n보다 크다면 n만 1 증가시킨다(S1406). 마지막으로 n이 참조 화소 라인의 최대 개수에 도달 했다면 종료하며 그게 아니라면 S1402로 돌아가 반복한다.Referring to FIG. 15, the variable n representing the reference pixel line index is initialized to 0, and the variable to store the optimal cost value is initialized to COST_BEST_n = MAX_VALUE. Here, MAX_VALUE is the maximum value that can be stored in the COST_BEST_n variable, and is a very large value that cannot actually be output when calculating cost. The variable N is set to the total number of preset reference pixel lines. BEST_n, which represents the optimal reference pixel line index for the current block, is initialized to 0 (S1401). Afterwards, the interpolation position corresponding to each pixel position of the prediction block is found according to the reference pixel line index n, and a prediction block is generated (S1402). Then, COST_n, the cost value corresponding to n, is calculated using the generated prediction block (S1403). Here, COST_n is calculated using the number of bits required to encode reference pixel line n and the difference between the prediction block and the current block. If COST_n is less than or equal to COST_BEST_n (S1404), n is stored in BEST_n, a variable that stores the optimal reference pixel line, cost_n is stored in the COST_BEST_n variable, and n is increased by 1 (S1405). If COST_n is greater than COST_BEST_n, only n is increased by 1 (S1406). Finally, if n reaches the maximum number of reference pixel lines, the process ends. Otherwise, returns to S1402 and repeats.

도 16은 예측 블록마다 적응적으로 참조 화소 라인이 선택되는 경우 선택된 참조 화소 라인을 지시하는 참조 화소 라인 인덱스 정보가 부호화 장치(100)에 의해 부호화하는 과정을 나타낸 흐름도이다. 먼저, 예측 블록마다 화면 내 예측 모드의 예측 여부를 부호화한다(S1501). 그 후 예측이 되었는지 여부를 판단한 후(S1502) 만약 예측이 되었다면 주변 블록에서 생성된 화면 내 예측 모드의 예측 후보에서 어떤 후보가 선택되었는지를 알려주는 인덱스를 부호화한다(S1503). 그게 아니라면 주변 블록에서 생성된 화면 내 예측 모드의 예측 후보를 제외하고 나머지 모드를 재정렬하여 현재 선택된 화면 내 예측 모드를 이진화 후 부호화한다(S1504). 그 후 사용된 참조 화소 라인 인덱스를 부호화하고(S1505) 종료한다.FIG. 16 is a flowchart showing a process in which reference pixel line index information indicating the selected reference pixel line is encoded by the encoding device 100 when a reference pixel line is adaptively selected for each prediction block. First, whether the intra-screen prediction mode is predicted for each prediction block is encoded (S1501). After that, it is determined whether prediction has been made (S1502), and if prediction has been made, an index indicating which candidate was selected from the prediction candidates of the intra-screen prediction mode generated from the surrounding blocks is encoded (S1503). Otherwise, the prediction candidates of the intra-screen prediction mode generated from the surrounding blocks are excluded, the remaining modes are rearranged, and the currently selected intra-screen prediction mode is binarized and encoded (S1504). Afterwards, the used reference pixel line index is encoded (S1505) and the process ends.

도 17은 예측 블록마다 적응적으로 참조 화소 라인이 선택되는 경우 선택된 참조 화소 라인을 지시하는 참조 화소 라인 인덱스 정보가 복호화 장치(600)에 의해 복호화되는 과정을 나타낸 흐름도이다. 먼저, 예측 블록마다 화면 내 예측 모드의 예측 여부를 복호화한다(S1601). 그 후 예측이 되었는지 여부를 판단한 후(S1602) 만약 예측이 되었다면 주변 블록에서 생성된 화면 내 예측 모드의 예측 후보에서 어떤 후보가 선택되었는지를 알려주는 인덱스를 복호화한다(S1603). 그게 아니라면 주변 블록에서 생성된 화면 내 예측 모드의 예측 후보를 제외하고 나머지 모드를 재정렬하여 현재 선택된 화면 내 예측 모드를 복호화한다(S1604). 그 후 사용된 참조 화소 라인 인덱스를 복호화하고(S1605) 종료한다.FIG. 17 is a flowchart showing a process in which reference pixel line index information indicating the selected reference pixel line is decoded by the decoding device 600 when a reference pixel line is adaptively selected for each prediction block. First, whether the intra-screen prediction mode is predicted for each prediction block is decoded (S1601). After that, it is determined whether prediction has been made (S1602), and if prediction has been made, an index indicating which candidate was selected from the prediction candidates of the intra-screen prediction mode generated from the surrounding blocks is decoded (S1603). Otherwise, the currently selected intra-prediction mode is decoded by excluding prediction candidates of the intra-screen prediction mode generated from neighboring blocks and rearranging the remaining modes (S1604). Afterwards, the used reference pixel line index is decoded (S1605) and the process ends.

다음으로, 도 18 및 도 19를 참조하여, 참조 화소 라인 인덱스의 전송 없이 예측 블록의 각 화소 위치마다 적응적으로 참조 화소 라인을 결정하는 방법에 대해 설명한다. Next, with reference to FIGS. 18 and 19, a method for adaptively determining a reference pixel line for each pixel position of a prediction block without transmitting a reference pixel line index will be described.

예측 블록 안의 각 화소마다, 각 참조 화소 라인 내에서 보간을 통해 얻어지는 예측 화소의 위치의 정밀도는 다를 수 있다. 따라서 각 참조 화소 라인 내에서 보간을 통해 얻어진 예측 화소들 중에서 정수 화소 위치에 가장 가까운 예측 화소를 현재 화소 P의 예측 화소로 선택할 수 있다. 이 때 미리 정해진 N개의 참조 화소 라인들을 대상으로 위 과정을 적용할 수 있다. For each pixel in a prediction block, the precision of the position of the prediction pixel obtained through interpolation within each reference pixel line may be different. Therefore, among the prediction pixels obtained through interpolation within each reference pixel line, the prediction pixel closest to the integer pixel position can be selected as the prediction pixel of the current pixel P. At this time, the above process can be applied to N predetermined reference pixel lines.

만약, 정수 화소 위치의 예측 화소들이 복수개 존재하는 경우, 현재 블록에 가까운 예측 화소를 최종적인 예측 화소로 선택 할 수도 있다.If there are a plurality of prediction pixels at integer pixel positions, a prediction pixel close to the current block may be selected as the final prediction pixel.

도 19는 참조 화소 라인 인덱스의 전송 없이 적응적으로 참조 화소 라인을 선택하는 방법을 설명하기 위한 참고도이다. 도 19에 도시된 바와 같이, 예측 화소가 정수 위치에 존재한 라인이 많은 라인에 우선 순위를 두어 예측 블록마다 적응적으로 예측 화소 라인을 선택할 수 있다. 각 참조 화소 라인을 이용하여 예측 블록을 생성할 때 사용되는 보간된 화소의 정밀도와 빈도수가 도 19에서와 같다고 가정하면, 각 화소 위치의 정밀도에 따라 가중치를 두어 라인을 선택하게 할 수 있다. FIG. 19 is a reference diagram for explaining a method of adaptively selecting a reference pixel line without transmitting a reference pixel line index. As shown in FIG. 19, a prediction pixel line can be adaptively selected for each prediction block by prioritizing lines with many prediction pixels at integer positions. Assuming that the precision and frequency of the interpolated pixels used when generating a prediction block using each reference pixel line are the same as in FIG. 19, the line can be selected by weighting according to the precision of each pixel position.

도 19를 다시 참조하면, 라인 1을 이용하여 예측 블록을 생성하는 경우, 정수 위치 예측 화소들이 5개, 1/2 위치의 예측 화소들이 3개, 1/4 위치 예측 화소들이 4개, 1/8 위치 예측 화소들이 2개, 1/16 위치 예측 화소들이 1개, 1/32 위치 예측 화소들이 1개가 선택이 되었다. 따라서 예측 블록 내의 총 화소의 개수는 16개가 된다. 참조 화소 라인 2 및 참조 화소 라인 3의 경우도 동일하게 설명될 수 있다. Referring again to FIG. 19, when generating a prediction block using line 1, there are 5 integer position prediction pixels, 3 1/2 position prediction pixels, 4 1/4 position prediction pixels, and 1/4 position prediction pixels. Two 8 position prediction pixels, one 1/16 position prediction pixel, and one 1/32 position prediction pixel were selected. Therefore, the total number of pixels in the prediction block is 16. The case of reference pixel line 2 and reference pixel line 3 can be explained in the same way.

정수 화소 위치에만 우선순위를 두는 경우, 정수위치가 가장 많은 라인 1을 참조 화소 라인으로 선택하게 할 수도 있다. 혹은 각 위치마다 가중치를 두어 가중치와 빈도수의 합을 계산한 후, 계산된 값이 가장 크게 나온 라인을 참조 화소 라인으로 선택하게 하는 것 또한 가능하다. 혹은 각 라인 마다 가중치를 두어 가중치와 빈도수의 합을 계산한 후, 계산된 값이 가장 크게 나온 라인을 참조 화소 라인으로 선택하게 하는 것 또한 가능하다. 혹은 각 라인과 위치 모두에 가중치를 두어 가중치와 빈도수의 합을 계산한 후, 계산된 값이 가장 크게 나온 라인을 참조 화소 라인으로 선택하게 하는 것 또한 가능하다.If priority is given only to integer pixel positions, line 1 with the most integer pixel positions may be selected as the reference pixel line. Alternatively, it is also possible to apply weights to each position, calculate the sum of the weights and frequencies, and then select the line with the largest calculated value as the reference pixel line. Alternatively, it is also possible to assign a weight to each line, calculate the sum of the weight and frequency, and then select the line with the largest calculated value as the reference pixel line. Alternatively, it is also possible to apply weight to both each line and position, calculate the sum of the weight and frequency, and then select the line with the largest calculated value as the reference pixel line.

다른 실시예로서, 라인마다 가중치를 두어 가중치합 된 화소를 이용하여 예측 블록을 생성하는 것 또한 가능하다. 예를 들어 도 13의 X, Y, Z위치의 화소값이 존재하는 경우, 블록에 가까울수록 가중치를 더 두어 가중치합 된 값을 P위치의 예측 화소로 선택하는 것 또한 가능하다. 혹은 정수 화소 위치에 가까울수록 가중치를 더 두어 가중치합 된 값을 P위치의 예측 화소로 선택하는 것 또한 가능하다. 혹은 가중치합, 즉 가중평균을 이용하여 예측 화소를 유도하는 방법 외에도 산술평균, 중간값 등을 이용하여 예측 화소의 값을 유도할 수도 있다.As another example, it is also possible to generate a prediction block using weighted pixels by adding weights to each line. For example, if there are pixel values at the Alternatively, it is also possible to add more weight the closer it is to the integer pixel location and select the weighted sum as the predicted pixel for the P location. Alternatively, in addition to deriving the predicted pixel using a weighted sum, that is, a weighted average, the value of the predicted pixel can also be derived using an arithmetic mean, median, etc.

혹은 참조 화소 라인 인덱스를 사용하여 부호화되, 어떤 N개의 라인 중 하나를 제외하는 것으로 사용할 수도 있다. 예를 들어 참조 화소 라인 인덱스가 1로 설정되어 있는 경우, 라인 1을 제외 한 N-1개의 라인을 이용한다. 이 때, m번 모드를 이용하여 예측 값을 보간 할 시에, 정수 화소 위치에 가까울수록 우선순위를 높게 부여하거나 보간되는 위치의 정밀도에 따라 우선순위를 다르게 부여할 수 도 있다. 이런 기설정된 임의의 우선순위에 따라 라인 구분 없이 화소 단위로 라인 1을 제외한 다른 라인에서 예측 값을 생성 할 수도 있다. Alternatively, it can be encoded using a reference pixel line index and used to exclude one of the N lines. For example, if the reference pixel line index is set to 1, N-1 lines excluding line 1 are used. At this time, when interpolating the predicted value using the m mode, higher priority may be given closer to the integer pixel position, or different priorities may be given depending on the precision of the interpolated position. According to this preset arbitrary priority, predicted values can be generated from lines other than line 1 on a per-pixel basis without line distinction.

혹은 블록 단위 또는 상위 헤더에서, 참조 화소 라인 인덱스를 직접 부호화하는 방법과 부호화 하지 않는 방식 중 어떤 방식이 사용되었는지 여부를 부호화 장치(100)가 부호화하여 복호화 장치(600)로 전송하는 것 또한 가능하다.Alternatively, it is also possible for the encoding device 100 to encode and transmit to the decoding device 600 whether a method of directly encoding the reference pixel line index or a method of not encoding was used in the block unit or upper header. .

<예측 블록과 참조 화소 라인 간의 스무딩(smoothing)><Smoothing between prediction block and reference pixel line>

이하, 본 발명의 다른 실시예로서 예측 블록과 참조 화소 라인 간의 스무딩(smoothing)을 설명한다.Hereinafter, smoothing between a prediction block and a reference pixel line will be described as another embodiment of the present invention.

참조 화소 라인 내의 소정 화소(들)를 이용하여 예측 블록이 유도된 경우, 상기 예측 블록의 유도에 사용되지 않은 참조 화소 라인과 예측 블록 간에 또는 예측 블록에 인접한 영역과 예측 블록 간에는 불연속성이 존재할 수 있다. 이러한 불연속성을 감소시키기 위해 스무딩(smoothing)이 사용될 수 있다. 스무딩은 일종의 저역 필터에 해당할 수 있다.When a prediction block is derived using predetermined pixel(s) in a reference pixel line, a discontinuity may exist between the reference pixel line not used for derivation of the prediction block and the prediction block, or between an area adjacent to the prediction block and the prediction block. . Smoothing can be used to reduce these discontinuities. Smoothing can correspond to a type of low-pass filter.

본 발명의 실시예에 따른 스무딩은, 영상 부호화 장치(100)의 화면 내 예측부(102) 및 영상 복호화 장치(600)의 화면 내 예측부(607) 각각에 의해 수행될 수 있다.Smoothing according to an embodiment of the present invention may be performed by the intra-screen prediction unit 102 of the video encoding device 100 and the intra-screen prediction unit 607 of the video decoding device 600, respectively.

도 20은 예측 블록과 참조 화소 라인간의 스무딩(smoothing)을 설명하기 위한 도면이다. Figure 20 is a diagram for explaining smoothing between a prediction block and a reference pixel line.

이하 사용된 화면 내 예측 모드는 45도 up-right 방향에서 화면 내 예측이 수행되는 모드를 예로 들어 설명한다. 또한 참조 화소 라인 1이 인트라 예측을 위해 선택되었다고 가정한다. 또한 스무딩이 적용되는 화소로서 화소 A 내지 E를 이용한 스무딩을 설명하지만 그 외 화소에도 동일하게 적용 가능하다. The intra-screen prediction mode used below will be explained by taking as an example a mode in which intra-screen prediction is performed in the 45-degree up-right direction. Also assume that reference pixel line 1 is selected for intra prediction. In addition, smoothing is explained using pixels A to E as pixels to which smoothing is applied, but the same can be applied to other pixels.

도 20의 예시에서 45도 up-right 방향으로 화면 내 예측이 수행되었으므로 스무딩은 화면 내 예측 방향의 반대 방향인 45도 down-left 방향으로 수행될 수 있다. 이때, 현재 블록의 예측 블록의 크기 또는 형태에 따라 스무딩이 적용되는 예측 블록의 영역이 결정될 수 있다. 도 20에서는 예측 블록의 절반의 영역에 속하는 화소들이 스무딩된다. 즉, 어둡게 표시된 왼쪽 절반의 화소들에만 스무딩을 적용할 수 있다. 혹은 예측 블록의 크기 및/또는 화면 내 예측 모드에 따라 기설정된 영역 또는 비율을 이용할 수도 있다. 예를 들면, 예측 블록의 1/4 영역만 스무딩을 적용할 수도 있으며 그외의 비율도 가능하다. In the example of FIG. 20, since intra-screen prediction was performed in the 45-degree up-right direction, smoothing may be performed in the 45-degree down-left direction, which is the opposite direction of the intra-screen prediction direction. At this time, the area of the prediction block to which smoothing is applied may be determined depending on the size or shape of the prediction block of the current block. In Figure 20, pixels belonging to half of the area of the prediction block are smoothed. In other words, smoothing can be applied only to the darkened left half pixels. Alternatively, a preset area or ratio may be used depending on the size of the prediction block and/or the intra-screen prediction mode. For example, smoothing may be applied to only 1/4 of the prediction block, and other ratios are also possible.

도 20에서는 참조 화소 라인 1이 인트라 예측을 위한 참조 화소 라인으로 결정되었으므로, 참조 화소 라인 1에 존재하는 화소 D를 이용하여 예측 화소 A를 아래 수학식1을 이용하여 스무딩할 수 있다.In FIG. 20, since reference pixel line 1 is determined as the reference pixel line for intra prediction, prediction pixel A can be smoothed using equation 1 below using pixel D existing in reference pixel line 1.

위 수학식1에서 A', A 및 D는 각각 스무딩된 후의 예측 화소 A의 값, 스무딩되기 이전의 예측 화소 A의 값 및 참조 화소 D의 값이고, w1 및 w2는 각각 예측 화소 A에 적용되는 가중치 및 참조 화소 D에 적용되는 가중치이다. In Equation 1 above, A', A, and D are the value of prediction pixel A after smoothing, the value of prediction pixel A before smoothing, and the value of reference pixel D, respectively, and w1 and w2 are the values applied to prediction pixel A, respectively. Weight and reference This is the weight applied to pixel D.

또한, 참조 화소 라인 1에 존재하는 화소 D를 이용하여 예측 화소 B 를 상기 수학식1과 유사한 수학식을 이용하여 스무딩 할 수 있다. Additionally, the predicted pixel B can be smoothed using the pixel D present in the reference pixel line 1 using an equation similar to Equation 1 above.

이때 스무딩의 강도를 거리에 따라 조정할 수도 있다. 예측 화소 B보다는 예측 화소 A가 거리상 화소 D와 더 멀리 떨어져 있으므로 스무딩을 수행할 때 예측 화소 B와 화소 D를 스무딩할 때 보다, 예측 화소 A와 D를 스무딩할 때 더 강하게 스무딩해준다. 여기서 강한 스무딩은 화소 D쪽에 더 많은 가중치를 두어 예측 화소를 스무딩 함으로써 수행될 수 있다. At this time, the intensity of smoothing can be adjusted depending on the distance. Since prediction pixel A is further away from pixel D than prediction pixel B, the smoothing is performed more strongly when smoothing prediction pixels A and D than when smoothing prediction pixels B and pixel D. Here, strong smoothing can be performed by smoothing the predicted pixel by placing more weight on pixel D.

혹은 인트라 예측을 위해 선택된 참조 화소 라인과는 별개로 스무딩에 이용되는 참조 화소 라인은 예측 블록과 가까운 라인으로 설정하는 것도 가능하다. 도 20을 참조하면, 참조 화소 라인 1이 인트라 예측을 위해 선택되었지만 예측 화소 A, B의 스무딩에 이용되는 화소는 D가 아닌 C로 설정하는 것도 가능하다. 이러한 경우도 마찬가지로 거리에 따라 스무딩의 강도를 선택할 수 있다. 예컨대, 참조 화소 C를 이용하여 예측 화소 B 를 스무딩 할 경우에는 각각에 동일한 가중치를 적용하고, 참조 화소 C를 이용하여 예측 화소 A 를 스무딩 하는 경우에는 화소 C에 더 많은 가중치를 두어 스무딩을 수행할 수도 있다. Alternatively, separately from the reference pixel line selected for intra prediction, the reference pixel line used for smoothing may be set to a line close to the prediction block. Referring to FIG. 20, although reference pixel line 1 is selected for intra prediction, it is also possible to set the pixel used for smoothing prediction pixels A and B to C instead of D. In this case as well, the strength of smoothing can be selected depending on the distance. For example, when smoothing prediction pixel B using reference pixel C, the same weight is applied to each, and when smoothing prediction pixel A using reference pixel C, smoothing is performed by placing more weight on pixel C. It may be possible.

스무딩을 수행할 때, 양 방향 모두 사용하는 것 또한 가능하다. 예를 들어, 참조 화소 라인 0을 이용하여 스무딩한다고 가정하고 예측 화소 A를 스무딩할 때 참조 화소 F와 C에 각각 가중치를 두어 예측 화소 A와 스무딩 할 수도 있다. 예측 화소 B를 스무딩할 때도 화소 F와 C에 각각 가중치를 두어 예측 화소 B와 스무딩 하는 것 또한 가능하다. 이때, 라인 1이 인트라 예측을 위한 참조 화소 라인으로 선택되었으므로 up-right 방향에서는 화소 G를 이용하고 down-left 방향에서는 화소 C를 이용하는 것도 가능하다. When performing smoothing, it is also possible to use both directions. For example, assuming that smoothing is performed using reference pixel line 0, when smoothing prediction pixel A, weights may be placed on reference pixels F and C, respectively, to perform smoothing with prediction pixel A. When smoothing prediction pixel B, it is also possible to smooth prediction pixel B by assigning weight to pixels F and C respectively. At this time, since line 1 is selected as the reference pixel line for intra prediction, it is also possible to use pixel G in the up-right direction and pixel C in the down-left direction.

본 발명의 일 실시예에 따르면, 참조 화소와 예측 화소 간의 거리에 따라 가중치를 달리 하는 것 또한 가능하다. 예를 들어 참조 화소 F와 C를 이용하여 예측 화소 A 를 스무딩 하는 경우, 화소 C와 A 간의 거리가 화소 F와 A간의 거리보다 멀기 때문에 화소 C에 더 큰 가중치를 두어 스무딩을 수행할 수도 있다. 혹은 기설정된 방식을 이용하여 임의의 라인을 이용하여 스무딩을 수행하는 것 또한 가능하다. 이러한 스무딩 방식은 적용 여부를 블록단위로 부호화 하는 것 또한 가능하며 상위 헤더를 통해 부호화 하는 것 또한 가능하다. 혹은 스무딩 적용 여부를 부호화하는 것 없이 기설정된 조건에 의해 부호화기와 복호화기가 동일하게 수행하는 것 또한 가능하다. 예를 들어 어떤 각도의 화면 내 예측 모드가 수행되었는지에 따라 스무딩의 여부를 결정할 수도 있다. 본 실시예에서는 설명의 편의성을 위해 거리가 멀수록 더 강하게 스무딩한다고 설명하였지만 영상의 특성 등에 따라 반대의 경우도 또한 가능하다. According to one embodiment of the present invention, it is also possible to vary the weight depending on the distance between the reference pixel and the prediction pixel. For example, when smoothing prediction pixel A using reference pixels F and C, the distance between pixels C and A is greater than the distance between pixels F and A, so smoothing may be performed by placing greater weight on pixel C. Alternatively, it is also possible to perform smoothing using an arbitrary line using a preset method. It is also possible to encode the application of this smoothing method on a block-by-block basis, and it is also possible to encode it through the upper header. Alternatively, it is also possible for the encoder and decoder to perform the same operation according to preset conditions without encoding whether or not smoothing is applied. For example, whether to perform smoothing may be determined depending on which angle the intra-screen prediction mode was performed. In this embodiment, for convenience of explanation, it is explained that smoothing is stronger as the distance increases, but the opposite case is also possible depending on the characteristics of the image.

다음으로, 도 21, 도 22a 내지 22d를 참조하여, 본 발명의 일 실시예에 따라, 인트라 예측을 위한 참조 화소 라인이 선택되는 블록의 단위에 대해 설명한다.Next, with reference to FIGS. 21 and 22A to 22D, the unit of a block from which a reference pixel line for intra prediction is selected will be described, according to an embodiment of the present invention.

이하, 설명의 편의를 위해, 현재 블록이 16x16 크기이고 현재 블록이 4개의 8x8 변환 블록들로 분할되어 변환은 8x8 변환 블록 단위로 총 4번 수행되는 경우를 예로 들어 설명한다. 현재 블록은 변환을 위해 현재 블록의 크기보다 작은 다수의 변환 블록들로 분할될 수 있다. 따라서 현재 블록 단위로 화면 내 예측 모드가 결정되면, 결정된 화면 내 예측 모드를 변환 블록 단위로 적용하여 실제 예측은 변환 블록 단위로 수행될 수 있다. 이러한 방식의 장점으로는 참조 화소가 현재 블록에서 멀어질수록 화소 간의 상관도가 떨어질 수도 있는 점을 보완할 수 있다는 점이다. 도 21을 참조하면, 블록 단위로 화면 내 예측을 적용하면 변환 블록 A의 화소들은 변환 블록 D의 화소들 보다는 참소 화소들과의 거리가 가깝다. 따라서 변환 블록 D내의 화소들은 참조 화소들과의 거리가 멀어져서 예측의 효율이 낮아질 수 있다. Hereinafter, for convenience of explanation, an example will be given where the current block is 16x16 in size, the current block is divided into four 8x8 transform blocks, and the transform is performed a total of four times in units of 8x8 transform blocks. The current block may be divided into multiple transformation blocks smaller than the size of the current block for transformation. Therefore, when the intra-screen prediction mode is determined in units of the current block, actual prediction can be performed in units of transform blocks by applying the determined intra-prediction mode in units of transform blocks. The advantage of this method is that it can compensate for the fact that the correlation between pixels may decrease as the reference pixel moves away from the current block. Referring to FIG. 21, when intra-prediction is applied on a block basis, the pixels of transform block A are closer to the reference pixels than the pixels of transform block D. Therefore, the pixels in the transform block D may be farther away from the reference pixels, thereby lowering prediction efficiency.

전술한 단점을 보완하기 위해 블록 단위로는 화면 내 예측 모드만 결정하고 화면 내 예측은 변환 블록 단위로 수행될 수 있다. In order to compensate for the above-described shortcomings, only the intra-screen prediction mode can be determined on a block basis, and intra-screen prediction can be performed on a transform block basis.

도 21은 변환 블록 단위로 인트라 예측이 수행되는 경우, 현재 블록의 인트라 예측을 위해 선택된 적어도 하나의 참조 화소 라인을 현재 블록 내의 모든 변환 블록들에 공통적으로 이용하는 경우를 도시한다.FIG. 21 illustrates a case where, when intra prediction is performed on a transform block basis, at least one reference pixel line selected for intra prediction of the current block is commonly used for all transform blocks within the current block.

도 22a 내지 22d는 각 변환 블록 마다 적어도 하나의 참조 화소 라인을 선택하여 인트라 예측에 이용하는 경우를 도시한다.Figures 22A to 22D illustrate a case where at least one reference pixel line is selected for each transform block and used for intra prediction.

도 22a를 참조하면, 8x8 크기를 가진 4개의 변환 블록들이 사용되고 변환 블록 단위로 예측이 수행되는 경우, 변환 블록 A의 인트라 예측을 위해 도 21에 도시된 바와 동일한 참조 화소 라인들이 이용된다. Referring to FIG. 22A, when four transform blocks with a size of 8x8 are used and prediction is performed on a transform block basis, the same reference pixel lines as shown in FIG. 21 are used for intra prediction of transform block A.

도 22b를 참조하면, 변환 블록 B는 복원된 변환 블록 A의 화소들을 이용해서 도시된 바와 같은 참조 화소 라인들을 인트라 예측을 위해 사용할 수 있다. 마찬가지로 도 22c에서는 복원된 변환 블록 A와 B의 화소들을 이용해서 도시된 바와 같은 참조 화소 라인들을 인트라 예측을 위해 사용할 수 있다. 도22d에서도 복원된 변환 블록 A, B 및 C의 화소들을 이용해 도시된 바와 같은 참조 화소 라인들을 인트라 예측을 위해 사용할 수 있다. Referring to FIG. 22B, transform block B can use the reference pixel lines as shown using the restored pixels of transform block A for intra prediction. Likewise, in FIG. 22C, reference pixel lines as shown using pixels of restored transform blocks A and B can be used for intra prediction. Reference pixel lines as shown in FIG. 22D using pixels of restored transform blocks A, B, and C can be used for intra prediction.

이상 설명한 바와 같이, 다수의 참조 화소 라인을 사용하는 경우, 도 21에 도시된 바와 같이 블록 단위로 결정된 화소 라인들을 도 22a 내지 d의 변환 블록 단위로 예측을 수행하는 경우에 그대로 적용할 수도 있다. 혹은 변환 블록 단위로 최적의 참조 화소 라인을 새로 구하는 것 또한 가능하다. 혹은 블록 단위로 구한 최적의 참조 화소 라인을 변환 블록 전체에 사용할지 아니면 변환 블록 단위 마다 참조 화소 라인을 유도해 사용할지 여부를 블록 단위 혹은 상위 헤더를 통해 부호화 하여 복호화 장치(600)로 알리는 것 또한 가능하다.As described above, when using a plurality of reference pixel lines, the pixel lines determined on a block basis as shown in FIG. 21 may be directly applied when prediction is performed on a transform block basis in FIGS. 22A to 22D. Alternatively, it is also possible to obtain a new optimal reference pixel line on a conversion block basis. Alternatively, whether to use the optimal reference pixel line obtained on a block-by-block basis for the entire transform block or derive and use a reference pixel line for each transform block can be encoded on a block-by-block basis or through a higher-level header and notified to the decoding device 600. possible.

본 개시의 예시적인 방법들은 설명의 명확성을 위해서 동작의 시리즈로 표현되어 있지만, 이는 단계가 수행되는 순서를 제한하기 위한 것은 아니며, 필요한 경우에는 각각의 단계가 동시에 또는 상이한 순서로 수행될 수도 있다. 본 개시에 따른 방법을 구현하기 위해서, 예시하는 단계에 추가적으로 다른 단계를 포함하거나, 일부의 단계를 제외하고 나머지 단계를 포함하거나, 또는 일부의 단계를 제외하고 추가적인 다른 단계를 포함할 수도 있다.Exemplary methods of the present disclosure are expressed as a series of operations for clarity of explanation, but this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. In order to implement the method according to the present disclosure, other steps may be included in addition to the exemplified steps, some steps may be excluded and the remaining steps may be included, or some steps may be excluded and additional other steps may be included.

본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.The various embodiments of the present disclosure do not list all possible combinations but are intended to explain representative aspects of the present disclosure, and matters described in the various embodiments may be applied independently or in combination of two or more.

또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다. Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. For hardware implementation, one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general purpose It can be implemented by a processor (general processor), controller, microcontroller, microprocessor, etc.

본 개시의 범위는 다양한 실시 예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.The scope of the present disclosure is software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that cause operations according to the methods of various embodiments to be executed on a device or computer, and such software or It includes non-transitory computer-readable medium in which instructions, etc. are stored and can be executed on a device or computer.

Claims (11)

영상 복호화 방법에 있어서,
복수의 참조 화소 라인들 중 적어도 하나의 참조 화소 라인을 선택하는 단계, - 상기 복수의 참조 화소 라인들은 현재 블록을 포함하는 현재 픽처 내에 포함됨;
상기 현재 블록의 인트라 예측 모드를 도출하는 단계;
상기 적어도 하나의 참조 화소 라인 및 상기 현재 블록의 인트라 예측 모드에 기반하여, 상기 현재 블록의 예측 블록을 생성하는 단계; 및
상기 복수의 참조 화소 라인들 내의 적어도 하나의 참조 화소에 기반하여 상기 예측 블록 내의 하나 이상의 화소들에 대한 필터링을 수행하는 단계를 포함하고,
상기 하나 이상의 화소들은 상기 예측 블록의 크기에 기반하여 결정되는
영상 복호화 방법.
In the video decoding method,
selecting at least one reference pixel line from a plurality of reference pixel lines, wherein the plurality of reference pixel lines are included in a current picture including a current block;
Deriving an intra prediction mode of the current block;
generating a prediction block of the current block based on the at least one reference pixel line and an intra prediction mode of the current block; and
Comprising: performing filtering on one or more pixels in the prediction block based on at least one reference pixel in the plurality of reference pixel lines,
The one or more pixels are determined based on the size of the prediction block.
Video decoding method.
삭제delete 제1항에 있어서,
상기 현재 블록의 인트라 예측 모드가 소정의 각도 모드인 경우,
상기 예측 블록 내의 제1 화소는, 상기 적어도 하나의 참조 화소 라인에 포함되는 제1 참조 화소에 기반하여 필터링되는
영상 복호화 방법.
According to paragraph 1,
If the intra prediction mode of the current block is a predetermined angle mode,
The first pixel in the prediction block is filtered based on the first reference pixel included in the at least one reference pixel line.
Video decoding method.
제3항에 있어서,
상기 소정의 각도 모드는 45도 업-라이트(up-right) 예측 방향을 갖는
영상 복호화 방법.
According to paragraph 3,
The predetermined angle mode has a 45 degree up-right prediction direction.
Video decoding method.
제3항에 있어서,
상기 제1 참조 화소는, 상기 소정의 각도 모드의 예측 방향과 반대 방향에 배치되는
영상 복호화 방법.
According to paragraph 3,
The first reference pixel is disposed in a direction opposite to the prediction direction of the predetermined angle mode.
Video decoding method.
제3항에 있어서,
상기 제1 참조 화소를 포함하는 참조 화소 라인은, 상기 예측 블록에 인접하게 배치되는
영상 복호화 방법.
According to paragraph 3,
A reference pixel line including the first reference pixel is disposed adjacent to the prediction block.
Video decoding method.
제3항에 있어서,
상기 제1 화소는, 제1 가중치를 상기 제1 참조 화소에 적용함으로써 필터링되는
영상 복호화 방법.
According to paragraph 3,
The first pixel is filtered by applying a first weight to the first reference pixel.
Video decoding method.
제7항에 있어서,
상기 제1 가중치는, 상기 제1 화소와 상기 제1 참조 화소 사이의 거리에 기반하여 결정되는
영상 복호화 방법.
In clause 7,
The first weight is determined based on the distance between the first pixel and the first reference pixel.
Video decoding method.
제7항에 있어서,
상기 제1 가중치는, 상기 제1 화소와 상기 제1 참조 화소 사이의 거리가 증가함에 따라 감소하는
영상 복호화 방법.
In clause 7,
The first weight decreases as the distance between the first pixel and the first reference pixel increases.
Video decoding method.
영상 부호화 방법에 있어서,
복수의 참조 화소 라인들 중 적어도 하나의 참조 화소 라인을 선택하는 단계, - 상기 복수의 참조 화소 라인들은 현재 블록을 포함하는 현재 픽처 내에 포함됨;
상기 현재 블록의 인트라 예측 모드를 도출하는 단계;
상기 적어도 하나의 참조 화소 라인 및 상기 현재 블록의 인트라 예측 모드에 기반하여, 상기 현재 블록의 예측 블록을 생성하는 단계;
상기 복수의 참조 화소 라인들 내의 적어도 하나의 참조 화소에 기반하여 상기 예측 블록 내의 하나 이상의 화소들에 대한 필터링을 수행하는 단계; 및
상기 현재 블록의 인트라 예측 모드에 관한 제1 정보 및 상기 적어도 하나의 참조 화소 라인에 관한 제2 정보를 부호화하는 단계를 포함하고,
상기 하나 이상의 화소들은 상기 예측 블록의 크기에 기반하여 결정되는
영상 부호화 방법.
In the video encoding method,
selecting at least one reference pixel line from a plurality of reference pixel lines, wherein the plurality of reference pixel lines are included in a current picture including a current block;
Deriving an intra prediction mode of the current block;
generating a prediction block of the current block based on the at least one reference pixel line and an intra prediction mode of the current block;
performing filtering on one or more pixels in the prediction block based on at least one reference pixel in the plurality of reference pixel lines; and
Encoding first information about the intra prediction mode of the current block and second information about the at least one reference pixel line,
The one or more pixels are determined based on the size of the prediction block.
Video encoding method.
영상 부호화 방법에 의해 생성된 비트스트림을 저장하는 비일시적 컴퓨터 판독 가능한 기록 매체에 있어서, 상기 영상 부호화 방법은,
복수의 참조 화소 라인들 중 적어도 하나의 참조 화소 라인을 선택하는 단계, - 상기 복수의 참조 화소 라인들은 현재 블록을 포함하는 현재 픽처 내에 포함됨;
상기 현재 블록의 인트라 예측 모드를 도출하는 단계;
상기 적어도 하나의 참조 화소 라인 및 상기 현재 블록의 인트라 예측 모드에 기반하여, 상기 현재 블록의 예측 블록을 생성하는 단계;
상기 복수의 참조 화소 라인들 내의 적어도 하나의 참조 화소에 기반하여 상기 예측 블록 내의 하나 이상의 화소들에 대한 필터링을 수행하는 단계; 및
상기 현재 블록의 인트라 예측 모드에 관한 제1 정보 및 상기 적어도 하나의 참조 화소 라인에 관한 제2 정보를 비트스트림 내에 부호화하는 단계를 포함하고,
상기 하나 이상의 화소들은 상기 예측 블록의 크기에 기반하여 결정되는
비일시적 컴퓨터 판독 가능한 기록 매체.
A non-transitory computer-readable recording medium storing a bitstream generated by an image encoding method, the image encoding method comprising:
selecting at least one reference pixel line from a plurality of reference pixel lines, wherein the plurality of reference pixel lines are included in a current picture including a current block;
Deriving an intra prediction mode of the current block;
generating a prediction block of the current block based on the at least one reference pixel line and an intra prediction mode of the current block;
performing filtering on one or more pixels in the prediction block based on at least one reference pixel in the plurality of reference pixel lines; and
Encoding first information about the intra prediction mode of the current block and second information about the at least one reference pixel line into a bitstream,
The one or more pixels are determined based on the size of the prediction block.
A non-transitory computer-readable recording medium.
KR1020210062095A 2016-10-14 2021-05-13 Method and apparatus for encoding/decoding an image KR102635240B1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20160133753 2016-10-14
KR1020160133753 2016-10-14
KR1020170127938A KR102357282B1 (en) 2016-10-14 2017-09-29 Method and apparatus for encoding/decoding an image

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020170127938A Division KR102357282B1 (en) 2016-10-14 2017-09-29 Method and apparatus for encoding/decoding an image

Publications (2)

Publication Number Publication Date
KR20210058782A KR20210058782A (en) 2021-05-24
KR102635240B1 true KR102635240B1 (en) 2024-02-08

Family

ID=62084982

Family Applications (4)

Application Number Title Priority Date Filing Date
KR1020170127938A KR102357282B1 (en) 2016-10-14 2017-09-29 Method and apparatus for encoding/decoding an image
KR1020210062095A KR102635240B1 (en) 2016-10-14 2021-05-13 Method and apparatus for encoding/decoding an image
KR1020220010846A KR102639887B1 (en) 2016-10-14 2022-01-25 Method and apparatus for encoding/decoding an image
KR1020240023908A KR20240028390A (en) 2016-10-14 2024-02-20 Method and apparatus for encoding/decoding an image

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020170127938A KR102357282B1 (en) 2016-10-14 2017-09-29 Method and apparatus for encoding/decoding an image

Family Applications After (2)

Application Number Title Priority Date Filing Date
KR1020220010846A KR102639887B1 (en) 2016-10-14 2022-01-25 Method and apparatus for encoding/decoding an image
KR1020240023908A KR20240028390A (en) 2016-10-14 2024-02-20 Method and apparatus for encoding/decoding an image

Country Status (1)

Country Link
KR (4) KR102357282B1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019245261A1 (en) * 2018-06-18 2019-12-26 세종대학교 산학협력단 Method and apparatus for encoding/decoding image
CN112740670A (en) 2018-06-25 2021-04-30 Oppo广东移动通信有限公司 Intra-frame prediction method and device
WO2020009366A1 (en) * 2018-07-02 2020-01-09 엘지전자 주식회사 Method and apparatus for decoding image according to intra-prediction in image coding system
CN113170115A (en) * 2018-11-14 2021-07-23 Lg 电子株式会社 Method and apparatus for processing video data
WO2020111785A1 (en) * 2018-11-27 2020-06-04 주식회사 엑스리스 Method for encoding/decoding video signal and apparatus therefor
WO2020130629A1 (en) * 2018-12-18 2020-06-25 엘지전자 주식회사 Image coding method based on multiple reference line intra prediction, and device therefor
WO2020130628A1 (en) * 2018-12-18 2020-06-25 엘지전자 주식회사 Method for coding image on basis of multiple reference line intra prediction and apparatus therefor
WO2020197031A1 (en) * 2019-03-22 2020-10-01 엘지전자 주식회사 Intra prediction method and apparatus based on multi-reference line in image coding system
WO2020256507A1 (en) * 2019-06-20 2020-12-24 엘지전자 주식회사 Method and device for encoding/decoding image by using multiple reference line intra prediction, and method for transmitting bitstream
WO2020256506A1 (en) * 2019-06-20 2020-12-24 엘지전자 주식회사 Video encoding/decoding method and apparatus using multiple reference line intra-prediction, and method for transmitting bitstream
KR20210063805A (en) 2019-11-25 2021-06-02 한봉길 A Method of Partitioning Location and Joint Processing for the Floor Plan of Wall-Type Apartment Housing
WO2021118309A1 (en) * 2019-12-13 2021-06-17 주식회사 케이티 Method and apparatus for processing video signal
KR20230100657A (en) * 2021-12-28 2023-07-05 주식회사 케이티 Method and apparatus for encoding/decoding image
WO2024005480A1 (en) * 2022-06-29 2024-01-04 엘지전자 주식회사 Image encoding/decoding method based on multiple reference lines, method for transmitting bitstream, and recording medium on which bitstream is stored
WO2024063532A1 (en) * 2022-09-20 2024-03-28 엘지전자 주식회사 Intra prediction mode-based image encoding/decoding method and apparatus using multi reference line (mrl), and recording medium for storing bitstream

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3276958A4 (en) * 2015-03-23 2018-08-29 LG Electronics Inc. Method for processing image on basis of intra prediction mode and apparatus therefor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Hui Yong Kim, "Description of video coding technology proposal by ETRI", JCTVC-A127. 2010.4.15*
Yao-Jen Chang, "Arbitrary reference tier for intra directional modes", JVET-C0043, 26 May 2016.*

Also Published As

Publication number Publication date
KR20220016937A (en) 2022-02-10
KR20180041575A (en) 2018-04-24
KR102357282B1 (en) 2022-01-28
KR20210058782A (en) 2021-05-24
KR102639887B1 (en) 2024-02-23
KR20240028390A (en) 2024-03-05

Similar Documents

Publication Publication Date Title
KR102635240B1 (en) Method and apparatus for encoding/decoding an image
JP7442200B2 (en) Image encoding/decoding method and device
KR102383104B1 (en) Method and apparatus for processing a video signal
KR102410032B1 (en) Method and apparatus for processing a video signal
KR102416257B1 (en) Method and apparatus for processing a video signal
US11909955B2 (en) Image signal encoding/decoding method and apparatus therefor
KR102597617B1 (en) Method for encoding/decoidng video signal and apparatus therefor
JP7391958B2 (en) Video signal encoding/decoding method and equipment used in the method
KR20180061069A (en) Method and apparatus for filtering
KR102424420B1 (en) Method and apparatus for processing a video signal
CN112369034B (en) Video coding method and apparatus using merging candidates
KR102471207B1 (en) Method and apparatus for processing a video signal
KR102435000B1 (en) Method and apparatus for processing a video signal
KR102416804B1 (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR102425722B1 (en) Method and apparatus for encoding/decoding a video signal
CA3235103A1 (en) Partitioning of a coding block to obtain a plurality of prediction blocks in encoding/decoding a video signal
KR102660273B1 (en) A method and an apparatus for processing a video signal based on reference between components
KR20220098114A (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR20190115426A (en) Method and apparatus for encoding/decoding an image
KR102431287B1 (en) Method and apparatus for encoding/decoding a video signal
KR102511611B1 (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR102557740B1 (en) Method and apparatus for encoding/decoding a video signal
KR102557797B1 (en) Method and apparatus for encoding/decoding a video signal
US20240137497A1 (en) Image signal encoding/decoding method and apparatus therefor
KR20240024755A (en) Method for encoding/decoding a video signal and recording medium storing a bitsteram generated based on the method

Legal Events

Date Code Title Description
A107 Divisional application of patent
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant